summaryrefslogtreecommitdiff
path: root/addons/lunch/static/src/js
AgeCommit message (Collapse)Author
2019-03-25[MERGE] forward port branch saas-12.2 up to 230ad8c381eChristophe Simonis
closes odoo/odoo#32088 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-19[FIX] lunch: make it work on mobilePierre Paridans
This module didn't worked on mobile: user cannot select the products or see their cart. This commit reworks the LunchKanbanWidget template and introduces a dedicated template for mobile. This template introduces a button at the bottom of the screen to toggle the "cart" widget on mobile (hiding it by default). It tries to make the best use of the existing Bootstrap classes allowing to have a more responsive layout and reducing the custom CSS required by this module (both in desktop and in mobile). This commit adds a decent JS tests-suite (mobile & desktop) to this module as the existing one left substential parts of the UI untested (opening wizard when clicking on a kanban record, cart's lines content, clear cart button, widget structure and content based on the state...). Those tests are also less based on DOM nodes order/tag names and use instead dedicated classnames. It also modifies the LunchKanbanRecord click handling to had a dedicated event handler instead of overriding the default _onGlobalClick() and make it more testable. Task ID: 1945032
2019-03-18[FIX] lunch: remove unused codePierre Paridans
2019-03-13[FIX] lunch: rpc call cannot be performed in Widget.init()Pierre Paridans
The Widget's init function is synchronous. The 'then' will execute after the end of the function so self.group_portal_id will not be set immediately. Also, RPC's in the init function is really not a good idea, it should be putted in the willStart. Original commit: https://github.com/odoo/odoo/commit/855c6dac25fccaf9312543022001ed0b360d6e13 closes odoo/odoo#31508 Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-03-06[REF] lunch: adapt code after jQuery updateVincent Schippefilt
Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-02-13[IMP] lunch: use searchPanel in New Order kanban viewAaron Bohy
This rev. updates the 'New order' kanban view to make it use a searchPanel. Minor changes on the custom lunch_kanban view were necessary to - obtain the desired layout, - correctly combine the lunch widget (top bar) domain with the searchPanel domain. Part of task 1892462 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2019-02-13[REF] lunch: linting pass on lunch_kanban widgetsAaron Bohy
2019-01-18[IMP] lunch: automatize lunch ordersRomainLibert
We would like to automatize lunch as currently all orders are manually ordered and validated, and a cash move has to be manually created each time you want to credit the wallet of some user. 1/ In this commit we add a new widget that comes with the kanban view and will allow to take orders in a friendly manner. 2/ We also add a lunch.supplier model this also allows you to configure an automatic ordering via email. 3/ Introduces new lunch.location model to replace res.partner on suppliers 4/ New mail template for automatic ordering 5/ Add the concept of new products (mark a product as new until some date) 6/ The toppings are now defined by product category 7/ Lunch.order removed, lunch.order.line renamed into lunch.order 8/ New SQL report to get the wallet content (aggregate of lunch.cashmove and lunch.order) 9/ New setting to allow negative wallet (aka overdraft) 10/ Application now remembers what notes and toppings you last ordered with your product 11/ You can change your location using the widget on the kanban view 12/ Edition of the order can be done until the order is arrived TaskID: 1856876 TaskID: 1916105 closes odoo/odoo#30028
2019-01-08Revert "[IMP] lunch: automatize lunch orders"Yannick Tivisse
This reverts commit f727b8f0b57aad49f2ea8c54600ab73bbd02570f.
2018-12-04[IMP] lunch: automatize lunch ordersRomainLibert
We would like to automatize lunch as currently all orders are manually ordered and validated, and a cash move has to be manually created each time you want to credit the wallet of some user. In this commit we add a new widget that comes with the kanban view and will allow to take orders in a friendly manner. We also add a lunch.supplier model and an integration with the hr module in order to filter what products you can order depending on your working location, this also allows you to configure an automatic ordering via email. TaskID: 1856876
2017-04-19[FIX] lunch: adapt the code to new viewsMartin Geubelle
We also adapt the code to comply to the new guidelines and we have added some tests.
2017-04-11[FIX] *: apply changes from web_studioAaron Bohy
The new views and widgets (at least some of them) first landed in web_studio (v10), and they we moved later to web, so changes in web_studio need to be applied in web.
2017-04-11[REF] web,*: improve the way field_utils are doneGéry Debongnie
We replace a bunch of formatting and parsing functions by an object (parse or format) which can be used to dispatch on the correct type. It allows us to remove the format_field and parse_field functions. Also, we camelcase our new code and add some comments.
2017-04-11[REF] web, *: redesign all JS viewsGéry Debongnie
This commit introduce a full redesign of all JS views. We started basically from scratch. The goal was to unify all the various views under a common framework, to make them testable, to make then usable in different conditions (in studio, or in the frontend), and to make our lives easier. Some important points are: - we introduced new coding guidelines (camelCase, 80 chars width, ...) - we have a brand new testing framework (still QUnit based) - kanban view moved to the web addon - calendar view (formerly web_calender) moved to web as well - the tree view was removed - all new code should be documented We hope that this code is the start of a new era for the Odoo web client, we want to have a high quality codebase, well documented, well tested, well designed. Work done by the framework team: mostly aab, ged, chm, dmo, qsm
2016-11-03[IMP] lunch: new lunch widgetNicolas Martinelli
The JS widget is simplified, which a cleaner approach. For the rendering part: - the server reads the data - the JS widget formats/organizes the data - the template renders the data prepared by the widget Quick summary of the modifications: 1. The associated field is a text field which contains JSON-encoded data. The data are read server-side, and not client-side anymore. 2. The widget is an AbstractField, no need of ReinitializeWidgetMixin anymore. No use of the FieldMonetary widget directly, but use a similar format_value instead (inspired by ShowPaymentLineWidget). 3. Data formatting (call to format_value) is done in the widget, not in the template anymore. This seems to be the standard way of doing, since lunch was the only module where format_value was in the template and not in the widget. 4. The addition of an order line is cleaner since all necessary data are prepared server-side.
2015-09-11[REF] lunch: XML/LESS/JSqsm-odoo
CSS to LESS Adaptation to new webclient
2015-04-23[MIGR] lunch: migration to the new API, cleaning and newNicolas Martinelli
widget for displaying previous orders. Detailed changes : - previous order is not a computed field, with its own custom widget that has been designed according the new spec for widgets; - useless wizards have been removed, and replaced by some server actions that perform the same action with less code and views; - removed deprecated or incomplete reporting; - some renaming to follow the new specifications of module coding