summaryrefslogtreecommitdiff
path: root/addons/lunch/static/src
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-13[MERGE] forward port branch saas-12.2 up to c9f832d9f03Christophe Simonis
closes odoo/odoo#31790 Signed-off-by: Christophe Simonis <chs@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-28[FIX] lunch,web: display correctly list's cell with text overflowPierre Paridans
Installing the 'lunch' module add css rules to the generic list view styling, modifying the styling of all the list views by the simple fact of being installed. The goal of those rules is that in list view a table cell with the o_text_overflow class should still be displayed as a table-cell (and not a block/inline-block). Without the lunch module a list view's cell with the o_text_overflow class is narrower and break the alignment between this column and the headers. This commit moves the necessary rule (display property) to the web module and apply them globally. Remark: module's css rules shouldn't override globally the one from 'web'. Original commit: https://github.com/odoo/odoo/commit/855c6dac25fccaf9312543022001ed0b360d6e13 closes odoo/odoo#31506
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.
2019-01-08Revert "[IMP] lunch: reintroduce lunch_alerts, change display of wizard"Yannick Tivisse
This reverts commit 6f5dc5733fa387a410166afb24339bb2a4a88019.
2018-12-06[IMP] lunch: reintroduce lunch_alerts, change display of wizardRomainLibert
We want to be able to use alerts in order to display a message to the users. We want to have a minimal display in the wizard. We want to link the toppings to the categories instead of the suppliers. closes odoo/odoo#29301
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
2018-11-21[FIX] lunch: BS4 previous order not just one columnNicolas Lempereur
In bootstrap 4 grid are based on flex and so flex items require a flex container parent. opw-1911572 closes #28905
2018-07-27[REF] *: BS4, 'pull-left/right' -> 'float-left/right'qsm-odoo
2018-07-27[REF] *: BS4, adapt the badge component structureqsm-odoo
The '.badge' elements must now also use the 'badge-pill' class to get the same style as before as '.badge' elements without it are meant to replace the old 'label' component.
2018-07-27[REF] *: BS4, adapt col-related classesqsm-odoo
col-lg-* -> col-xl-* col-md-* -> col-lg-* col-sm-* -> col-md-* col-xs-* -> col-* col-lg-offset-* -> offset-xl-* col-md-offset-* -> offset-lg-* col-sm-offset-* -> offset-md-* col-xs-offset-* -> offset-* col-lg-pull-* -> order-xl-1 col-md-pull-* -> order-lg-1 col-sm-pull-* -> order-md-1 col-xs-pull-* -> order-1 col-lg-push-* -> order-xl-2 col-md-push-* -> order-lg-2 col-sm-push-* -> order-md-2 col-xs-push-* -> order-2
2018-07-04[FIX] Syntax of icons (#25577)kujiu
Description of the issue/feature this PR addresses: Accessibility improvements forbids the use of the syntax `<i class="fa fa-check"/> Some text` to create a labelled icon. But, by this, some fonts are changed. Desired behavior after PR is merged: The old syntax can be used.
2018-06-22[IMP] Improve compatibility with screen readers (accessibility) (#24574)kujiu
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable. This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader. * [IMP] Labels must have a for attribute. Improve accessibility. * [IMP] Better error message when trying to read a missing cached value * [FIX] Add some aria-label and title attributes for screen readers. * [FIX] Template name is not included in the error message in case of SyntaxError in QWeb * [FIX] Improve the Tour failed at step error message to be more explicit. * [IMP] Add aria-labels * [FIX] Add missing aria-label on failing test * [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all. * [IMP] Color names on kanban views and many2many tags * [IMP] Add some checks on views for accessibility. * [IMP] Add `alt` attribute on `img` tags. * [IMP] Add aria-label and title on non-described icons * [IMP] Add button role to widgets with btn class * [IMP] Translate aria and formatted attributes. * [IMP] Remove wrong aria-labelledby * [IMP] Add menu role on dropdowns * [IMP] Buttons must be focusable * [IMP] Add aria attributes on progress bars * [IMP] Improve accessibility of basic widgets * [IMP] Change main layout to more semantic tags * [IMP] Add menuitem role when missing * [IMP] Remove wrong role='presentation' * [IMP] Improve accessibility of tab panels * [IMP] Add aria-invalid on invalid fields * [IMP] Add aria-sort on ordered columns * [IMP] Add role on alerts * [IMP] Use dialog role, header, main and footer tags for modals * [IMP] Add labels on o_status * [IMP] Improve accessibility of kanban view with feeds and articles * [IMP] Add alerts in case of new messages * [IMP] Add widget, navigation or img role to aria-labelled items
2018-04-18[REF] *: review scss variables handlingqsm-odoo
Unlike LESS, SCSS variables are not lazy loaded. Our system has thus to be updated. This commit creates new templates which are t-called in assets bundles (to replace the old less_helpers template): - web._assets_utils: regroups the mixins and functions which *can* (and so should) be available in every asset bundle - web._assets_primary_variables: regroups the variables (or mixins used as variables) which *can* (and so should) be available in every asset bundle - web._assets_secondary_variables: same as above but provides an environnement where all the 'primary' ones are accessible. This is for example useful to handle the community/enterprise split: // Community primary variables $o-pink-color: pink; // enterprise color $o-brand-primary: blue; // Enterprise primary variables $o-brand-primary: $o-pink-color; // Community secondary variables $o-my-darker-primary: darken($o-brand-primary, 5%); => If there was only one variable template, enterprise edition would have been able to define its primary color at the end but the darker primary would not have been updated. Using the "!default" system and putting enterprise definition above would not have solved the problem as the $o-pink-color would not have been accessible. - web._assets_backend_helpers: regroups the variables, mixins and functions which *can* (and so should) be available in the backend asset bundle only. This is especially (only?) useful for bootstrap variables overriddes. - web._assets_frontend_helpers: regroups the variables, mixins and functions which *can* (and so should) be available in the frontend asset bundle only. This is especially (only?) useful for bootstrap variables overriddes. Note: bootstrap variables are not accessible in any of those anymore. If you have variables that should depend on bootstrap, you have 3 solutions: - Find another way: your variable is probably useless, use bootstrap variables directly or create a variable that will influence the value of bootstrap variables. E.g. instead of declaring: `$myvar: $bootstrapvar * 3` and using $myvar alone, declare: `$myvar: 3` and use `$myvar * $bootstrapvar` where needed. - Declare a copy of the bootstrap variable and use that one. In that case, you should also force-set the real bootstrap one to be sure they match (this should be done in appropriate templates mentioned above). E.g. ``` $o-boostrapvar: 5; ... $boostrapvar: $o-bootstrapvar; ``` - Set your variable to null and set it to your bootstrap expression in the file you will need it (where bootstrap variables are accessible) without forgetting to add the !default flag to allow overriddes. ``` $myvar: null; ... $myvar: $bootstrapvar * 5 !default; ``` This commit also partly changes the variable names to follow the convention: $o-<app_id>-<name> where 'app_id' is the current's app name or a meaningful unique identifier ("theme" for all themes for example, as no multiple themes can be installed).
2018-04-18[REF] *: convert less content to scss contentqsm-odoo
Convert content so that the assets compile on app installation. The style is still broken after this as the variables/mixins/... are not defined in the right order (as it did not matter in LESS but does in SCSS). This commit basically changes: - Variables: @​var_hello -> $var-hello - Mixins: .mixin_world() {} -> @​mixin mixin-world {} - Classes used as mixin: .my_class() -> @​extend .my_class - Here there were no other solution than to convert the use of a mixin call by the use of an extend as a first approximation - LESS functions -> SCSS functions (e.g. fade -> rgba) - Move first variable definition before the variable is used - Still need to make sure last variable definition is at the right place
2018-04-18[REF] *: rename all LESS files to SCSSqsm-odoo
This is a simple renaming without adaptation.
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
2017-02-27[IMP] lunch: better layout for recommendationsFabien Pinckaers
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-06-19[FIX] Many2ManyTags and web_testsqsm-odoo
Adapt web_tests to the new many2manytag included in the tour widget_x2many
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
2014-11-05[MERGE] forward port of branch 7.0 up to 3e3e35eChristophe Simonis
2014-11-05[IMP] *: one Makefile to rules them all.Christophe Simonis
Create one unique generic Makefile to compile sass files.
2013-06-28[IMP] move html module description and iconAntony Lesuisse
bzr revid: al@openerp.com-20130628100441-swpanf2jwcojygh4
2012-11-05[Lunch]Arnaud Pineux
bzr revid: api@openerp.com-20121105160541-t8x8t7de2fjt0sq3
2012-11-02LunchArnaud Pineux
bzr revid: api@openerp.com-20121102130002-d33xd81hvgy4bblk
2012-11-02LunchArnaud Pineux
bzr revid: api@openerp.com-20121102101629-g5iktkcf8pbu1kyk
2012-11-02LunchArnaud Pineux
bzr revid: api@openerp.com-20121102081548-1ujcb6v6ivsx9dr5
2012-10-31LunchArnaud Pineux
bzr revid: api@openerp.com-20121031142448-4te52l1vfjtp5pqb
2012-10-31[IMP] CSS lunchFabien Pinckaers
bzr revid: fp@tinyerp.com-20121031102307-d4s8sq9v32poebzj
2012-10-30[MERGE]lunchArnaud Pineux
bzr revid: api@openerp.com-20121030084701-lgiss30ih4elg4hh
2012-10-26[CORRECT]LunchArnaud Pineux
bzr revid: api@openerp.com-20121026113901-9o8wi1v1k0j8coj4
2012-10-24[MERGE]Lunch_new applicationArnaud Pineux
bzr revid: api@openerp.com-20121024133918-qu0xha3fuaisc0va
2012-10-04[MERGE]Lunch_new applicationArnaud Pineux
bzr revid: api@openerp.com-20121004073156-asqlj77f8v3q9m58
2012-10-02[ADD] Lunch moduleArnaud Pineux
bzr revid: api@openerp.com-20121002072149-9gcyy64wap5z7b2h
2011-12-14Added modules icons for main appsMinh Tran
bzr revid: mit@openerp.com-20111214144815-itsfpfo68l2m0jnx