[FIX] sale: hide update_prices button correctly
Steps: - Active Pricelist - Create SO --> add some lines - Change Pricelist and remove lines Issue: - Button to Update prices is still visible Fix: - Button should not be visible as there are no lines closes odoo/odoo#73038 X-original-commit: aab38f9d52f8629eaea1a3725e4909ac5df1b067 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
@@ -471,7 +471,7 @@ class SaleOrder(models.Model):
|
||||
}
|
||||
}
|
||||
|
||||
@api.onchange('pricelist_id')
|
||||
@api.onchange('pricelist_id', 'order_line')
|
||||
def _onchange_pricelist_id(self):
|
||||
if self.order_line and self.pricelist_id and self._origin.pricelist_id != self.pricelist_id:
|
||||
self.show_update_pricelist = True
|
||||
|
||||
Reference in New Issue
Block a user