Skip to content

Commit

Permalink
[FIX] Fix order of mixin inheritance to get correct super().create() …
Browse files Browse the repository at this point in the history
…behaviour
  • Loading branch information
kevinkhao committed Mar 3, 2021
1 parent 0d3bb29 commit bab040e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sale_configurator_base/models/account_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class AccountMove(models.Model):
_name = "account.move"
_inherit = ["account.move", "configurable.mixin"]
_inherit = ["configurable.mixin", "account.move"]

@property
def _lines_name(self):
Expand Down
4 changes: 2 additions & 2 deletions sale_configurator_base/models/sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def update_attrs(node, add_attrs):

class SaleOrder(models.Model):
_name = "sale.order"
_inherit = ["sale.order", "configurable.mixin"]
_inherit = ["configurable.mixin", "sale.order"]

@property
def _lines_name(self):
Expand Down Expand Up @@ -82,7 +82,7 @@ def _create_invoices(self, grouped=False, final=False, date=None):

class SaleOrderLine(models.Model):
_name = "sale.order.line"
_inherit = ["sale.order.line", "configurable.line.mixin"]
_inherit = ["configurable.line.mixin", "sale.order.line"]

parent_id = fields.Many2one(
"sale.order.line", "Parent Line", ondelete="cascade", index=True
Expand Down

0 comments on commit bab040e

Please sign in to comment.