summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
AgeCommit message (Collapse)Author
2018-09-24[FIX] web: graph_renderer: show graph titleAdrien Dieudonne
Since odoo/enterprise@e3b0d2a, the title wasn't set anymore. This logic is now moved in the graph renderer to be able to set a title in every graphs. For now, we only use the title attribute for pie charts embedded in dashboard views. Additional tests has been added in 'web_dashboard' (enterprise).
2018-09-21[IMP] web: add an option to hide archive option in kanban columnsThibault Delavallée
Currently kanban columns propose an Archive / Unarchive option if the records model has an active field. It allows to directly archive or restore all records belonging to that column. It is currently not possible to control whether this option is present or not as it only depends on the active field being defined on the model. In some specific cases we want to be able to hide this option even if the active field exists. For example future commits will hide this option for leads (crm.lead) as business flow goes through marking them as won or lost instead of archiving / restoring them. This commit adds support of a new archivable parameter when defining the kanban view that hides the archive buttons if it is set to False. Default value is true so that current behavior is kept as it is by default. Doc and tests are added. This commit is linked to task ID 1880051 and PR #26977.
2018-09-20[IMP] web: no dropdown icon ('v') next to app menu iconAlexandre Kühn
Task-ID 1878649
2018-09-20[REF] web: Use graph renderer to render pie_chart widgetAdrien Dieudonne
Before this rev., the pie_chart widget was rendered from scratch with nv.d3 and we had duplicated code. In comparison mode, two widgets were instancied and it was a bit difficult to synchronize the size of these svg graphs. nv.d3 graphs are attached when the dom is ready because it needs to calculate the available space. UI bugs can appear if the dom changes... .update() must be executed on the graph to avoid this as we already do in graph renderer. So now, the rendering of the pie_chart widget is done by the graph renderer. As comparaison mode is supported by the rendering, only one widget needs to be instancied. Task ID: 1835644
2018-09-18[FIX] web: do not re-render app menu on every app clickAlexandre Kühn
This was necessary because the rendering was always determining which app item should have the class 'active'. This was an issue with the 'Click Everywhere Test': at the beginning of the script, it gets the jQuery element that matches all nodes `a.o_app` in the app menu. When an app item is clicked, it re-renders the whole app menu, so that older referenced nodes are detached from the DOM. As a result, clicking on them no longer works, because it never triggers the MouseEvent `click .o_app`. This commit fixes the issue by rendering the whole app menu once. When an item in the app menu is clicked, it dynamically changes the `active` app.
2018-09-17[IMP] web: new navbar in communityAlexandre Kühn
The navbar in community now looks more like the navbar in enterprise. Here is a sum-up of the changes in community: - The navbar in community is now in blue, instead of black. - No more app list that almost fills the whole navbar: there is now an "Apps Menu" in the left-most side of the navbar. - No more sidebar for the menus inside an app: those menus are now located in the middle part of the navbar. The navbar in community does not support mobile (< 768px width), but it should still somewhat usable on most mobile devices. As for the website navbar, it has been unchanged and should still support mobile layout. Task-ID 1878649
2018-09-17[FIX] web: datepicker: correctly use libAaron Bohy
The datepicker lib has been updated to tempus dominus (BS4) recently, but our code hasn't been adapted correctly to the requirements of the new version of the lib. As a consequence, the datepicker didn't close itself when the input was focused out anymore. This required a slight change in the DomainSelector widget as it produced a crash when a focused datepicker widget is removed from the DOM (before the datepicker is destroyed), e.g. by a call to html() on one of its parent. Task 1878254
2018-09-13[FIX] mail, web: open systray menu dropdown in mobile.Hiral Bhavsar
Before this commit, it was not possible to open systray menus in mobile. This is due to popper.js that is wrongly dynamically positioning the dropdown menu. This commit fixes the issue by disabling dynamic positioning by popper.js for the systray menus, so that it uses ou custom styles for dropdown menu. Closes #26434
2018-09-13[IMP] mail, web: attachments & messages in debug actions.ThanhDodeurOdoo
- added two new actions to the form view debug action list, both opens list (+ form) views of messages and attachments respectively for which the domain is restricted to the current record. task: 1860031
2018-09-04[IMP] web: review time range menu renderingMathieu Duckerts-Antoine
This commit changes two things in the time range menu appearance: - the order of range options - the spacing between them (now two different groups are separated by an empty lines) Some tests had to be changed accordingly.
2018-09-04[FIX] web: fix time range menu button style in mobile modeMathieu Duckerts-Antoine
The search view in mobile mode has been redesigned and looks a bit different from the search view in desktop mode. This commit adapts the time range menu appearance in mobile mode.
2018-09-04[REF] web: improved fix from 'Edit View: X' (017e7132)Alexandre Kühn
Revision on https://github.com/odoo/odoo/commit/017e71322b6b7f0c232f0d66ba659a5972fc3534 Commit above correctly fixes an issue with 'Edit View: X' menu item in the debug manager, in which the name of the view was missing. To do so, it lets the controller be aware of the name of the view, so that it can be used in the template of the debug menu. However, we think there is a much better solution to fixing this issue: since the debug manager has knowledge of the view action, we can extend this object with the name of the view. This is exactly what this commit does: extend the action view object so that it knows the name of the view. That way, the template is much more readable, as `view.displayName` is more meaningful than `controller.viewName`. Task-ID 1878254
2018-09-03[FIX] web: display view name in debug menu ('Edit View: X')Alexandre Kühn
Revision on https://github.com/odoo/odoo/commit/f7fbe8adffb1ee585c8171f6c86d38145c11848d The commit above wrongly assumes that the object 'view' is an instance of the view class. As a result, the property `display_name` was undefined. This commit fixes the issue by letting the controller remember the name of the view in a similar was as the type of the view. That way, the name of the view can simply be retrieved from the instance of the controller class. Task-ID 1878254
2018-08-31[FIX] web: make 'Edit View: X' translatableAlexandre Kühn
Revision on https://github.com/odoo/odoo/commit/4f6f562c973ce2efd5631ea0e249e75d94cac104 Contrary to what the commit above said, the string was not translatable. This commit fixes the issue by using the property `display_name`, which is the translatable equivalent string of `_.str.capitalize(type)`.
2018-08-29[IMP] web: New test to test Odoo menusChristophe Monniez
This commit adds a new js test in web that enters each app and click on each view switcher, each menu and each search filter. This test is tagged '-standard' and 'click_all' as it could last a long time, that way it's not executed by default. It could also be started from the browser console with 'clickEverywhere();'.
2018-08-27[FIX] web, *: use correct DOM for m2m tagsqsm-odoo
* mail, calendar - Fix traceback when clicking on a tag without color field (introduced in recent changes) - Properly allow to delete tags on firefox (a button obviously cannot contain another button) Closes https://github.com/odoo/odoo/pull/26547 Thanks to @hbh-odoo
2018-08-22[FIX] project: kanban examples modalDemaret Rivarola Johan
- tab not showing: fade animation was causing the issue. - redirection to home: button instead of anchor to avoid redirection to target href Task #1878160
2018-08-20[FIX] web: restore many2manytags colorpicker dropdownDeep Patel
Bug revealed with BS4.
2018-08-19[FIX] web: BS4, restore statusbar "more" dropdownSiddarth Gajjar
2018-08-17[IMP] web,various: Add 'Remove' button to view dialogs opened from x2m fieldsDharmraj Jhala
Currently, to remove link of x2m field from any record, sometimes there's no way. For example, if we are on mobile and open any Quotation, it's linked quotation lines are automatically converted in kanban, and there is no way to delete a line from that quotation. However, in some of the manually designed kanban, there is special 'x' for removing / unlinking x2m record, for example, Contacts of Partner. This commit makes the behavior more consistent. During edition (mobile and desktop), if a view dialog is opened on click of x2m field, it will have one 'Remove' button (based on user rights) on right side of dialog footer, allowing users to delete / unlink the record. Moreover, in mobile, the modal is opened fullscreen, with sticky header and footer. Related Task# : 31641 Closes PR #15857 Co-authored-by: Mohammed Shekha <msh@openerp.com>
2018-08-17[FIX] web: BS4, restore calendar view's sidebar filters checkboxHiral Bhavsar
Currently cross sign not appearing inline to checkbox while hovering sidebar filters and checkbox tick/untick not working properly.
2018-08-17[FIX] web: no_open in field options no longer workingSimon Lejeune
example: <field name="product_id" options="{'no_open': True}" readonly="1"/> This has been broken by rev. 43d21dd9c due to misplaced parentheses (an empty object in javascript being truthy).
2018-08-15[IMP] hr_expense: misc bugfixes and usability cleaningFabien Pinckaers
Search, form views and menu cleaned Hide attachment button when you can not attach (record not created) Allow to submit multiple expenses of different payment mode list: show creation date on reports, accounting date for accountants
2018-08-14[IMP] base: remove carret on debug mode iconFabien Pinckaers
2018-08-14[IMP] web: improve mobile view switcherFabien Pinckaers
2018-08-14[IMP] web: Better view fields for debug mode.Nhomar Hernández
When you need to fast review all properties of a model, mostly the fields it is really anoying go to all the technical path which has all the information already. The previous "View Fields" action was very messy. My proposal is simply instead use a dialog which is almost useless open a normal vie (a little improved) which allow us audit completely everything. Remove the previous dialog, this will not be used anymore. Closes #26364
2018-08-14[IMP] web: new TimeRangeMenu widget in search viewMathieu Duckerts-Antoine
This commit introduces a new widget 'TimeRangeMenu' used in the search view. It allows a user to easily: - search data with a given date or datetime field value in a specified period of time - compare the data of interest with data of the previous period or the previous year. The time range menu is available in the search view when one of the four following view types is instantiated: graph, pivot, cohort, or dashboard. Task Id: 1835644
2018-08-13[IMP] web: add more filtering and sorting options on ModelFieldSelectorChristophe Matthieu
A new `filter` option has been added to filter fields with an optional function. A new `order` option has been added to sort displayed fields. The `followRelations` options have also been extended to take a function.
2018-08-10[IMP] web: add colorpicker dialogKishan Gajjar
2018-08-10[MERGE] forward port branch saas-11.4 up to edd586002e9Christophe Simonis
2018-08-09[MERGE] forward port branch saas-11.3 up to af35aea6b0dChristophe Simonis
2018-08-07[MERGE] forward port branch saas-11.2 up to d7e2c767ce5Christophe Simonis
2018-08-07[MERGE] forward port branch 11.0 up to 3513e599a7aChristophe Simonis
2018-08-07[FIX] web: re-add title attribute for many2many tags that got lostAndreas Perhab
Co-authored-by: Nicolas Martinelli <nim@odoo.com> Closes #25693
2018-08-06[IMP] base: improve kanban of modules, cards not clickable (top-right menu)Fabien Pinckaers
[NEW] base: show enterprise module, with an 'upgrade' button [IMP] *: some modules renaming, and improved copywriting of manifest [IMP] *: utm on links to odoo.com
2018-08-03[IMP] Portal - Share link : Easily share the url of a documentMitali Patel
Purpose ======= - Quickly share the url to someone else (a client, a colleague,...) - Ensure that the recipient can access at least the portal view of the shared record. - Typically used when a client cannot retrieve the mail to access his order. The share link can be used in this case. Specifications ============== For any object inheriting form portal.mixin: - Add a button SHARE (not visible in edit mode) - When clicking on this button, a popup opens with : - A warning message for tasks and projects only (see below) - the link (like in gmail) that can be copied - Recipients - mail composer (with preselected template) ==> see below - button [Send Link] [Copy Link] Discard - After sharing document, put internal note like "Document shared to xyz,...." with template message - Anyone with the link, even anonymous user (not logged in) can have access to the document with the access token provided in the url. Impacted models: - account.invoice (Community) - project.project (Community) - project.task (Community) - purchase.order (Community) - sale.order (Community) - helpdesk.ticket (Enterprise) Warning messages and access rules: Allowed : - SO canceled or draft will be accessible with the link with access_token - If the customer account is B2B (signup not enabled), the recipient will anyway see the document as the user specifically wants the recipient to see the document. Restrictions : - For Project and Task, if the privacy is not public, then, there is a contradiction between the access_token mechanism and the privacy of the document. - A warning message will be displayed in the share wizard to inform the user if the document cannot be visible by the recipients and to ask him to set the privacy to 'Visible by following customer'. The send button will, in that case, be hidden. - To avoid to block the share for a new project, default privacy value is now set to 'Visible by followong customer' Technical implementation ======================== - Move the access_token mechanism (field + methods + mail controller) to the portal.mixin to be able to use it in a generic way for each object inheriting the portal.mixin - Generalise a part of the _*model*_get_page_view_values method into a single one in portal - Generalize the _*model*_check_access into the portal controller of the portal module - Remove the init_column + default value for the access_token > old records have an access_token, > new one won't but it will be generated on demand via the get_access_token Done for performance reasons - Add share button into action menu separately. + kanban view context menu (except for task and project where button not in action menu but 'simple' button for task and project because other modules already provide action to send documents by email, which is not the case for project and task.) - Add a sign_token used to authentify the recipient in the portal view chatter, if any. The message will be posted as if the user was logged in. - Set the _get_share_url as private for security reason - Add a redirect parameter to _get_share_url to get If false : The direct portal view url If True : The redirect url (mail/view/?) - Cleaning up unnecessary code - Bug fix : - Before, if user was not logged and record had partner_id, if partner id was null, post message was done as admin. Now, the post message is done as public user. - If the user had an uid but had no access_token, he could be able to gain the access token of the record. check_access_rights was missing in the get_access_action. Task ID : 30985 Closes #25629
2018-08-03[FIX] base, mail : fix typo in bel(l)owPratima Gupta
Below takes only one 'l', not two. Fix typo in * tooltip of create button; * mail demo data; * comment in stock This commit is related to task/bug ID 1870964 and closes PR #26099.
2018-07-31[FIX] web: BS4, review selected dropdown item styleqsm-odoo
With BS4, I had to change the dropdown structure and with it the messy way we handled "selected" items. Sub-filters items were still not adapted correctly: use the "selected" class on dropdown-item elements, not one of its parent.
2018-07-27[REF] web: BS4, review kanban designqsm-odoo
2018-07-27[REF] web_editor, *: BS4, restore preservation mixins and adapt modalsqsm-odoo
* web, website
2018-07-27[REF] *: BS4, replace 'btn-xs' by 'btn-sm'qsm-odoo
In a previous commit, we removed the use of the 'btn-sm' classes as we used it everywhere for default-size buttons instead of customizing the size of those default-size buttons directly. This commit proves it was even more necessary as the 'btn-xs' class does not exist anymore in BS4 and we so can use the 'btn-sm' class instead.
2018-07-27[REF] web, *: BS4, adapt radio button structureqsm-odoo
Use BS4 *custom* structure for radio buttons to allow customizing their style and have cross-browser style.
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] web, *: BS4, use custom BS4 checkbox everywhereqsm-odoo
Before this commit, Odoo used checkboxes in three different ways: - A simple <input type="checkbox"/>, mainly in the frontend. The style is browser dependant. - Same as above but with the BS3, checkbox structure. The style is still the same, but the alignement is supposed to be better (which is not always the case). - The Odoo official structure: ``` <div class="o_checkbox"> <input type="checkbox"/> <span/> </div> ``` which allows to have a cross-browser checkbox style and correct alignements. The goal after this commit is to only use the BS4 *custom* checkbox structure to achieve the same goal as our official structure (and remove that one): ``` <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" id="customCheck1"> <label class="custom-control-label" for="customCheck1">...</label> </div> ``` /!\ Labels are now required (use a zero-width space if necessary)
2018-07-27[REF] *: BS4, adapt tables (and list view)qsm-odoo
`table-condensed` -> `table-sm` Also SCSS variables were renamed. Also restore list view design.
2018-07-27[REF] *: BS4, adapt formsqsm-odoo
The 'form-horizontal' class have been removed; the '.form-group' elements must now use the 'row' class for an horizontal layout. The 'control-label' class was renamed to 'col-form-label'. The 'help-block' class was renamed to 'form-text'. The 'has-error' and 'has-success' classes have been removed and replaced by a new system using the :valid and :invalid pseudo-classes, when a parent has the 'was-validated' class. While this system is great, it is not straightforward to use it in Odoo. Fortunately, BS4 provides the 'is-valid' and 'is-invalid' classes as fallback. This commit replaces the 'has-error' and 'has-success' classes by 'o_has_error' and 'o_has_success' classes (for JS compatibility) and use the 'is-*' fallback classes. (The 'has-warning' class has no equivalent but was unused in Odoo anyway).
2018-07-27[REF] *: BS4, replace img-rounded/img-circle classesqsm-odoo
'img-rounded' -> 'rounded' 'img-circle' -> 'rounded-circle'
2018-07-27[REF] *: BS4, adapt input-group structureqsm-odoo
The input-group-addon class has been replaced by a combination of the input-group-text and the input-group-append/prepend classes. The input-group-btn class is replaced by the input-group-append/prepend classes.
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