Commit Graph
120919 Commits
Author SHA1 Message Date
Aurélien Warnon df2ea31ff6 [IMP] (website_)sale: Add custom values for product attributes
Purpose
=======

Product attrivutes can now have custom values.
These values are specified by the user during the SO creation.
They are also available on the webshop frontend.

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

add a new mode to generate variants as they are added to the order/cart
- ability to define attribute extra prices & exclude combinations
2018-09-25 18:39:32 +02:00
Aurélien Warnon d3fbd10269 [IMP] framework js: improve X2Many 'CREATE' operation to handle multiple records
Purpose
=======

The 'CREATE' operation lacked the possibility to handle multiple records.
The 'context' parameter is now an array of dict that contains the context for each new record.

This is usefull when you want to create multiple records into a list in a single call.
Please note that the 'default_get' is still called once for each record in an async way.
2018-09-25 18:39:32 +02:00
Yannick Tivisse 57ffbe89ef [IMP] models.py: Concatenate warning messages if they are different
Purpose
=======

When several warnings are raised, in an onchange for example, the warning
messages and titles are concatenated on the dialog, even if they are
exactly the same.

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

Don't concatenate warning messages if they are exactly the same.
2018-09-25 18:39:32 +02:00
Aurélien Warnon 856c2e9008 [IMP] product,(website_)sale: Move product options configurator into sale module
Task #1871557

Purpose
=======

- Configure a product from a sales order as easily as in the ecommerce
  The backend uses the same template as the frontend to configure a products and its options

- Display optionnal products of optionnal products in the "sale options" section

- Allow adding exlusions to some combinations of the product and/or
  to some combinations of the optionnal and accessory products

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

PHASE I

1. Improve the "Add to cart" with optional products

- When you add an option to cart, move the product to the cart & show the options of this option
- Don't open the option wizard if no option available (in case this module becomes generic,
  it's better to skip this step when it's not needed)
- Display the options right under their related product in the cart

2. Do not allow to add the product as an optional product for itself
Why ?
- No functional sense
- Creates issues in the add to cart wizard

3. Exclude some attribute combinations within the product or with related options and accessory products

- Rename VARIANT PRICES button -> CONFIGURE VARIANTS
- When you click this button and select a value, open form view rather than inline edition
- Form view of variant values:
	- Attribute
	- Value
	- HTML Color Index
	- Attribute Price Extra
	- Not Compatible with: o2m tab with 2 fields: Product AND Attribute Value (of this product)
	  [m2m tag selection]
	- in any new line, autocomplete the current product by default
	- Tooltip: A list of product and attribute values that you want to exclude for
          this product's attribue value. Also applies on optionnal and accessory products.

4. New option to configure a product in a sales order line

- This option is only visible if the corresponding option is activated in the sales settings
- It opens a wizard to select a product template, configure related attribute values
  and select optional products (based on frontend view)
- Attributes not compatible with other selected attributes should not be selectable
- Must work like in the frontend
2018-09-25 18:39:32 +02:00
Aurélien Warnon fd07990b85 [REM] website_sale_options: Remove translations
The module is to be removed in the next commit. The aim of this commit
is to avoid noise on the diff.
2018-09-25 18:39:32 +02:00
Sébastien Theys 96f7bda09e [IMP] website: improve "new content" text & add block ui
We don't want the user to click on the page while an installation is in progress.
2018-09-25 18:29:16 +02:00
svs-odoo fa4c650b01 [IMP] web: limit number of open columns in kanban view
With this commit, we limit the kanban view to 10 open groups
at the start. This is useful to prevent the web client to make
too many requests at once.

This limit is set in the constant 'OPEN_GROUP_LIMIT'.
Note:
- columns already set as folded by default aren't take into account.
- the user can still open any folded column, as usual.

Task #1878113 (1/2)
2018-09-25 17:23:52 +02:00
Géry Debongnie 17ef915ff2 [DOC] doc: add information on session and client action 2018-09-25 17:17:25 +02:00
Romain Derie 17573f4094 [FIX] website_blog, website_forum: missing template name
This commit adds various fixes to blog and forum:
  - Some templates were mising a name, resulting in ugly page title
    (eg: forum_all)
  - Latest Blogs page was checking seo keywords to display tags, maybe it was
    coming from an old tag implementation that used seo keywords?
  - If only one forum, land on it directly when accessing /forum, like blog
    does
  - ..
2018-09-25 16:51:31 +02:00
Vincent Schippefilt cbc155860d [FIX] web: add style to focussed links in editable lists
In some forms (especially invoices), there are more than one action
"add a new line" on the invoice lines one2many. When using the keyboard
to access those links, some kind of style is required to identify which
link is currently focussed, else the focussed link is not visible.
2018-09-25 16:49:23 +02:00
Vincent SchippefiltandAlexandre Kühn 1c3d7c00e0 [FIX] web: focus 1st control in editable list on ESC
Before this commit, when we click on the 1st control in
an editable list (usually 'Add an item') then press ESCAPE,
the focus was not on the 1st control.

The intended behaviour is to have the focus on the 1st control,
so that we may navigate left/right between controls solely with
the keyboard.

With this commit, when a cancel keyboard navigation event is
triggered in an editable list, it auto-sets the focus on the
first control.

Co-authored-by: Alexandre Kühn <aku@odoo.com>
2018-09-25 16:49:23 +02:00
Vincent SchippefiltandAlexandre Kühn 48a53f2ea5 [FIX] web: improve automatic creation of new lines in x2many in forms
This commit fixes a few issues with the previous implementation of the
automatic addition of new lines in x2many inside forms

1. Before this commit, when there is a change of mode in a formview
`edit` -> `readonly` -> `edit`, there may be some cases that
mistakenly and automatically opens a modal.

This case occurs in a form view with a x2many field whose 1st inner
focusable element opens a modal (e.g. "Add an item").

In `edit` mode:
	1. Open this modal from the x2many
	2. Close the modal
	3. Change mode to `readonly`
	4. Change mode to `edit`
> the same modal is automatically open.

This is due to the tracking of the last activated field that persists
after a change of mode. Since the last activated field in the 1st
`edit` is the x2many, it is granted the focus at the beginning of the
2nd `edit`, which automatically opens the modal.

This commit fixes the issue by resetting the tracking of the last
activated field when there is a change of mode. As a result, at the
beginning of the 2nd `edit`, the focus should always be on the 1st
field.

2. Before this commit, if the focus was moved out of the form (to a modal
for instance) then back, the form would re-activate the last field, which
is the x2many and would re-add a new line. This behavior is not correct
and now going back from a modal to a form does not add a new line.

Co-authored-by: Alexandre Kühn <aku@odoo.com>
2018-09-25 16:49:23 +02:00
Vincent Schippefilt e343f5f5f9 [IMP] web: x2many adds a new line by tabbing on a not dirty line
Before this change, when the focus was on the first field on a x2many
field, and the user pressed TAB, the line would be discarded and the
focus moved to the next field (at the level of the x2many) in the form.

This was an issue because if the first field was required, the focus
could not be moved out of the field with TAB so the user had to discard
the line manually (with ESC) before moving to the next field

This change works with 2 changes:
1. detecting if a line is dirty (has been modified by the user) and at
the end of the line, decide to either
    - discard the line and move the next field, if the line is not dirty
    - commit the line and add a new line, if the line is dirty

2. allow users to use TAB through required field inside x2many so they
can easilly go to the end of the line.

Task id : 1872248
2018-09-25 16:49:22 +02:00
Vincent Schippefilt 3dcf20284d [IMP] web: remove nagivating left, right, up and down from field to field using the arrow keys
The idea for this change is that there are different behaviors when using
the keyboard inside an editable list:
when the focus is at the end of a text field, it moves the focus to the
right cell when pressing right, but not when the focus is in the middle
of the field. Also, moving up from within a multiline text field was incoherent.

In order to simplify the keyboard navigation, only TAB is used to move
from field to field inside and outside a editable list.

Task id : 1872248
2018-09-25 16:49:22 +02:00
Xavier Morel ac37ca39ea [FIX] doc: github_link compatibility with Sphinx 1.8 2018-09-25 16:28:18 +02:00
Sébastien Theys d2ba705019 [IMP] website_livechat,website_hr_recruitment: make them Apps
Since we add those on the "New Content" menu, it's better if they are Apps,
so they can be found more easily.

PR: #27110
task-1885419
2018-09-25 16:23:08 +02:00
Sébastien Theys e4aa8ec6d1 [IMP] website,website_livechat,website_slides: add "new content" buttons
Those allow the user to quickly create a new channel or new slides.

PR: #27110
task-1885419
2018-09-25 16:23:08 +02:00
Sébastien Theys 2ab6ce80d6 [IMP] website: add quick install from "new content"
This gives the user an overview of the possible actions,
including those he currently does not have installed.

It allows him to quickly install the missing applications
without having to go on the backend.

The commit also improves the existing actions:
- correct handling of the actions deferred
- add some translated terms

PR: #27110
task-1885419
2018-09-25 16:23:08 +02:00
Sébastien Theys f6dfa6ee47 [FIX] website: make ?enable_seo more robust
Sometimes we try to append a query string to an url, but if there is a remaining anchor, the query string will not be added at the right place.

The title and description tags might not exist (translated page) so it would be displaying false instead of empty string.

PR: #27110
task-1885419
2018-09-25 16:09:19 +02:00
Thibault Delavallée 01e92a0fa8 [FIX] website_theme_install: do not crash when canceling update
How to reproduce

 * install website_theme_install;
 * go on Apps -> Apply scheduled upgrades;
 * Hit Cancel;
 * there is a crash because somehow when writing on module self is a void
   recordset and self.name is therefore False and cannot starts with 'theme';

This commit fixes that by ensuring self is not void before checking its
name.
2018-09-25 15:58:24 +02:00
Romain Derie 6f1c6f2895 [FIX] website: add website_id in ir.ui.view list in multi-website 2018-09-25 15:47:56 +02:00
Romain Derie 70306c63e3 [FIX] website: create ir.ui.view/website.page in the same record
Somehow, having theses 2 new `website.page` records created separately from
their `ir.ui.view` would throw an error in dev-xml when installing website
module.
A task has been created in website team to track the origin of this bug.

In the meantime, this commit will avoid the traceback by creating the view
inside the page record. As the page's view is not intented to be inherited, it
is the best way to write it anyway.
2018-09-25 15:42:00 +02:00
Adrien Dieudonne a8ffbe28b2 [FIX] web: undefined graph when pie chart has no data
Before this commit, a crash occured when the no content
helper was rendered on an pie chart without data.
2018-09-25 15:36:29 +02:00
Odoo Translation Bot 5a439a85ef [I18N] Update translation terms from Transifex 2018-09-25 15:32:59 +02:00
Thibault Delavallée 27281b850a [FIX] fleet: update state order
Expired should come after expiring soon.

Linked to task ID 1878153.
2018-09-25 15:32:04 +02:00
Martin Trigaux b2d2be0a4a [I18N] base,mrp: export source terms 2018-09-25 15:30:45 +02:00
jem-odoo 40778d883d [IMP] doc: add selection method guideline
Sometime, we need to get selection values from
a method. Here are the guidelines about how
to correctly name method and place it in the
code.
2018-09-25 15:19:30 +02:00
jem-odoo 3c35678ce7 [IMP] doc: adapt guidelines for 12.0
Odoo evolves and its coding guidelines too.
This commit :
 - put some news guidelines, case to take
 into account when making new dev
 - update some guidelines that are difficult
 to applied in the real life
 - remove deprecated stuff (RML report, ...)
 - remove references to old
 api mainly, since all new dev must be done in
 new api

Task #1817988
2018-09-25 15:19:30 +02:00
Romain Derie bcd405efa3 [FIX] website_slides: fix website_meta_og_img right on partial channel
156955de6b introduced a new property `website_meta_og_img` in
`website.seo.metadata`.

When rendering a template, `render()` is calling `get_website_meta` that will
end up reading `website.seo.metadata` fields.

But `website_slides` module is overriding `check_field_access_rights` to allow
partial read on the record.
The new `website_meta_og_img` was missing from the allowed fields, thus
crashing when an user without the required slide's group would try to read the
slide.
2018-09-25 15:15:57 +02:00
Géry Debongnie 30302bc116 [FIX] payment: remove ES6 specific construct
Using the arrow syntax from ES6 is nice, but it breaks the doc build
process.
2018-09-25 14:46:58 +02:00
Thibault Delavallée 0e3d5941da [FIX] mail: also find escaped heart <3 emojis
Otherwise <3 is not correctly translated into :heart which makes a lot of
people very very sad.

Commit linked to task ID 1887949.
2018-09-25 14:44:45 +02:00
Thibault Delavallée 83b9c376ab [IMP] imp_livechat: add one shortcode as data
Purpose is to show people shortcode actually exists. Moreover having
im_livechat_mail_bot requires to have a least one shortcode available
in order to complete the onboarding with odoobot.

Commit linked to task ID 1887949.
2018-09-25 14:44:41 +02:00
Thibault Delavallée 224aedd30f [FIX] im_livechat_mail_bot: import user model file
Otherwise you **might** ran into issues with missing selection field key.

Commit linked to task ID 1887949.
2018-09-25 14:44:38 +02:00
Thibault Delavallée 6e6b82c7cd [IMP] mail_bot: add odoobot status field available on user form view in debug mode
Otherwise tweaking it requires an access to the database or making a custom
view which is not the most user-friendly way of doing it.

Commit linked to task ID 1887949.
2018-09-25 14:44:27 +02:00
qsm-odoo 2f1255c160 [FIX] website: add a filter on cover parallax
Without filter, this does not automatically work with theme images.
2018-09-25 14:13:41 +02:00
Adrien Dieudonne 1a16f4239b [FIX] web: display empty pie chart for embedded view
Before this commit, every pie chart without any data displayed
the non content helper in the middle of the screen.
This behavior is intended most of the time except for embedded
pie chart (such as in the dashboard views).

Now, an embedded pie chart without any data is rendered and displays
the error message in the middle of it.
We had to render it with nv.d3 to match the size of the other
graph in comparison mode.

Another commit in enterprise will add a test for this fix.
For the moment, embedded empty pie charts are only used on
dasboard views.
2018-09-25 14:04:31 +02:00
sri-odoo f5a86259f1 [FIX] portal, account: portal invoice alert layout
Fix broken layout issue
2018-09-25 12:57:22 +02:00
sri-odoo 553d3dbaad [REF] portal: keep breadcrumbs design across all pages 2018-09-25 12:57:22 +02:00
sri-odoo c25689fa0e [REF] portal, *: portal background is now gray by default
* account, project, sale, website_crm_partner_assign

- adapt table bg to new default page background
- keep searchbar design across pages
2018-09-25 12:57:22 +02:00
Anshuman Sharma 7f8898db36 [FIX] website_crm_partner_assign: remove useless BS3 classes
Closes https://github.com/odoo/odoo/pull/26576
2018-09-25 12:35:15 +02:00
Sébastien Theys 0027544779 [FIX] website_slides: fix bs4 bugs
PR: #27131
2018-09-25 12:20:55 +02:00
Jeremy Kersten 9c5ee042a5 [FIX] website_theme_install: fix install theme
Active field was ignored in all case instead of just update
Button 'update theme' call wrong function
2018-09-25 11:50:19 +02:00
Kishan Gajjar 98ee0f766c [FIX] website: BS4, restore gallery snippet 2018-09-25 11:38:56 +02:00
Dipalee Bhalodia 4ae0005438 [FIX] website_sale_options: restore website_sale_options dialog
Before this commit, on click on 'Continue Shopping' / 'Process Checkout'
button of the product options wizard, it opened the wizard again and
again.

Commit https://github.com/odoo/odoo/commit/8a85cb9ea48b0d25f38a8795c5e25f30cd5bb3f7
selector was made more general so this commit will solve this issue
by using a more specific selector and will not open wizard again on
click of 'Continue Shopping' button.

Closes https://github.com/odoo/odoo/pull/27079
2018-09-25 11:24:36 +02:00
Thibault Delavallée 82f361a318 [FIX] models: add filter method on access rules
Currently check_access_rule method checks for record rules and raises an error
if there are either missing ids (deleted records) or forbidden ids (records
hidden due to a record rule).

Purpose of this commit is to have a method allowing to filter a given recordset
and receive only valid records. Its implementation is basically a refactoring
of check_access_rule.

This commit is linked to task ID 1856417 and PR #26565.
2018-09-25 10:51:34 +02:00
Raphael Collet 13fc1380ba [FIX] ir_ui_view: do not check arch twice upon install/upgrade
After a module upgrade, validate the architecture of the module's views that
are impacted by updates, but have not been checked yet.  Before this patch,
views were checked twice on average.

This patch speeds up the installation of modules by about 15% without demo
data.  With demo data, the speedup is around 10%.
2018-09-25 10:41:55 +02:00
Martin Geubelle 587b21fb46 [FIX] base: correctly keep report values
When rendering a report (`render_qweb_html` for example), one can pass `data`
(a dict of values, used for the template rendering).

This dict was overriden in `_get_rendering_context` if the method
`_get_report_values` on the report model was not correctly written.

This was causing an issue when rendering a report in Studio because the `studio`
key was overriden.

Now, the `data` dict is updated (instead of replaced) with the rendering context.
2018-09-25 09:53:48 +02:00
Pratima Gupta 15f811c47a [FIX] mrp: mrp document kanban image.
The mrp document attachment could exceed its container size.

Task-1881068.
2018-09-25 09:46:57 +02:00
qsm-odoo 83aaaf259a [FIX] website: adapt column snippet option to BS4
Broken because col-md-offset-* -> offset-lg-*.
2018-09-24 18:31:25 +02:00
Dhaval Panchal 7347ac4c23 [FIX] web: restore mobile search menu color/position 2018-09-24 17:59:27 +02:00