Skip to content

Commit

Permalink
[FIX]sale_coupon_delivery_auto_refresh: set context only for coupons
Browse files Browse the repository at this point in the history
  • Loading branch information
toita86 committed Sep 11, 2024
1 parent 8ed8a5c commit fe1a6b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions sale_coupon_delivery_auto_refresh/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ def _auto_refresh_delivery(self):
Override to change context value to refresh coupons after creation
delivery line
"""
self = self.with_context(
skip_auto_refresh_coupons=False, auto_refresh_delivery=True
)
self = self.with_context(skip_auto_refresh_coupons=False)
return super(SaleOrder, self)._auto_refresh_delivery()

def _create_delivery_line(self, carrier, price_unit):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ def setUpClass(cls):
}
)
cls.env["ir.config_parameter"].sudo().set_param(
"delivery_auto_refresh.set_default_carrier", 1
"delivery_auto_refresh.sale_auto_assign_carrier_on_create", 1
)
cls.env["ir.config_parameter"].sudo().set_param(
"delivery_auto_refresh.auto_void_delivery_line", 1
"delivery_auto_refresh.sale_auto_void_delivery_line", 1
)
cls.env["ir.config_parameter"].sudo().set_param(
"delivery_auto_refresh.refresh_after_picking", 1
"delivery_auto_refresh.sale_refresh_delivery_after_picking", 1
)
cls.env["ir.config_parameter"].sudo().set_param(
"delivery_auto_refresh.auto_add_delivery_line", 1
"delivery_auto_refresh.sale_auto_add_delivery_line", 1
)
coupon_program_form = Form(
cls.env["coupon.program"],
Expand Down

0 comments on commit fe1a6b9

Please sign in to comment.