Commit Graph
10240 Commits
Author SHA1 Message Date
qsm-odoo 22c4311e28 [IMP] *: make customize dialog generic and improve options
* web, web_editor, website, website_theme_install, portal,
  theme_default, theme_bootswatch

The purpose of this task is to make the customize dialog as generic as
possible, that is theme-independant:

1) The design is now totally generic (Odoo visuals)
2) The XML definition is form-view like. This allows themes to extend
   the dialog without any risk of breaking the style and also allows to
   not care about lots of technical details.
3) New options have been included. Those were themes options that are
   now generic and which themes can simply adapt without touching the
   customize modal (navbar colors, footer color, navbar layout, fonts,
   body background, ...).

The color palette can now also be customized with user colors.

Using sass functionnalities, color palettes and fonts integration is now
a lot better.

Thanks to @qha-odoo for the original design.

task-31677
2018-08-10 16:49:29 +02:00
Martin Trigaux f7130556bb [REF] *: add support for RTL languages
מזל טוב

The direction parameter will now have a real impact on the web interface and
completly switch the direction of the interface.
Add the dependency rtlcss to switch the direction with a css postprocessor.

Two different assets will be generated for ltr or rtl
/web/content/<...>/web.assets_backend.0.css
and
/web/content/<...>/rtl/web.assets_backend.0.css
to be able to differentiate it easily

Adapt the css and views to be easier to switch direction

Render graph as it is, do not move y-axis right side, as per mathematical rule
value goes left from origin are considered negative, so keep graph as it is
for right to left language

add test cases for language direction specific assets bundle
if language direction is rtl then we also store css files in assets bundle
now we store two assets bundle, one for ltr and one for rtl language direction
test two assets bundles generated, also test two assets bundle generated for en_US and ar_SY
2018-08-10 16:32:50 +02:00
eco-odoo 89e358caa8 [FIX] onboarding: Fix/Update onboarding to v2.0
Specification
=============

- Fix lots of bug due to the BS4 migration
- Improve steps
- Validate some steps (Like the company configuration) in all the
  onboarding bars if done in one onboarding bar.
- Only animate the confetti one time if a step is done, instead of
  on each view loading

For more information, see: https://www.odoo.com/web#id=1869513&action=333&active_id=965&model=project.task&view_type=form&menu_id=4720
2018-08-10 16:08:47 +02:00
Kishan Gajjar 29f0c0a186 [IMP] web: add colorpicker dialog 2018-08-10 15:43:07 +02:00
Christophe Simonis 7499b47ffa [MERGE] forward port branch saas-11.4 up to edd586002e 2018-08-10 13:37:21 +02:00
Pierre Masereel f82421f930 [FIX] web: create links to objects when document ready
When we add the attributes 'res-id', 'res-model' and 'view-type' on an
element in a report, the element should be wrapped in a <a> tag that
give a link to the referenced object.

Because it doesn't wait the document is ready to select elements having
this attributes, it doesn't alway find some elements having those
attributes.

So we just wait the document to be ready to find the elements having
those attributes.
2018-08-10 11:25:02 +02:00
Christophe Simonis 7717f082c0 [MERGE] forward port branch saas-11.3 up to af35aea6b0 2018-08-09 19:33:32 +02:00
Adrian Torres a1bad2191c [IMP] pyjs: add date/datetime utilities
Introduce utilities to calculate the start / end of a period given a date or datetime object in the JS python interpreter.

This commit is the JS implementation of commit 960360afe4
2018-08-09 15:00:37 +02:00
William Henrotin 480184115d [ADD] base: report: qweb-text type
This commit adds a new ir.action.report type: qweb-text. It produces text files,
serves them with a text mimetype and these reports use the same rendering context
as the current other types (PDF and HTML).

This will be used in a following commit to produce ZPL scripts. Those scripts
are used for printing thermal label on Zebra printers.

task ID : 1837175
2018-08-09 14:33:03 +02:00
Christophe Matthieu 6448420c5d [IMP] bus: re-factoring of bus.bus (Longpolling and CrossTab)
The purpose of this change is to make the code clearer and testable.

In this change, the 'tab_manager' static object was merged with the bus
cross tab.

Cleaning was done to clearly define private and public functions as well
as handlers. The methods are documented and the constants are now defined
on the class. The bus use the service behavior with 'trigger_up'.

'bus.CrossTab' who extend 'bus.Longpolling' are instantiated by the
bus service.

The class is always instantiated with a parent, or root in the case of the website
(im_livechat), to use the ajax and localstorage services. So the behavior, perhaps
logger or redefined by the parents.
2018-08-09 02:31:59 +02:00
Christophe Matthieu 791c70b329 [FIX] web: in the test the mocked services use the tests features
Must move the service construction to intercept the request with the
test parameters
2018-08-09 02:31:59 +02:00
Christophe Matthieu a8e4e625f4 [IMP] web: remove useless service name
We use the registry keys as name for the services.
2018-08-09 02:31:59 +02:00
Christophe Matthieu cf4c4a11b7 [IMP] web: the service mixins _rpc method add the abort method
This change is usefull to convert the bus.bus into a sweet bus and cross tab bus service.
Actually, if we use the _rpc mixins in the bus, the long polling can't be abort, and
raise an exception.
2018-08-09 02:31:59 +02:00
Christophe Matthieu 693c771111 [IMP] web: abord the poll when destroy to avoid useless call
If the service bus are called and destroyed the rpc can be returned after, to
avoid a useless call to the database and unexpected behavior, we abort the
connection.
2018-08-09 02:31:59 +02:00
Yannick Tivisse 64f6e50d0c [FIX] web: Reset correctly the selection on reference fields
Purpose
=======

If the model on a reference fields is not modified from the interface
by the user but by the server, the selection is not correctly
recomputed on the interface.

Specification
=============

By calling super first on the '_reset' method, the new model
is taken into account when resetting the selection.
2018-08-08 17:35:34 +02:00
Deep Patel af1a935604 [IMP] web: Added help option in stat buttons. 2018-08-08 14:51:14 +02:00
Laurent Smet 10b9d06689 [ADD] account: allow forcing tax included tax in reconciliation widget
Before this commit, the only way to deal with the same tax either with price included or not was to duplicate it, one with the price included checked.

This commit add a new boolean on the reconciliation widget propositions to decide if the tax must be used like a price included tax or not.

PR: 17040
task: 32717
2018-08-08 13:45:11 +02:00
Christophe Simonis 33e7479865 [MERGE] forward port branch saas-11.2 up to d7e2c767ce 2018-08-07 13:59:40 +02:00
Christophe Simonis d7e2c767ce [MERGE] forward port branch 11.0 up to 3513e599a7 2018-08-07 13:58:20 +02:00
David Beguin 8c1805cdc6 [FIX] Crash Manager - Clipboard JS reference updated
The instanciation of the clipboard in the crash manager was not updated
in the fix that upgraded the clipboard.js
2018-08-07 10:37:55 +02:00
Siddarth Gajjar 0d8b1f5ba3 [FIX] web: BS4, fix tooltip flickering issues
Closes #26186
2018-08-07 10:03:59 +02:00
Andreas PerhabandNicolas Martinelli 52fef21d81 [FIX] web: re-add title attribute for many2many tags that got lost
Co-authored-by: Nicolas Martinelli <nim@odoo.com>

Closes #25693
2018-08-07 09:21:22 +02:00
Christophe Simonis 32dce83618 [MERGE] forward port branch saas-11.3 up to ff80efd71e 2018-08-06 19:59:53 +02:00
Christophe Simonis 427f717d18 [MERGE] forward port branch saas-11.2 up to 932b229941 2018-08-06 13:44:01 +02:00
Rémi Rahir 77d34b9f8d [FIX] web: fixing checkbox style 2018-08-06 13:27:59 +02:00
Christophe Simonis 932b229941 [MERGE] forward port branch 11.0 up to b29e053436 2018-08-06 11:46:10 +02:00
David Beguin 902e484f14 [FIX] ClipboardJS update for Bootstrap Modals focus issue in Chrome
Since Bootstrap 4, ClipboardJS does not copy the value in the clipboard anymore
as Bootstraps modals give the focus to another element. As the focus need to be
given back to the correct element, ClipboardJS has to be updated as the
container parameter is only added in v1.7. We were in 1.5.
That container parameter allow to give the focus back to the correct element.
See doc on https://clipboardjs.com/
+ Issue : https://github.com/zenorocha/clipboard.js/issues/155
2018-08-06 11:34:51 +02:00
Christophe Simonis 4b19b84437 [FIX] web: better detection of non specify group_by in pivot views 2018-08-06 10:24:31 +02:00
Vincent Schippefilt f7cce79cfe [IMP] web: list view grouped layout is nicer
Task ID: 1860033

When the list view is grouped,
Before this commit the group title took as much space in the group
content as the first column of the table, and the space under this title
was not usable by the content (it was blank)

After this commit, the group title takes as much space as the sum of the
selector, sequence and first content column, but the space in the group
content under the title is used, so there is less wasted white space.
2018-08-06 09:16:35 +02:00
Fabien Pinckaers 7c8ab8a574 [IMP] base: improve kanban of modules, cards not clickable (top-right menu)
[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-06 00:29:51 +02:00
Mitali Patel 84f528bcff [IMP] Portal - Share link : Easily share the url of a document
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 15:20:42 +02:00
Pratima Gupta 31497ee79e [FIX] base, mail : fix typo in bel(l)ow
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-08-03 12:35:02 +02:00
RomainLibert 01f6a0257d [FIX] web: use fieldName instead of field in _sanitizeValue
In _sanitizeValue we can receive field as a string of the form
fieldName:grouping, if we search for this directly in the fields of the
model we won't find anything.

Hence we should use the fieldName part of it.
2018-08-02 11:41:42 +02:00
Nimesh Jethva 2cbdf1b4ad [FIX] web: BS4, restore bold font for main titles of settings 2018-08-02 09:55:20 +02:00
qsm-odoo 2587483f41 [FIX] web: restore the "+" menu in backend
Dropdown menus which collapsed in the "+" menu were not receiving
the proper styling anymore.

Thanks to @nla-odoo
2018-08-02 09:55:20 +02:00
qsm-odoo 90d22851b2 [FIX] web: BS4, review selected dropdown item style (II)
Completes commit https://github.com/odoo/odoo/commit/e10a4303c21332f10d89b0c19661cc11ca0dc7a6
2018-08-02 09:55:20 +02:00
Adrien Dieudonne d91ec258e6 Revert "[IMP] web: use burger menu for tablet in vertical mode"
This reverts commit 4e5f826ce5
for two reasons:

1) A lot of people are working with splitted desktop screen and
will see the view switcher/search as on mobile: it's not efficient.
Only the burger menu should have been visible for the tablets,
not the other mobile features.

2) When you switch between vertical mode and H mode, we don't want
to change the mobile mode because widgets aren't reinstantiated and
some features don't work.
For example, the burger menu is broken if you switch from H mode to
V mode.

Task-1869468
2018-08-02 08:14:10 +02:00
Christophe Simonis 4797627259 [MERGE] forward port branch saas-11.4 up to 8d9366197e 2018-08-01 18:02:29 +02:00
Christophe Simonis 8d9366197e [MERGE] forward port branch saas-11.3 up to 691dd65e0e 2018-08-01 17:23:03 +02:00
Christophe Simonis a9bb3249c6 [MERGE] forward port branch saas-11.2 up to 22b31152ca 2018-08-01 15:17:21 +02:00
Lucas Perais (lpe) e35a972639 [FIX] web: kanban progressbar css fixup
fixup of dc253ff1c6
2018-08-01 14:24:54 +02:00
Christophe Simonis 22b31152ca [MERGE] forward port branch 11.0 up to f9e0f6663f 2018-08-01 14:20:39 +02:00
RomainLibert cf7518f1fe [IMP] web: use true and false as values for boolean group by
In the graph view, by default the value false was considered to be a non
set value (which is the case when dealing with M2O fields). But in the
case of boolean fields, we want to display the value false.
2018-08-01 11:20:03 +02:00
len-odoo e57a1a8e6f [FIX] web: fix 'drag and drop' test function to work in both directions
The 'drag and drop' function defined in test_utils should be aware of four
different cases, moving up or down, above or below another row.
We need an offset of one pixel for the function to work when moving down
(this is a case of broken symmetry because of <=)

Related to opw 1867049 regarding sequences of resequence moves.
2018-07-31 16:18:26 +02:00
qsm-odoo e10a4303c2 [FIX] web: BS4, review selected dropdown item style
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-31 13:56:50 +02:00
qsm-odoo 6f577ab280 [FIX] web: BS4, adapt caret position for sub-filters 2018-07-30 18:10:45 +02:00
qsm-odoo 6a80ddecfc [FIX] web: BS4, form sheet should clear floating elements
Before most were cleared by .tab-content elements, which is not the case
anymore with BS4.
2018-07-30 18:10:45 +02:00
Christophe Simonis a719cf2563 [MERGE] forward port branch saas-11.3 up to b4555df336 2018-07-30 17:02:28 +02:00
Christophe Simonis b4555df336 [MERGE] forward port branch saas-11.2 up to 3376bad191 2018-07-30 15:51:38 +02:00
qsm-odoo 203296e8a9 [FIX] web: BS4, fix custom radio button style
This is a standard BS4 bug: radio buttons's dot is not properly centered
as soon as the html font-size is not a multiple of 4 (and our backend
uses 13px). As a quick fix, I change that to 12px and use a font-size base
of 13/12rem so that the body font-size does not change. Bootstrap will
probably fix this in a future update.
2018-07-30 15:08:16 +02:00