Skip to content
Extraits de code Groupes Projets
Sélectionner une révision Git
  • 056d790b163e7df116c07b545e2b87bfdc2d34d6
  • 14.0 par défaut
  • 14.0-2507-inpi
  • 12.0 protégée
  • 13.0
  • 12.0-lm-00 protégée
6 résultats

__manifest__.py

Blame
  • res_partner.py 1,05 Kio
    # © 2020 Le Filament (<http://www.le-filament.com>)
    # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
    
    from odoo import fields, models
    
    
    class ResPartner(models.Model):
        _inherit = "res.partner"
    
        contribution_report_ids = fields.One2many(
            comodel_name="scop.contribution.report",
            inverse_name="partner_id",
            string="Cotisations",
        )
    
        def get_partner_contribution_type(self):
            """
            Returns list of contribution type for partner
            """
            contribution_type = [self.env.ref("cgscop_partner.riga_14397")]
            if self.ur_id in [
                self.env.ref("cgscop_partner.riga_14232"),
                self.env.ref("cgscop_partner.riga_14243"),
            ]:
                contribution_type.append(self.env.ref("cgscop_partner.riga_14399"))
            if self.is_federation_com:
                contribution_type.append(self.env.ref("cgscop_partner.riga_14398"))
            if self.is_federation_cae:
                contribution_type.append(self.env.ref("cgscop_partner.cotiz_fede_cae"))
            return contribution_type