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'
Odoo is the world's easiest all-in-one management software.
 It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
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.
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):
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
Daftar| Post Terkait | Replies | Tampilan | Aktivitas | |
|---|---|---|---|---|
|  | 3 Jan 24  | 3237 | ||
|  | 2 Agu 25  | 2333 | ||
| 
            
                Multi Company Transfer
            
            
                    Diselesaikan
            
         |  | 1 Jul 25  | 1307 | |
|  | 1 Feb 25  | 2142 | ||
| 
            
                Webshop without Sales App
            
            
                    Diselesaikan
            
         |  | 1 Mar 24  | 2697 | 
