Commit Graph
125269 Commits
Author SHA1 Message Date
Robot Odoo 1fbafa4e69 [MERGE][IMP] im_livechat: random assignation of conversation
Purpose
The assignation method should always give the new conversation to the operator who
has the less active conversation.
If two operators have the same amount of active conversation, it should chose one of
them randomly.
We also want the visitor to get the same operator (if available) from its last visit.

Specifications
The method 'get_mail_channel' on the 'im_livechat.channel' model used a simple random.choice in
the available users to select the operator.
It was improved to select the operator that has the lowest number of open livechat sessions. If multiple
operators share the same number (lowest) of open livechat sessions, it selects randomly between those.

For the visitor to get the same operator as during its last visit, we save that information in a cookie (1 week lifetime), and give this optional parameter to the server when asking for the livechat session.

To make the code clearer, some methods were reorganize and convert from `api.model` to `api.multi` (ensure_one) to be more API-compliant.

Task-1919871

closes odoo/odoo#29888

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-04-01 09:43:42 +02:00
jem-odoo 33f4980b02 [FIX] im_livechat: missing js files in assets
Like every changes in web client, and in the assets composition, "some
people" forget to update the specific assets of livechat.
Specific livechat assets allow to load a small part of odoo js
framework in order to be embedded on external website.

Task-1919871
2019-04-01 07:03:11 +00:00
Aurélien Warnon 594c6e8a2a [IMP] im_livechat: ensure that visitors always gets the same operator
Task #1919871

Purpose
=======

If a visitor comes on the website and launches a livechat, it will be randomly assigned operator A.
If he comes the next day and opens a livechat again, we want him to have the same operator if he's available.

To handle that use case, we added a cookie that stores the "previous operator id" information for 7 days.
2019-04-01 07:03:11 +00:00
Aurélien Warnon 9b867cd12d [IMP] im_livechat: improve random assignation of conversations
Task #1919871

Purpose
=======
The method 'get_mail_channel' in the 'im_livechat.channel' model used a simple random.choice in
the available users to select the operator.

It was improved to select the operator that has the lowest number of active livechats. If multiple
operators share the same number (lowest) of active livechats, it selects randomly between those.

A livechat is considered 'active' if it has at least one message within the last hour.

Spec
=======
The assignation method should always give the new conversation to the operator who
has the less active conversation.

If two operators have the same amout of active conversation, it should chose one of
them randomly.
2019-04-01 07:03:11 +00:00
Aurélien Warnon c04b9c019e [REF] im_livechat: rework some 'im_livechat.channel' model methods
Purpose
=======

Several methods of the 'im_livechat.channel' model were passed a 'channel_id' to work on.
This has been changed so that the caller can use those methods on an instance of this model instead.

Some methods have also been switched to private because they had no apparent reasons to be public.

This is a preliminary cleaning for task #1919871

Specicial note for the "loader" template:
To load the livechat assets in a website page, the 'loader' template of livechat
is directly called (instead of being returned through a controller) in order
to avoid a new call to server.
As this commit moves 'sudo' to make method callable on the record directly, it
still needs to be sudo. First solution was to add the 'sudo' in the template, which
is a bad practise.
This commit creates a proxy method on website model returning the livechat info
with 'sudo'. This avoid having the 'sudo' done in template. Like always, explicit
is better than implicit.

Task-1919871
2019-04-01 07:03:11 +00:00
XavierDo 92e9e84b63 [IMP] mail, *: don't track fields at create
*: project, crm, maintenance, helpdesk,

It is useless to track fields during create since they
have no initial value and future tracking message will
show changes on tracked field.

We can log a default creation message instead
(as it is now if there is no mail_create_nolog context key)

This change will implies
- less queries when creating record
- cleaner creation messages
- less occurence of mail_create_nolog ctx key

Removing tracking at create could break the creation subtypes
mechanism (example: following task creation subtype on project)
Instead of using _track_subtype to give a subtype at create,
a new _creation_subtype method can be override. If a creation
subtype is set on a specific modlel, creation messages will be
create by message_post instead of _message_log.

We also need to adapt the message_track_post_template in order to
keep this feature whithout tracking.

Task: #1916916

closes odoo/odoo#31945

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-29 15:28:43 +00:00
Romain Derie 98b20333d6 [IMP] website_sale: avoid misconfiguration in multi-website/multi-company
Before this commit, a pricelist could be easily misconfigured when
multi-company and multi-website were both activated.
Eg: website 2 is for company 1, create a pricelist and set website 2 and
    company 2, it would make no sense and code would not behave as expected.

Now, we prevent this type of misconfiguration by ensuring a pricelist can't
have a website which is from another company than the company set to the
pricelist.
We also filter website in m2o widget to only show company's websites.

Closes #25109

---------------

With this new constraint, l10n module would need to force company:

l10n modules install will change the company currency, creating a pricelist for
that currency. Do not use user's company in that case as module install are
done with OdooBot (company 1).

Step to reproduce:
  - Active multi-company and create a new company
  - Switch to that company and try to install any l10n module not in EUR or USD
  - It will create a new pricelist for that company for that new currency
  - It will crash as module install are done as OdooBot which is in company 1.
    It will search websites in OdooBot company (self.env.user).
    It will then create the pricelist with company 1's website which is
    uncompatible with the new company, thus raising the constraint.

closes odoo/odoo#31929

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-26 22:11:50 +00:00
Robot Odoo 3ccccd10af [MERGE] website_blog, *: review blog layouts
* website

Review the blog layouts to
- Use cards where necessary to match the forum / event redesign
- Use correct bootstrap / HTML

+ Some minor improvements

task-1948882

closes odoo/odoo#31749

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-29 19:52:29 +01:00
qsm-odoo 24aec084e2 [REF] website_blog: review blog redesign
- No cards for menus
- Use the grid system for better blog post card footers
- Correct grid system for blog list grid view
- Remove some useless custom css
- Restore 'groups' in xml data
- ...

Part of https://github.com/odoo/odoo/pull/31749
task-1948882
2019-03-29 16:37:37 +00:00
qsm-odoo 217ba16809 [IMP] website_blog, *: improve social links visual
* website

Use real social colors which makes the blogs look more modern.
Introduce the colors for github, instagram and youtube.

Part of https://github.com/odoo/odoo/pull/31749
task-1948882
2019-03-29 16:37:37 +00:00
Andrea Ulliana 1967ea89e6 [IMP] website_blog: review blog layouts
Review our blog layouts to follow the design we added for forum and
event (usings cards for records but not for menu + colored cards for
the right column). Also fixes some DOM/Bootstrap structures.

Part of https://github.com/odoo/odoo/pull/31749
task-1948882
2019-03-29 16:37:37 +00:00
Andrea Ullianaandqsm-odoo ce1da231b9 [IMP] website_sale, *: add products searchbar snippet
* website

When the e-commerce is installed, you can now add a new snippet that can
be dropped anywhere: a search bar to search for products with an
autocomplete feature.
That snippet is also used as default "/shop" search bar. Finally,
you have the possibility to customize the snippet via snippet options.

task-1866973

closes odoo/odoo#30366

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>


Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-03-29 16:33:15 +00:00
Nans Lefebvre c26eb41f9e [FIX] *: put all mail.message.subtype as noupdate
The mail.message.subtype model contains a field internal,
which decides if the messages are visible to external users or not.
Such a value should not be overriden at module update,
so all subtypes should be in noupdate.

opw 1946043

closes odoo/odoo#32214

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-28 13:40:41 +00:00
svs-odoo 63d2a1675b [IMP] stock_account: cost field editable on FIFO + AUTO
Before this commit, when 'Inventory Valuation' was on 'Automated' and
'Costing Method' was on FIFO, the product cost field wasn't editable
anymore.
Now, it still editable in this configuration (other configuration aren't
affected).

Task #1937164

closes odoo/odoo#31145

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-03-29 14:54:45 +00:00
Yannick Tivisse 62c9dedafd [IMP] base: Remove useless ACL rules
Now that portal users don't have access to the backend, it doesn't make
sense to give the read access on attachments, as this is the role of
the specific controllers to provide this access according to the business
logic.

For the record, these rules have been introduced at:
https://github.com/odoo/odoo/commit/61065b6d04248aa496765e1035c4c90cbdc38de7
https://github.com/odoo/odoo/commit/f3fa266d115ac9d4723164af10f8dee40821b290

closes odoo/odoo#32134

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-03-29 12:00:25 +00:00
Robot Odoo 97315af946 [MERGE][IMP] (website)_sale_(product_configurator): improve p. configurator & exclusions
Task #1891970
Original p. configurator commit d3530eb

Main purpose
------------------

The main purpose of this merge is to improve the product configurator usability by removing the "Configure a product" link to make it dynamic based on the selected product.
It also cleans the (website_)sale modules by moving the configurator specific code into its own modules: (website)_sale_product_configurator.

Detailed changes
-----------------------

Here is a more detailed list of the things done in this merge:

- Moved the product_configurator into its own module now that we have a specific option for it.
  The option only enables the p. configurator in the SO form.
  The e-commerce should always allow customer to configure their products, even if the option is not
  checked.

  This allows moving some of the code specific to the p. configurator into its own module.
  However, a lot of the code has to remain in "sale" module since the e-commerce does not require the
  option checked and needs the "configure product" feature in the shop by default.

  (This is why the fields "product_custom_attribute_value_ids" and
  "product_no_variant_attribute_value_ids" are still in the "sale" module)

- Since we now have the product_configurator in its own module, we can add a bridge module for the
  website_sale to override the necessary controller routes in a cleaner way.
  This commit adds the bridge module and move files and code around.

- The sale order lines will now always be editable directly from the tree view.
  Installing some modules would force a popup form, which leads to a significant drop
  in productivity when filling in multiple sale order lines.

- This commit will add an event configurator widget that will open a wizard when the selected product is
  'event_ok'.
  The widget will allow configuring the 'event_id' and the 'event_ticket_id' fields so that they can be safely
  removed from the sale order line tree view.
  The user can also edit the event configuration by using a button next to the product_id dropdown field
  if the product is configured as 'event_ok'.

- The p. configurator now comes with a widget that is "o2m" like in the SO lines view.
  The widget is only used on the added "product_template_id" field on the SO line.

  This widget controls the opening of the configuration window and removes the need of a "Configure a
  product" button.
  The "SectionAndNoteListRenderer" is now cleaned from p. configurator specific code.

  The widget is also responsible for handling the configuration provided by the p. configurator form
  and applying it on the SO line with a 'field_changed' event that updates all the necessary fields.

- Added support for 'MULTI' and 'DELETE_ALL' operations on X2Many fields in basic_model.js
  - 'MULTI' allows to batch multiple operations at once
  - 'DELETE_ALL' behaves like 'DELETE' with all the current data of the field

- A message will be displayed when hovering a disabled attribute value's input to explain why it's
  disabled.
  e.g: Not available with Color: Black

  This works for both exclusions within the product and exclusions from a reference product.

- The exclusions will work in both sides, if "black" excludes "metal", "metal" will also exclude "black".

- The "Customizable Desk" and "Conference chair" products now have some stock in the initial inventory
  to avoid the stock warning when adding these products in a SO through the product configurator.

- The _name_search of product.template fallbacks by default on product.product
  In case there are no product.products yet (dynamic product variants configuration), we need to
  include the base product.template _name_search in the results

- The "ProductConfiguratorMixin" was named like that for historical reasons.
  It had no direct link to the product configurator anymore since the latter was moved in its own module.
  The ProductConfiguratorMixin was renamed to VariantMixin to avoid confusion.
  This commit just move files around, there should not be any functional change.

Spec
=======
- remove "configure a product" from sale order lines
  When the product configurator is active, replace the product_product_id by a product_template_id
  in the sale order line. When we select a template without variants, it sets the variant automatically,
  but when we select a product template having variants, it opens the configurator dialog.
- add a widget to modify the product configuration in the sale order line (next to product template field)
- UX improvements:
    - Invert image and configuration in the main screen
    - If the product doesn't have an image, hide it instead of showing the placeholder (only for first
      screen?)
- new independent option in sales settings to activate product configurator.
  (same in e-commerce)
- demo data: Change demo data to set Customizable Desk & Conference Chair as make to order
- If only one attribute value that is Custom, don't display radio, selection or even color box
- show exclusions in both sides in the configurator
  -> SOLUTION: auto populate other way around (Black not for XL -> XL not for Black)
- don't allow to select an excluded value in the configurator (frustrating).
  Replace with an uncomaptibility message on hover (e.g. Not available for Color: Black, Size: XL)
- apply the same mechanism for optional & suggested products: e.g. Not available for Customizable
  Table (Color: Black)
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#28310

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-29 14:23:17 +01:00
Olivier Colson 5091bc1df7 [FIX] account: avoid traceback when using the 'with tax' filter of reconciliation models
Field tax_id has been replaced by tax_ids by commit https://github.com/odoo/odoo/commit/4d7f0526122084e7be08212bd5ef9935603605ff . The filter had not been adapted properly and raised a traceback, as tax_id did not exist anymore.

closes odoo/odoo#32231

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-03-29 08:53:27 +00:00
Aurélien Warnon 7c4b99fec2 [IMP] (w_)sale_product_configurator: improve single custom value layout
Purpose
=======

When a single custom value is configured in an attribute, use the 'value' label
as a placeholder to have a full width input.
2019-03-28 14:55:02 +00:00
Aurélien Warnon d59830d864 [IMP] *_product_configurator: improve optional products naming
Task #1891970

Purpose
=======

The name of the optional products displayed in the modal now change dynamically based on the selected
variants configuration.
You do not have to wait until the product is in the cart to see the full name anymore.

Ex: Conference Chair -> Conference Chair (Steel)
2019-03-28 14:55:01 +00:00
Aurélien Warnon eff1f45767 [REF] *_product_configurator,website_sale: remove deprecated methods/params
Task #1891970

Purpose
=======

This commit cleans up the deprecated methods introduced during the product configurator
post v12 fix (ref: f8dad1bb4b).
2019-03-28 14:55:01 +00:00
Aurélien Warnon ab621e524f [REF] (website_)sale,*_product_configurator: rename p_c_mixin to variant_mixin
Task #1891970

Purpose
=======

The "ProductConfiguratorMixin" was named like that for historical reasons.
It had no direct link to the product configurator anymore since the latter was moved in its own module.

The ProductConfiguratorMixin was renamed to VariantMixin to avoid confusion.
This commit just move files around, there should not be any functional change.
2019-03-28 14:55:00 +00:00
Aurélien Warnon 220f5ae53f [IMP] sale_product_configurator: improve p. configurator
Task #1891970
Original p. configurator commit d3530eb

Purpose
=======
- The p. configurator now comes with a widget that is "o2m" like in the SO lines view.
  The widget is only used on the added "product_template_id" field on the SO line.

  This widget controls the opening of the configuration window and removes the need of a "Configure a product" button.
  The "SectionAndNoteListRenderer" is now cleaned from p. configurator specific code.

  The widget is also responsible for handling the configuration provided by the p. configurator form
  and applying it on the SO line with a 'field_changed' event that updates all the necessary fields.

- Added support for 'MULTI' and 'DELETE_ALL' operations on X2Many fields in basic_model.js
  - 'MULTI' allows to batch multiple operations at once
  - 'DELETE_ALL' behaves like 'DELETE' with all the current data of the field

Spec
=======
- remove "configure a product" from sale order lines
  When the product configurator is active, replace the product_product_id by a product_template_id
  in the sale order line. When we select a template without variants, it sets the variant automatically,
  but when we select a product template having variants, it opens the configurator dialog.
- add a widget to modify the product configuration in the sale order line (next to product template field)
- UX improvements:
    - Invert image and configuration in the main screen
    - If the product doesn't have an image, hide it instead of showing the placeholder (only for first screen?)
- new independent option in sales settings to activate product configurator.
  (same in e-commerce)
- demo data: Change demo data to set Customizable Desk & Conference Chair as make to order
- If only one attribute value that is Custom, don't display radio, selection or even color box
2019-03-28 14:55:00 +00:00
svs-odoo 3c3b9c0696 [FIX] stock: don't allow putaway for services
Before this commit, you could specify putaway rules for service type
products, but as putaway is useless for services, we don't want that.

Task #1961021

closes odoo/odoo#32199

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-03-28 09:48:31 +00:00
wan 0f8be0d75c [IMP] base: warn when duplicating VAT number
Task 1942984
Add a warning to alert for partner duplicates based on VAT number
When we create a new partner with an existing vat number, on change from vat number -->  trigger a warning,

closes odoo/odoo#31597

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-03-28 15:25:41 +00:00
Robot Odoo 460e96c887 [IMP] mail, test_mail, *: add new email.cc.mixin on main models
*: crm, project, maintenance, hr_recruitment

When a record is created from an email, cc can be lost. This commit
proposes a new mixin to keep cc on the record and allows to create
partner for each of them when sending a message from the chatter.

The mixin is added on the mail recors that can be created from mail.alias:

document
helpdesk.ticket
mrp.eco
quality.alert
hr.applicant
crm.lead
project.task
mail.channel
maintenance.equipment

A new show more/ show less mechanism is also added to the partner suggestions in chatter.

Task: 1925001
Linked PR: odoo/enterprise#3689

closes odoo/odoo#31275

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-28 17:36:53 +01:00
XavierDo fbafbf2230 [IMP] mail, test_mail, *: add new email.cc.mixin on main models
*: crm, project, maintenance, hr_recruitment

When a record is created from an email, cc can be lost. This commit
proposes a new mixin to keep cc on the record and allows to create
partner for each of them when sending a message from the chatter.

The mixin is added on the mail recors that can be created from mail.alias:

document
helpdesk.ticket
mrp.eco
quality.alert
hr.applicant
crm.lead
project.task
mail.channel
maintenance.equipment

Task: 1925001
2019-03-28 09:34:11 +00:00
XavierDo e1cd5bbede [IMP] mail: add show more button on partner suggestion.
When sending a message from chatter, a list of suggested partners appears
on the top of the text area. With the previous commit,
cc will be added to this list. This commit adds a show more/show less
button in case there is more than 3 suggested recipients to display.

Task: 1925001
2019-03-28 09:34:11 +00:00
wan c160c73602 [IMP] account: disable quick create on account.account
Task 1958439

Purpose: prevent the erroneous account creation

closes odoo/odoo#32177

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-03-28 08:25:05 +00:00
William Henrotin b3b8f6357f [FIX] mrp: update test_order.py
- Add docstrings
- Use Form views in all tests
- Add some missing assets

closes odoo/odoo#31473

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-03-27 15:16:55 +00:00
William Henrotin 291eb73ce1 [IMP] mrp: flexible component consumption
Purpose: The quantities to consume on Bill of Material lines should be
either strictly used or be taken as a reference more or less adjustable.

This commit adds a setting on BoM to specify if the consumption is 'strict'
or 'flexible'. This new option has the following impacts:

   On produce wizard: if consumption is set to 'strict', the done quantities
   are prefilled and checked when saving the wizard. If set to 'flexible',
   the production flow remains the same as present one.

   On workorders: if consumption is set to 'strict', the Validate button
   will save the consumed data, and propose to fill the remaining ones until
   the total is registered. If set to 'flexible', two button are displayed.
   'Validate' to register the current component and pass to next step either
   the quantity to consume is complete or not, and 'Continue Consumption'
   to registered the current component quantity but leaving the user the
   possibility to add more quantity (and possibly another lot number) for
   the current component

This commit also revert partially d3617fd852
as the warning become some sort of an error

Task: 1889393
2019-03-27 15:16:55 +00:00
Martin Geubelle 32ab3422f0 [FIX] web: tests: correct pass hasSelectors
The attribute is true by default, but when it is set to `false`
in a test, it was not correctly passed in the view.

Note that it has no impact currently in the tests.

closes odoo/odoo#32175

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-27 15:36:59 +00:00
Christophe Simonis da711b9c0b [MERGE] forward port branch saas-12.2 up to 27e9c9e011 2019-03-27 19:17:30 +01:00
Aurélien Warnon 55ed70f405 [ADD/MOV] website_sale_product_configurator: new module and files move
Purpose
=======
Since we now have the product_configurator in its own module, we can add a bridge module for the website_sale
to override the necessary controller routes in a cleaner way.

This commit just adds the bridge module and move files and code around, there should not be any functional change.
2019-03-27 15:12:51 +00:00
Aurélien Warnon 3cb46ec74c [ADD/MOV] sale_product_configurator: new module and files move
Purpose
=======
- Moved the product_configurator into its own module now that we have a specific option for it.
  The option only enables the p. configurator in the SO form.
  The e-commerce should always allow customer to configure their products, even if the option is not checked.

  This allows moving some of the code specific to the p. configurator into its own module.
  However, a lot of the code has to remain in "sale" module since the e-commerce does not require the option
  checked and needs the "configure product" feature in the shop by default.
  (This is why the fields "product_custom_attribute_value_ids" and "product_no_variant_attribute_value_ids"
  are still in the "sale" module)
2019-03-27 15:12:50 +00:00
Aurélien Warnon 14f0e81e20 [IMP] event_sale: add an event configurator on SO lines
Purpose
=======

Commit 92b9e3684607fbb0c9a7d3f2331292eac51ebdea removed the SO line popup form and added all the event
information fields directly in the sale order line tree view.

The event information should be hidden by default because they are only relevant for 'event_ok' products.

This commit will add an event configurator widget that will open a wizard when the selected product is 'event_ok'.
The widget will allow configuring the 'event_id' and the 'event_ticket_id' fields so that they can be safely removed
from the sale order line tree view.

The user can also edit the event configuration by using a button next to the product_id dropdown field
if the product is configured as 'event_ok'.
2019-03-27 15:12:49 +00:00
Aurélien Warnon e813487e75 [REM] sale: remove the SO line popup form
Purpose
=======

The sale order lines will now always be editable directly from the tree view.

Why?

- Installing some modules would force a popup form, which leads to a significant drop
  in productivity when filling in multiple sale order lines ;
- The next version of the product configurator will only be compatible with inline tree view editing.
2019-03-27 15:12:49 +00:00
Aurélien Warnon d9423656ce [IMP] (website_)sale: improve the exclusion mechanism in p.configurator
Targets commit d3530eb07e
References task id 1891970

Purpose
=======
- A message will be displayed when hovering a disabled attribute value's input to explain why it's disabled.
  e.g: Not available with Color: Black

  This works for both exclusions within the product and exclusions from a reference product.

- The exclusions will work in both sides, if "black" excludes "metal", "metal" will also exclude "black".
2019-03-27 15:12:48 +00:00
Alexandre Kühn 05e480acb1 [FIX] im_livechat: open website livechat window
Before this commit, when opening a website livechat window,
it crashed with the following error message in the dev tools:

```
Cannot read property 'html' of `undefined`
```

The problem was caused by the rendering of the chat window header
before the chat window widget is even mounted in the DOM. This error
has been introduced by the migration from jQuery 1.12 to 3, in which
most occurrences of `$.Deferred` have been turned into `Promise` [1].

`Widget.appendTo()` returns a `Promise` (was `$.Deferred` before).
A `Promise` is always asynchronous, whereas a `$.Deferred` with
jQuery 1.12 may be either synchronous or asynchronous. In the case
of the website livechat window, the implementation with `$.Deferred`
was always synchronous, which is no longer the case now.

[1] https://github.com/odoo/odoo/commit/126fb33f6a74916c808c8e988f55faf82f0b5759

closes odoo/odoo#32168

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-03-27 14:27:11 +00:00
Arnold Moyaux 27e9c9e011 [FIX] mrp: unlock a raw move line
Usecase to reproduce:
- Go on a Mo
- Edit and Unlock
- Produce the MO
- Update a raw move and add a move line

User error you quant write on product_qty fields.
product_qty represent the reserved quantity on move line as quant's UoM.
The system requires to write a product_uom_qty that represent the same
quantity but in the move line UoM.

Fix it by removing the fields from the view, so it's no more save.
Also set the quantity done as readonly if the lines are present in
the view.

closes odoo/odoo#32135

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-03-27 14:02:32 +00:00
Aurélien Warnon f860128159 [IMP] stock: add stock for demo data: customizable desk & conf. chair
Targets commit d3530eb07e

Purpose
=======
- The "Customizable Desk" and "Conference chair" products now have some stock in the initial inventory
  to avoid the stock warning when adding these products in a SO through the product configurator.
2019-03-27 13:46:09 +00:00
William Henrotin 799ab73189 [FIX] mrp: handle multi
The _compute_final_lot_domain method is implicitely multi but doens't manage the loop over 'self'
2019-03-27 13:40:29 +00:00
Sarah Van Bogaert ce4713cd0e [IMP] web: allow multiple fields in form views
This feature was already working in the actual version of Odoo but it is now tested. The following
features are supported:
- When the value of one widget is modified, the other ones change accordingly
- The modifiers 'invisible' and 'readonly' are applied correctly if they differ between widgets.
However, the modifiers 'required' must be equal for the several fields, otherwise the behavior
is not guaranteed.

closes odoo/odoo#32158

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-03-27 13:32:53 +00:00
Christophe Simonis 6b4758cd9a [MERGE] forward port branch saas-12.2 up to 7c1a9a8204 2019-03-27 14:29:01 +01:00
William Henrotin 419d32207a [FIX] mrp: qty_done and qty_to_consume concistency
This commit ensures the qty_to_consume is always adapted to be the same
as qty_done in the onchange on qty_processing. This patch is needed to
keep the same behaviour before and after the workorder line refactoring
5ef46664a2
2019-03-27 10:29:20 +00:00
Yannick Tivisse 7c1a9a8204 [FIX] l10n_be_hr_payroll: Hide wage_with_holidays when leaves = 0
Now that we don't take into account the legal leaves, it should be hiddden when the number of leaves is equal to 0 instead of 20.0

closes odoo/odoo#32125

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-03-26 12:05:33 +00:00
Christophe Simonis 5dbf7bf357 [MERGE] forward port branch saas-12.1 up to f00c490be8 2019-03-26 10:33:26 +01:00
Christophe Simonis f00c490be8 [MERGE] forward port branch 12.0 up to 11b1e12cde 2019-03-25 19:45:26 +01:00
Christophe Simonis 11b1e12cde [MERGE] forward port branch saas-11.3 up to e9068c290b 2019-03-25 18:28:16 +01:00
Christophe Simonis e9068c290b [MERGE] forward port branch 11.0 up to 0196a6feb5 2019-03-25 16:47:05 +01:00
Martin Trigaux 57e6346442 [FIX] web: format date without locale
moment().locale('en').format('YYYY-MM-DD')
"2019-03-25"
moment().locale('ar').format('YYYY-MM-DD')
"٢٠١٩-٠٣-٢٥"
moment().locale('my').format('YYYY-MM-DD')
"၂၀၁၉-၀၃-၂၅"

Was rejected as a valid bug at moment/moment#4448
Apply the same logic than 109b319d64

Fixes odoo/odoo#32081

closes odoo/odoo#32102

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-25 14:42:28 +00:00