Skip to content
Extraits de code Groupes Projets
Valider 43b72485 rédigé par Benjamin - Le Filament's avatar Benjamin - Le Filament
Parcourir les fichiers

[fix] error year (change type)

parent 66ccfe8f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -83,7 +83,7 @@ class ScopCotisation(models.AbstractModel): ...@@ -83,7 +83,7 @@ class ScopCotisation(models.AbstractModel):
"=", "=",
self.env.ref("cgscop_partner.membership_type_1").id, self.env.ref("cgscop_partner.membership_type_1").id,
), ),
("start", "<", date(self.year, 1, 1)), ("start", "<", date(int(self.year), 1, 1)),
("end", "=", None), ("end", "=", None),
] ]
) )
...@@ -93,7 +93,7 @@ class ScopCotisation(models.AbstractModel): ...@@ -93,7 +93,7 @@ class ScopCotisation(models.AbstractModel):
def get_new_members(self, limit_start_date=None): def get_new_members(self, limit_start_date=None):
if not limit_start_date: if not limit_start_date:
limit_start_date = date(self.year, 12, 31) limit_start_date = date(int(self.year), 12, 31)
self.ensure_one() self.ensure_one()
members = ( members = (
self.env["scop.membership.period"] self.env["scop.membership.period"]
...@@ -104,11 +104,11 @@ class ScopCotisation(models.AbstractModel): ...@@ -104,11 +104,11 @@ class ScopCotisation(models.AbstractModel):
"=", "=",
self.env.ref("cgscop_partner.membership_type_1").id, self.env.ref("cgscop_partner.membership_type_1").id,
), ),
("start", ">=", date(self.year, 1, 1)), ("start", ">=", date(int(self.year), 1, 1)),
("start", "<=", limit_start_date), ("start", "<=", limit_start_date),
"|", "|",
("end", "=", None), ("end", "=", None),
("end", ">", date(self.year, 1, 1)), ("end", ">", date(int(self.year), 1, 1)),
] ]
) )
.mapped("partner_id") .mapped("partner_id")
......
...@@ -63,16 +63,16 @@ ...@@ -63,16 +63,16 @@
<field name="name">account.move.tree.scop.inherited</field> <field name="name">account.move.tree.scop.inherited</field>
<field name="model">account.move</field> <field name="model">account.move</field>
<field name="mode">primary</field> <field name="mode">primary</field>
<field name="inherit_id" ref="account.view_out_invoice_tree" /> <field name="inherit_id" ref="account.view_invoice_tree" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//field[@name='partner_id']" position="before"> <xpath expr="//field[@name='invoice_partner_display_name']" position="before">
<field name="partner_member_number" readonly="1" /> <field name="partner_member_number" readonly="1" />
</xpath> </xpath>
<xpath expr="//field[@name='partner_id']" position="attributes"> <xpath expr="//field[@name='invoice_partner_display_name'][2]" position="attributes">
<attribute name="string">Adhérent</attribute> <attribute name="string">Adhérent</attribute>
</xpath> </xpath>
<xpath expr="//field[@name='partner_id']" position="after"> <xpath expr="//field[@name='invoice_origin']" position="after">
<field name="type_contribution_id" /> <field name="type_contribution_id" optional="hide" />
</xpath> </xpath>
<xpath expr="//field[@name='invoice_date']" position="attributes"> <xpath expr="//field[@name='invoice_date']" position="attributes">
<attribute name="string">Date de cotisation</attribute> <attribute name="string">Date de cotisation</attribute>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter