diff --git a/repair_full_editable/README.rst b/repair_full_editable/README.rst index fed6fe0..4198dfa 100644 --- a/repair_full_editable/README.rst +++ b/repair_full_editable/README.rst @@ -21,4 +21,4 @@ Contributors * Daniel Campos * Pedro M. Baeza * Ana Juaristi -* Esther Martín \ No newline at end of file +* Esther Martín diff --git a/repair_full_editable/models/repair_order.py b/repair_full_editable/models/repair_order.py index 90c77e9..15b2283 100644 --- a/repair_full_editable/models/repair_order.py +++ b/repair_full_editable/models/repair_order.py @@ -11,6 +11,7 @@ class RepairOrder(models.Model): @api.onchange("product_id") def onchange_product_id(self): - super(RepairOrder, self).onchange_product_id() + res = super().onchange_product_id() if not self.partner_id: self.pricelist_id = self.env.ref("product.list0") + return res diff --git a/repair_full_editable/tests/test_repair_full_editable.py b/repair_full_editable/tests/test_repair_full_editable.py index 7bc97db..4b41bf3 100644 --- a/repair_full_editable/tests/test_repair_full_editable.py +++ b/repair_full_editable/tests/test_repair_full_editable.py @@ -8,7 +8,7 @@ @common.post_install(True) class TestRepairFullEditable(common.TransactionCase): def setUp(self): - super(TestRepairFullEditable, self).setUp() + super().setUp() self.repair = self.env.ref("repair.repair_r1") self.product = self.ref("product.product_product_2") self.pricelist = self.env.ref("product.list0") diff --git a/repair_full_editable/views/repair_order_view.xml b/repair_full_editable/views/repair_order_view.xml index 45340f9..1a2e528 100644 --- a/repair_full_editable/views/repair_order_view.xml +++ b/repair_full_editable/views/repair_order_view.xml @@ -6,16 +6,19 @@ + base.group_no_one {'readonly': ['|', '&', ('invoiced', '=', True), ('invoice_method', '!=', 'b4repair'),('state','=','done')]} + >{'readonly': ['|', '&', ('invoiced', '=', True),('invoice_method', '!=', 'b4repair'),('state','=','done')]} + base.group_no_one {'readonly': ['|', '&', ('invoiced', '=', True), ('invoice_method', '!=', 'b4repair'),('state','=','done')]} + >{'readonly': ['|', '&', ('invoiced', '=', True),('invoice_method', '!=', 'b4repair'),('state','=','done')]} + base.group_no_one {'readonly': ['|', '&', ('invoiced', '=', True), ('invoice_method', '!=', 'b4repair'),('state','=','done')]}