Skip to Content
Menu
This question has been flagged
2 Replies
3948 Views

I migrated the odoo13 dump from one server to another. After migrating the following error occurred while adding product to the cart.

File "", line 2, in create
File "/opt/odoo13/odoo/odoo/api.py", line 335, in _model_create_multi
return create(self, [arg])
File "/opt/odoo13/odoo/addons/sale_timesheet/models/sale_order.py", line 202, in create
lines = super(SaleOrderLine, self).create(vals_list)
File "", line 2, in create
File "/opt/odoo13/odoo/odoo/api.py", line 336, in _model_create_multi
return create(self, arg)
File "/opt/odoo13/odoo/addons/sale_stock/models/sale_order.py", line 334, in create
lines = super(SaleOrderLine, self).create(vals_list)
File "", line 2, in create
File "/opt/odoo13/odoo/odoo/api.py", line 317, in _model_create_single
return self.browse().concat(*(create(self, vals) for vals in arg))
File "/opt/odoo13/odoo/odoo/api.py", line 317, in
return self.browse().concat(*(create(self, vals) for vals in arg))
File "/opt/odoo13/odoo/addons/sale_purchase/models/sale_order.py", line 98, in create
line = super(SaleOrderLine, self).create(values)
File "", line 2, in create
File "/opt/odoo13/odoo/odoo/api.py", line 335, in _model_create_multi
return create(self, [arg])
File "/opt/odoo13/odoo/addons/sale/models/sale.py", line 1073, in create
values.update(self._prepare_add_missing_fields(values))
File "/opt/odoo13/odoo/addons/sale/models/sale.py", line 1061, in _prepare_add_missing_fields
line.product_id_change()
File "/opt/odoo13/odoo/addons/sale_management/models/sale_order.py", line 154, in product_id_change
domain = super(SaleOrderLine, self).product_id_change()
File "/opt/odoo13/odoo/addons/sale/models/sale.py", line 1446, in product_id_change
self._compute_tax_id()
File "/opt/odoo13/odoo/addons/sale_coupon/models/sale_order.py", line 426, in _compute_tax_id
super(SaleOrderLine, self - reward_lines)._compute_tax_id()
File "/opt/odoo13/odoo/addons/sale/models/sale.py", line 1048, in _compute_tax_id
line.tax_id = fpos.map_tax(taxes, line.product_id, line.order_id.partner_shipping_id) if fpos else taxes
File "/opt/odoo13/odoo/odoo/fields.py", line 1114, in __set__
new_records.modified([self.name], before=True)
TypeError: modified() got an unexpected keyword argument 'before'

Avatar
Discard
Best Answer

It seems you installed odoo 13 in your new server (with all changes after your old version installed in previous server)and restored the dump from old odoo 13.

 As I can see your issue in sale_coupon so what you can do is to duplicate your live DB to Test and then try to upgrade the sale_coupon module and then try to add product to the cart and see if you will get the error.

Avatar
Discard
Best Answer

sale_coupon module, needs to be migrated too.  There is included an override to base method 'modified' that doesn't include before argument.

def modified(self, fnames, create=False):

Avatar
Discard
Related Posts Replies Views Activity
3
Jan 24
1510
1
Mar 24
994
2
Jun 23
1611
3
Nov 19
2099
3
Nov 19
7943