Skip to content

Commit

Permalink
[14.0][MIG] repair_full_editable: Migration to 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredoavanzosc authored and anajuaristi committed Nov 27, 2024
1 parent 37922e7 commit de55961
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion repair_full_editable/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ Contributors
* Daniel Campos <[email protected]>
* Pedro M. Baeza <[email protected]>
* Ana Juaristi <[email protected]>
* Esther Martín <[email protected]>
* Esther Martín <[email protected]>
3 changes: 2 additions & 1 deletion repair_full_editable/models/repair_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion repair_full_editable/tests/test_repair_full_editable.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
7 changes: 5 additions & 2 deletions repair_full_editable/views/repair_order_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@
<field name="arch" type="xml">
<data>
<field name="fees_lines" position="attributes">
<attribute name="groups">base.group_no_one</attribute>
<attribute
name="attrs"
>{'readonly': ['|', '&amp;', ('invoiced', '=', True), ('invoice_method', '!=', 'b4repair'),('state','=','done')]}</attribute>
>{'readonly': ['|', '&amp;', ('invoiced', '=', True),('invoice_method', '!=', 'b4repair'),('state','=','done')]}</attribute>
</field>
<field name="operations" position="attributes">
<attribute name="groups">base.group_no_one</attribute>
<attribute
name="attrs"
>{'readonly': ['|', '&amp;', ('invoiced', '=', True), ('invoice_method', '!=', 'b4repair'),('state','=','done')]}</attribute>
>{'readonly': ['|', '&amp;', ('invoiced', '=', True),('invoice_method', '!=', 'b4repair'),('state','=','done')]}</attribute>
</field>
<field name="pricelist_id" position="attributes">
<attribute name="groups">base.group_no_one</attribute>
<attribute
name="attrs"
>{'readonly': ['|', '&amp;', ('invoiced', '=', True), ('invoice_method', '!=', 'b4repair'),('state','=','done')]}</attribute>
Expand Down

0 comments on commit de55961

Please sign in to comment.