[FIX] sale_timesheet: fix the upsell activity creation
Currently the 'upsell' activity generated when the delivered quantity of the SOL is >= 100% instead of > 100% so in this commit, if SOL is > 100% then only the upsell activity should be generated. also fix the upsell_threshold value to fix the test case. Taskid: 2642872 Closes: #76312 X-original-commit: ee9082b9d93b4f98a9a13694fb3b803cd7d1ac6c Part-of: odoo/odoo#76967
This commit is contained in:
@@ -89,7 +89,7 @@ class SaleOrder(models.Model):
|
||||
sol.qty_delivered,
|
||||
sol.product_uom_qty * (sol.product_id.service_upsell_threshold or 1.0),
|
||||
precision_digits=precision
|
||||
) >= 0
|
||||
) > 0
|
||||
)
|
||||
|
||||
def action_view_timesheet(self):
|
||||
|
||||
@@ -25,7 +25,7 @@ class TestUpsellWarning(TestCommonSaleTimesheet):
|
||||
"""
|
||||
# 1) Configure the upsell warning in prepaid service product
|
||||
self.product_order_timesheet1.write({
|
||||
'service_upsell_threshold': 0.6,
|
||||
'service_upsell_threshold': 0.5,
|
||||
})
|
||||
|
||||
# 2) Create SO with a SOL containing this updated product
|
||||
|
||||
Reference in New Issue
Block a user