Skip to content
Snippets Groups Projects
Commit 2a5f4a8e authored by Juliana's avatar Juliana
Browse files

[UPD]Add delete cascate on payment method + add producer in table

parent 4810c2d8
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ class AccAccountPayment(models.Model): ...@@ -17,7 +17,7 @@ class AccAccountPayment(models.Model):
("virement", "Virement"), ("virement", "Virement"),
], "Méthode de paiement") ], "Méthode de paiement")
description = fields.Text("Description") description = fields.Text("Description")
producer_id = fields.Many2one("res.partner", "Producteur") producer_id = fields.Many2one("res.partner", "Producteur", ondelete="cascade")
# ------------------------------------------------------ # ------------------------------------------------------
# SQL Constraints # SQL Constraints
# ------------------------------------------------------ # ------------------------------------------------------
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<sheet> <sheet>
<group> <group>
<field name="name" invisible="1"/> <field name="name" invisible="1"/>
<field name="producer_id" />
<field name="name_type" /> <field name="name_type" />
<field name="description" /> <field name="description" />
</group> </group>
...@@ -23,6 +24,7 @@ ...@@ -23,6 +24,7 @@
<field name="model">acc.account.payment</field> <field name="model">acc.account.payment</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="Méthodes de paiement"> <tree string="Méthodes de paiement">
<field name="producer_id"/>
<field name="name_type"/> <field name="name_type"/>
<field name="name" invisible="1" /> <field name="name" invisible="1" />
<field name="description" /> <field name="description" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment