931595165d73488190cccf0b7349e09ba30a7637
This commit is a forward port from v16. It completes another commit that was done in master only: https://github.com/odoo/odoo/commit/7c415e972fa97ba52d8d5165fd47494965e3053d --- Module `pos_restaurant` synchronizes orders between different POS devices. It works by pushing order from POS to server and loading it back. This commit assures that loyalty fields are correctly prepared before returning values to js client. Specifically, many2one fields must be just ids [1] [2], and not `[id, name]`. Similar cleaning is already done in `pos_restaurant` module for `product_id` field [2]. To correctly implement this patch, empty `_prepare_order_line` is added to `point_of_sale` module to be sure that extension of that method in `pos_loyalty` is not ignored: the method in `pos_restaurant` didn't have `super` call and `pos_loyalty` module doesn't depend on `pos_restaurant` STEPS: * install pos_restaurant, pos_loyalty * prepare gift card * open pos, create order, apply gift card * switch to floor screen and then back to table (order) screen [1]: https://github.com/odoo/odoo/blob/c4b90db77705139333bdf5faf26b12fc120d1661/addons/pos_loyalty/static/src/js/Loyalty.js#L833 [2]: https://github.com/odoo/odoo/blob/c4b90db77705139333bdf5faf26b12fc120d1661/addons/pos_restaurant/models/pos_order.py#L76 closes odoo/odoo#111617 X-original-commit: 0cf1fb6cf9dad69d58939d735081428a5e1650f4 Signed-off-by: Trinh Jacky (trj) <trj@odoo.com> Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%