[IMP] point_of_sale: display pricelist button only if enabled

If the option use_pricelist is disabled, no need to display the button

Closes #25540
This commit is contained in:
GabbasovDinar
2018-09-28 15:01:46 +02:00
committed by Gert Pellin - GPE
parent a3dc91a0db
commit 7a417e1735
2 changed files with 2 additions and 1 deletions
@@ -2232,7 +2232,7 @@ define_action_button({
'name': 'set_pricelist',
'widget': set_pricelist_button,
'condition': function(){
return this.pos.pricelists.length > 1;
return this.pos.config.use_pricelist && this.pos.pricelists.length > 1;
},
});
@@ -273,6 +273,7 @@ class TestUi(odoo.tests.HttpCase):
'type': 'cash',
'company_id': main_company.id,
'journal_user': True})],
'use_pricelist': True,
'available_pricelist_ids': [(4, pricelist.id) for pricelist in all_pricelists],
})