Permalink
Browse files

[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
  • Loading branch information...
GabbasovDinar authored and mart-e committed Jun 29, 2018
1 parent 993860e commit 9e0906b3ed98f93902f8be5c4046eeaffb587b83
Showing with 2 additions and 1 deletion.
  1. +1 −1 addons/point_of_sale/static/src/js/screens.js
  2. +1 −0 addons/point_of_sale/tests/test_frontend.py
@@ -2223,7 +2223,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;
},
});
@@ -274,6 +274,7 @@ def test_01_pos_basic_order(self):
'type': 'cash',
'company_id': main_company.id,
'journal_user': True})],
'use_pricelist': True,
'available_pricelist_ids': [(4, pricelist.id) for pricelist in all_pricelists],
})

0 comments on commit 9e0906b

Please sign in to comment.