Merge lp:~openerp-dev/openobject-addons/6.1-opw-580254-msh into lp:openobject-addons/6.1
Status: | Needs review |
---|---|
Proposed branch: | lp:~openerp-dev/openobject-addons/6.1-opw-580254-msh |
Merge into: | lp:openobject-addons/6.1 |
Diff against target: |
41 lines (+13/-10) 1 file modified
point_of_sale/static/src/js/pos.js (+13/-10) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-580254-msh |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Core Team | Pending | ||
Review via email: mp+130342@code.launchpad.net |
Description of the change
Hello,
Fixed the issue in POS, error comes 'result[0] is undefined' or 'unexpected token u' or 'JSON.parse: unexpected character'.
Demo :- It can be easily faced with demo data in multi company environment, if you have miss-configured sale.shop, there is record rule ['|',('
1. Settings => Users => Users => Multi companies is enabled.
2. Create shop which breaks above record rule.
Now go to POS front end, it will raise an error of 'result[0] is undefined' first time and then each time will raise 'unexpected token u' or 'JSON.parse: unexpected character'.
Expected :- No doubt there is wrong configuration but Web-Client should not throw error due to wrong configuration.
Reason :- Due to wrong configuration record rule is not satisfied so when Open POS front end it will tried to serach and read sale.shop and will not get any shop so first time it will raise 'result[0] is undefined' while try to set company_id, then each time when you open POS front end it will raise JSON.parse error because no shop found in result from search_read so 'undefined' is set in Store for shop.
Thanks.
Unmerged revisions
- 7033. By Mohammed Shekha(Open ERP)
-
[FIX]Fixed the issue of POS break in multi company environment, when there is misconfiguration, as well as pos order line is not going to save because name is missing in pos order line.