Skip to content
Extraits de code Groupes Projets
Sélectionner une révision Git
  • e1e1e9cf1cce94b90fa0508d5fa6a742226e470c
  • 12.0-evo-202003 par défaut
  • 14-RV-20250324
  • 14-RV-20240830
  • 14-RV-20231222
  • 12-RV-Bug_ecrasement_date_radiation
  • 12-RV-revision-staff
  • 12-RV-copadev
  • 12-RV-Correctif-open-instagram
  • 12-RV-Tree-Coop-Ajout-effectif
  • 12.0-RV-Instagram
  • 12.0-RV-segment_visibility
  • 12.0 protégée
  • 12.0-RV-Abonnements
14 résultats

__init__.py

Blame
  • Bifurcation depuis Le Filament / Confédération Générale des SCOP / cgscop_partner
    Le projet source a une visibilité limitée.
    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