summaryrefslogtreecommitdiff
path: root/addons/base_import/static/src
diff options
context:
space:
mode:
authorJoren Van Onder <jov@odoo.com>2017-05-22 13:30:10 -0700
committerJoren Van Onder <jov@odoo.com>2017-05-22 13:47:21 -0700
commitf5f60599bfd49df5904f971b0f1bbb37a96ccdbe (patch)
tree086d3987da31097f7a5ad1c3a168388c4665596b /addons/base_import/static/src
parent4308e692c5c3ca126f2eef982db85f2c51aed0e3 (diff)
[IMP] point_of_sale: rewrite price access control logic
Introduced at 4e715dae94dc956dbfacfe3974f42ade86ad2c2a. Instead of doing hacky things like self.pos.gui.screen_instances... in the cashier widget to force the numpad UI to rerender itself it's better to use Backbone.js because: 1. we're already using it everywhere else to handle UI updates 2. easier to extend for eg. adding more cashier related access rights To do so cashier is turned into a Backbone attribute on PosModel. All references to the cashier property are replaced with get_cashier to ensure the Backbone attribute is used. Note that this is not necessary for the user property on PosModel. This contains the actual user logged into Odoo and thus never changes. This also removes the check in set_unit_price because: 1. it was wrong to begin with (no price change when restrict_price_control is enabled or you're a manager?) 2. even if fixed it would break the following for non-managers: 1. tipping 2. fix_tax_included_price
Diffstat (limited to 'addons/base_import/static/src')
0 files changed, 0 insertions, 0 deletions