Skip to content

Commit

Permalink
[MIG+FIX] sale_commission: Fix migration script
Browse files Browse the repository at this point in the history
append call was not correct.

Closes OCA#266
  • Loading branch information
pedrobaeza authored and fredzamoabg committed May 24, 2021
1 parent 2db44f2 commit 0f5aac6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion sale_commission/migrations/13.0.1.0.0/pre-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ def migrate(env, version):
renamed_fields = []
for model in renamings:
for old_field, new_field in renamings[model]:
renamed_fields.append(model, model.replace(".", "_"), old_field, new_field)
renamed_fields.append(
(model, model.replace(".", "_"), old_field, new_field)
)
openupgrade.rename_fields(env, renamed_fields)
2 changes: 1 addition & 1 deletion sale_commission/models/sale_commission_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class SaleCommissionLineMixin(models.AbstractModel):
copy=True,
)
amount = fields.Monetary(
string="Commission Amount", compute="_compute_amount", store=True,
string="Commission Amount", compute="_compute_commission_amount", store=True,
)
# Fields to be overriden with proper source (via related or computed field)
currency_id = fields.Many2one(comodel_name="res.currency")
Expand Down

0 comments on commit 0f5aac6

Please sign in to comment.