Commit Graph
132912 Commits
Author SHA1 Message Date
tanghulu0608 28b2995a41 [FIX] doc: correct the doc string of the read_group
The orderby specification is a string, not a list
Using a list as a orderby clause produces an error in the construction
of the group by query

closes odoo/odoo#42451

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-01-02 07:58:32 +00:00
Swapnesh Shah 847b05fb19 [FIX] website_slides_survey: create certificates with scoring by default
Follow up on https://github.com/odoo/odoo/commit/6e5b211f4efd2f29b8bf582465284527e38bc763
Certificate field is not sufficient, scoring type should be set by default
to avoid creating non certificates without knowing it.

closes odoo/odoo#42640

X-original-commit: 1edfa69a4c95deca5192f28f162f2f0b8322bb8f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-03 08:35:33 +00:00
Thibault Delavallée a868d1ba48 [FIX] crm: correctly call probabilities computation
This commit fixes 9ac5f42cd0c381bdddfd196721983057bab7028b by correctly calling the probabilities
computation method. It was a backport of a master fix and methods names are
slightly different.

closes odoo/odoo#42643

X-original-commit: 2e41f129ee39786c8259af792635e3b0f3dbfa3d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-02 17:34:44 +00:00
Yuzifu 30e495a241 [FIX] mail: allow to translate the title
Of the rename conversation dialog

closes odoo/odoo#42630

X-original-commit: f9479456c0924c12c098edaebc2013418c09590c
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-01-02 16:53:02 +00:00
Yuzifu 74dff2a2e9 [CLA[ sign the Odoo CLA
X-original-commit: deeab8eec3a851f7cf33252a916d4aca420d5578
2020-01-02 16:53:01 +00:00
Kevin Baptiste b40f43d52f [IMP] lunch: store company_id of lunch.supplier
For performance reasons, the company_id of a lunch supplier is now
stored.

In a multi-company environment, the multi-company ir.rule was loading
*all* the suppliers in order to check their related company_id.

closes odoo/odoo#42631

Taskid: 2152319
X-original-commit: 0a73eeb0d3163c2c47fb2d25da024ed4a16824ff
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-02 16:54:25 +00:00
Iván Todorovich 7869979591 [FIX] *: use sudo() to call set_onboarding_step_done
This method makes a write on res.company but many people do not have
access to the company

closes odoo/odoo#42644

X-original-commit: 130f08f13b49a529c1da0e1dc603c62337842f45
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-01-02 17:38:05 +00:00
Arnold Moyaux ea340afafa [FIX] mrp_subcontracting: cancel a PO should cancel delivery
When subcontracting a product via a purchase order and not a simple
receipt. Then the cancelation of the receipt will not only cancel
the receipt of the finished product but not the delivery for the
components.

It happens because button_cancel on purchase order will call
_action_cancel the stock.move linked to purchase order line. It will
not call action_cancel on the stock.picking. However the part
responsible for the cancelation of components delivery is in the
stock.picking action_cancel method.

Move the stock.picking action_cancel logic in the stock.move
_action_cancel method since it's always call for both usecase.

Fixes #42551

closes odoo/odoo#42653

X-original-commit: 841305f271411c3a67af271ac09da9ce0922f100
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-02 18:11:33 +00:00
Luis González 858c9ec394 [FIX] website_sale: Don't overwrite address behavior on partner
When the ecommerce module is installed, the partner field's context is overwritten, which causes some features to be lost, e.g. showing the customer address.

This commit fixes the above by merging the content of both contexts.

closes odoo/odoo#42650

X-original-commit: a7027a184f6e76d3580844c29f1b8639b847356d
Signed-off-by: Luis González [Vauxoo] <luisg123v@users.noreply.github.com>
2020-01-02 18:06:37 +00:00
Adrien Dieudonne 67721931f9 [FIX] web: avoid horizontal scroll on kanban mobile
Steps to reproduce:
1. Open 'Project' on mobile
2. You can scroll x while the content fit the screen.

This issue occured because of negative margins on
'o_kanban_manage_toggle_button' class.
In general, using negative margins should be avoided.

So in this commit we simply avoid to have negative margins by
removing unwanted borders. It keeps the same design.

Similar issue:
https://github.com/odoo/enterprise/commit/805ab4d4a329c0fdf7d1cade6c5d7e8428f3a634

closes odoo/odoo#42518

X-original-commit: 38702215e6dff4e562a389ec03cdeb8683cd111c
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-12-30 18:04:57 +00:00
Nicolas Martinelli 021cab27e4 [FIX] account: fix test for 2020
When an invoice is duplicated, the `invoice_date` is not carried over.
If the field is not set, it will be set at posting at the current date.

closes odoo/odoo#42622

X-original-commit: 135d3db7b9b222be198e91235657bbef77d2f69b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-02 15:50:57 +00:00
Simon Lejeune 28a3430de1 [REF] stock_account, mrp_account: valuation layer and not admin user
missing bit from rev[0] and [1]

[0] 7ef11e3
[1] d6c8c34ef6539dad110f1e502eaee2c03d968797

closes odoo/odoo#42621

X-original-commit: 5096e724643ca77568ce2f09a40b138561f4c20f
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-02 15:48:56 +00:00
Ankita Raval 6f0985bae1 [FIX] Product: Search with Reference in product move
Before commit:
-when we search in product move with reference its not working because
 the Reference filter is made based on picking_id in place of reference
 field.

After commit:
-we made a reference filter based on reference field so when we search in
 product move with reference its working.

closes odoo/odoo#42620

Task-id: 2165919
X-original-commit: 7f1141687d4cede2a600f49441ac2ecd0f123c89
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-02 15:48:16 +00:00
Jorge Pinna Puissant 1f4c65ef3e [FIX] l10n_it_edi: sent certified email without catchall and bounce
Before this commit, when the domain alias was set (e.g. my_domain.com),
the reply-to and the reply-path were filled with default values using
this domain (e.g. reply-to : catchall@my_domain.com and reply-path:
Return-Path: bounce+number@my_domain.com)

Now, both are filled with the sender email.

Fine-tuning of 66c5053

opw-2127407
opw-2161942

closes odoo/odoo#42619

X-original-commit: 417d69c6ec45310ae22d40adfa70080188a1b1f5
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-02 15:44:15 +00:00
Swapnesh Shah eb04e1c9ad [IMP] website_slides: use float_time widget on total_time
In this commit we use the float_time widget on total_time field in order to
achieve an amazing wow onboarding back2basics effect.

closes odoo/odoo#42360

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-02 15:37:09 +00:00
Swapnesh Shah 32695d2747 [FIX] sms: do not add 'preview' action for SMS templates in dropdown menu
'Template Preview' action shouldn't be accessible through the action dropdown
as it is linked to a given template and accessible directly from the
template form view. Having it available in dropdown makes no sense.

closes odoo/odoo#42353

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-02 15:29:43 +00:00
nje-odoo 92472fbf9c [IMP] lunch : make field translatable.
Now we can translate name and description field in lunch.product object
and we want that translation in kanban view of 'lunch.product.report'.

So we set related field in 'lunch.product.report' and remove those fields
from init().

Due to related field it will affect on performace of lunch.product.report
kanban view loading.

Task-2068989
closes odoo/odoo#41206

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-31 12:17:26 +00:00
David Beguin 5b62f6e0b6 [IMP] website_livechat : enable chat request on all livechat enabled pages
Before this commit, only the tracked page can start the chat request at visitor
side. Which is a bit sad as the operator can send the visitor a chat request
but if the visitor goes on a non tracked page but has the opportunity to start
a livechat, the chat request won't reach the visitor.

This commit refactor the way a chat request is sent to the client side.
Instead of looking for a opened chat request on every page request,
the chat request information (if any opened) is added to the channel info
that are given to the Livechat button widget.

If the widget receives chat request infos, the widget set himself, before
starting, the cookie of the livechat session using the chat request
informations. Then, the conversation (from chat request) is automatically
loaded as any other opened chat session.

Task ID: 2081550
PR #40274

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-02 15:14:47 +00:00
Tiffany Chang (tic) 12eb45301f [IMP] website_slides_survey: add survey course visibility
Previously there was no way to view when a survey (specifically a
certification survey) was being used by a course from the survey
app. We handle 2 cases for when a survey is currently assigned to
a course:

1. A survey is assigned to 1 course => survey form stat button visible to bring user
   directly to corresponding course form.
2. A survey is assigned to more than 1 course (unlikely, but currently possible) =>
   survey form stat button visible to show user a list of corresponding courses where
   each list entry can be clicked on to view corresponding course form.

Note: we do not cover viewing courses a survey was previously assigned to as this would
   be currently be unreasonable to track.

closes odoo/odoo#42336

Task: 2153743
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-02 14:47:04 +00:00
Vishnu Thuletiya acc063f870 [FIX] web: my profile opens in background on mobile
Purpose of the task is, in mobile view when you click on my profile button it
open profile in back ground and menu(burger menu) will stay open.

so close the burger menu in mobile when clicks on my Profile or Preferences.

Task: 2152160
Closes: #41899
Enterprise PR: https://github.com/odoo/enterprise/pull/7275

Related: odoo/enterprise#7275
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-17 05:00:47 +00:00
Barad Mahendra 5af891c490 [IMP] hr_expense: add upload button on expenses kanban view
Purpose of the task is to improve the mobile user experience of
the Expenses app by adding the upload button to the Expenses
kanban view.

Task ID: 2152155

closes odoo/odoo#41839

Closes: #41839
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-31 04:36:00 +00:00
Patrick Hoste 40d2f95a8d [IMP] website_sale_slides: add buy button to documentation courses
Currently if slides officers or managers define documentation courses as
on payment there is no easy way for customers to buy it.

In this commit we add a button on the frontend to allow the end user to buy
a documentation course like a training course. This button is displayed
only for on payment documentation courses, leaving other documentation courses
displayed untouched.

Task ID : 2125086
PR : odoo/odoo#40679

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-02 15:12:48 +00:00
Thibault Delavallée b347ad0eb6 [REF] website_sale_slides: reorder templates and improve buy templates
Purpose of this commit is to

  * extract buy now button in its own template to ease its improvements
    and re-use;
  * rename some templates to improve "Customize" menu entries;

Task ID : 2125086
PR : odoo/odoo#40679
2020-01-02 15:12:09 +00:00
Hardik Prajapati a7b2180a81 [IMP] l10n_vn: anglo-saxon accounting set default as true
closes odoo/odoo#42605

X-original-commit: a14994ef6490e52738ee298ed5111e3704f8cccb
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-02 14:19:36 +00:00
Victor Feyens a21e8aad86 [FIX] repair: on the fly customer creation
When creating a customer on a repair order form view, it isn't considered
as one.  An adapted context key is needed to make sure the new res.partner
is correctly saved as "customer".

Fixes #42449

closes odoo/odoo#42601

X-original-commit: 534ef6a87c3a9e8b0cf23a4cd8a487a0a66715c0
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-02 14:00:01 +00:00
Nicolas Lempereur d138a708a0 [FIX] web_editor: Revert "update attribute of edition container"
This reverts commit 404fa816403b60c0d6e36bef6f2c73f020ea5ff3.

The commit acts on some special case. But it seem to break some case
when there is a t-ignore or other directive at that same element.

Reverting because a good solution would need to take
into account t-attr-class and this might not be possible easily.

opw-2122947

closes odoo/odoo#42599

X-original-commit: da62f7e65bd1df67138fe9a82000f800dc0ff84c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-01-02 13:56:54 +00:00
Jorge Pinna Puissant c34a1e7f2f [FIX] base, website: debug assets in multi-website/multi-company
Fine-tunning of 42eec88e5da164e4930c48113109f2c8d4b73da3

Before this commit, the assets were not found when the user is connected
in mode debug assets in a multi-website and multi-company. This occurs
because the attachments (assets) were created only for the first website
accessed, and cannot be loaded when trying to access the second website.

Now, the attachments are created for each website accessed and can be
loaded withtout problems.

closes odoo/odoo#42593

X-original-commit: 95077a8cdd9f2cd99c2ef85bdf7ca5d58e006b71
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-01-02 13:32:39 +00:00
Damien Bouvy bd5305a51b [FIX] base: better multi-company rules for partners
Commit d86c2c5883 removed the multi-company partner rule because it
interfered with the users rule. Indeed, interference between the user's
default company and its corresponding partner's company made it possible
to have users that were basically unselectable in relational fields if
you were not viewing more than one company at the same time.

However, this generates a lot of frustrations and tickets for Odoo
users, since having everything shared by default is annoying and a clear
departure from the expected behaviour.

This commit tries to mitigates this fix's side-effects by re-introducing
the multi-company rules but by not applying it to partners who are linked
to a non-share user (basically, any partner who has a user that is not
a portal user). That way, customers and vendors remain filtered by the
multi-company rules and only partners of internal users bypass the rule.
This is still a side-effect, and might raise a few eyebrows (why is this
partner visible even though it is in another company?), but the
trade-off seems to be worth it since it fixes the original issue with a
far smaller behaviour change.

Fixes #41720.

closes odoo/odoo#42592

X-original-commit: 2390ba60b8bd624daaea2e6d4e3fd85ef1b1faeb
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-01-02 13:31:28 +00:00
jerome hanke (jhk) 7757a63fc2 [FIX] base_import: handling of scientific notation
Steps to reproduce:
-install sales
-try to import a product file with volumes set to scientific notation
(9.2e-05 for example)

Previous behavior:
scientific notation is not recognized by the base_import module
and raises a small warning

Current behavior:
scientific notation is converted to decimal notation on the fly
when possible

opw-2162353

closes odoo/odoo#42591

X-original-commit: 9acd76c5d116abd07207af3b548658ad983ff82d
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-01-02 13:31:09 +00:00
Andrea Grazioso (agr-odoo) c1fea08517 [FIX] account: fix tax basis display on report
Activate multicurrency. The default currency for the company should be
USD. Make an invoice in EUR, with taxes, save and create the invoice.

The tax section will display the correct tax amount but the displayed
amount on which the tax should be applied is wrong: it's displayed the
amount in the company currency rather than the invoice currency.

Adding a _convert step to restore the correct currency since that
information does not appear to be saved in the database

opw-2161039

closes odoo/odoo#42494

X-original-commit: f9a8015ef8231a23cf8e5552c08248cfc95e977c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-12-30 14:09:23 +00:00
e1f4205ef3 [FIX] mail: reset suggested partner when record saved
Before this commit, when "Send message" composer was open with some
suggested recipients, and then editing and saving data related to
the suggested recipients, the suggested recipients were not updated
on composer until some user interactions like page reload.

Steps to reproduce:

- Open an opportunity in CRM;
- Open "Send message" composer;
- Change "Email" field;
- Save changes;
> Suggested recipient above composer textarea is not updated with
newly saved email adress.

It becomes updated only after some user interactions, such as toggle
"Log note" then "Send message" or with a page reload.

This commit fixes the issue by updating the suggested recipients on
the composer in real-time when clicking on "Save".

Task-Id 2089816

closes odoo/odoo#40033

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Co-authored-by: Alexandre Kühn <aku@odoo.com>
2020-01-02 13:38:47 +00:00
Nicolas Martinelli dc55cc6468 [FIX] base, account: fix test for 2020
When `invoice_sequence_number_next` is set in [1], the move date is not
taken into account to find a corresponding `ir.sequence.date_range` in
[2]. We use the current date instead.

However, when the move is posted we use its date to find the
`ir.sequence.date_range` [3]. This leads to an inconsistency: we set
`invoice_sequence_number_next` on the `ir.sequence.date_range` of the
current date, but at posting we use the `ir.sequence.date_range` of the
move date.

The fix is to take into account the move date when we set
`invoice_sequence_number_next`.

[1] https://github.com/odoo/odoo/blob/40c8da4bd47d99a97b7231f2749c8e981f35a1a0/addons/account/tests/test_account_move_in_invoice.py#L829
[2] https://github.com/odoo/odoo/blob/40c8da4bd47d99a97b7231f2749c8e981f35a1a0/addons/account/models/account_move.py#L1153
[3] https://github.com/odoo/odoo/blob/40c8da4bd47d99a97b7231f2749c8e981f35a1a0/addons/account/models/account_move.py#L2096

closes odoo/odoo#42580

X-original-commit: 45d126405b030610fc66b8557a668f0d61e129dc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-02 12:49:13 +00:00
Prajapati Hardik 3a541a8ae1 [FIX] l10n_cn: clean taxes name
closes odoo/odoo#42548

Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-02 12:09:30 +00:00
Rémy Voet (ryv) 4c98c92bd0 [FIX] mrp: fix gantt unavailability
_get_unavailability_intervals didn't return the correct
dict (describe in the docstring). Then the override in
maintenance module was wrong.

task-2082261

closes odoo/odoo#42530

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-12-31 09:43:21 +00:00
Kishan Gajjar c0a1ff9bc1 [FIX] mass_mailing: restore background color option for mailing snippets
Changing the background color was not working
because 'o_mail_snippet_general' having a background color white.
while bg-* colors are applied on a parent of 'o_mail_snippet_general'

closes odoo/odoo#42513

X-original-commit: 751dd4c16f8e6c9e373bd9be3a783cde2833947d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-30 16:46:56 +00:00
Nicolas Martinelli 6956ebbce6 [FIX] mrp: unbuild with push rule
- Create products A & B
- Create a BOM: 1 unit of A to produce 1 unit of B
- Create a Route which applies on products with the following Rule:
  Action: Push To
  Operation Type: YourCompany: Internal Transfers
  Source Location: WH/Stock
  Destination Location: WH/Stock/Shelf 1
  Automatic Move: Automatic No Step Added
- Apply the route to A
- Create a MO for B, validate
- Create an Unbuild Order for the MO created, validate

The component (A) has a `stock.move` to WH/Stock/Shelf 1 but a
`stock.move.line` to WH/Stock.

This is because the `stock.move.line` is created when the quantity is
set in:

https://github.com/odoo/odoo/blob/98b1039705d5911946ed3b5180e4d114dc809ed4/addons/mrp/models/mrp_unbuild.py#L151

However, the `_run_push`, which only changes the `stock.move` location,
is called on `_action_confirm` during the call to `_action_done`:

https://github.com/odoo/odoo/blob/98b1039705d5911946ed3b5180e4d114dc809ed4/addons/mrp/models/mrp_unbuild.py#L152

The solution is to call `_action_confirm` before the creation of the
`stock.move.line`.

opw-2156132

closes odoo/odoo#42493

X-original-commit: ac0f43f704a988f11e4670e241380b76dc81f8fc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-12-30 13:53:10 +00:00
Samuel Degueldre 6481d0b353 [REF] website, *: remove unused class oe_custom_bg
*: web_editor, website_forum, website_mass_mailing, website_slides

This class no longer does anything.

Part of odoo/odoo#41561
task-2155808

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-31 13:25:21 +00:00
Samuel Degueldre de6589619b [IMP] website, web_editor: migrate background options to use imagepicker
The previous commit introduced a new imagepicker uservaluewidget, which
allows the user to select a picture or video in a generic way, this
commit adapts the background and CoverProperties snippet options to make
use of this uservaluewidget instead of duplicating most of the logic.

Part of odoo/odoo#41561
task-2155808
2019-12-31 13:25:19 +00:00
Samuel Degueldre f8632ec6f3 [IMP] web_editor: add an image-picker UserValueWidget
This commit introduces a new web_editor UserValueWidget on the
we-imagepicker tag, this widget allows the user to pick an image or a
video using the MediaDialog, and calls the containing snippet option's
method (specified via data-attribute) with the url of the chosen picture
or video as widgetValue. Videos are disabled by default and can be
accessed through the use of the data-allow-videos="selector" data
attribute, any $target that matches the selector will have videos
available in the media dialog.

Part of odoo/odoo#41561
task-2155808
2019-12-31 07:58:10 +00:00
Samuel Degueldre 38b5c759f3 [FIX] website: fix cover properties not saving properly
In 2cc8316c66, the cover properties snippet option was refactored to
using a single data attribute per select instead of repeating it on
every button inside of it. After selecting an option, the corresponding
data attribute would be set on the cover container by finding the
currently active button and copying its select class attribute.

However, because of an oversight, instead of finding the currently active
button inside the select, the option would find any active item inside
of the select, and because the select is always open when a button
inside is clicked, the first active item inside of the select is its
toggler.

This commit fixes that by increasing the specificity of the selector
that finds the active button to only find buttons, and not the
select-menu toggler.

closes odoo/odoo#42567

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-01-02 11:08:46 +00:00
Simon Lejeune 989a78b3fc [REF] stock_account: valuation layer and not admin user
missing bit from rev[0]

[0] 7ef11e3c96

closes odoo/odoo#42517

X-original-commit: 8ff69abc9010bb2aa05dea5a5f2e1fa545e6179c
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-12-30 17:49:26 +00:00
Prakash Prajapati a4c92c6aed [FIX] website_form: fix several issues when editing a form
This commit fixes the following points:

- While dropping a form builder, the default action is now set to
  'Send an email' instead of first available action.

- Titles of the forms which previously were readonly, are now editable.

- When sending an email, the 'reply-to' address is now set from the
  email field provided in the form, instead of the catchall mail.

- Hitting 'Send' button for 'Send an email' option now immediately
  sends the mail instead of putting it in the queue.

task-2082970

closes odoo/odoo#42515

X-original-commit: 7ada68cc91fde1b6eff151549808a20e85cb5bf7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-30 17:06:39 +00:00
Romain Derie b703d3b0c7 [FIX] website_mail(_channel): don't use self.env in controller
Without this, it will crash since self.env does not exists in a controller.
Using request will still crash later since `check_followers` does not exists.

Introduced with 957c99abd5

Found while working on task-2152191

closes odoo/odoo#42509

X-original-commit: 70e4a716feda7acb7385a98ac51ab40dabc3f50e
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-12-30 16:09:25 +00:00
qsm-odoo f17e5d3339 [FIX] web_editor: allow to change common BS3/BS4 colors used on snippets
Hardcode some existing colors (but make them hidden in the colorpicker)
so they can be removed from snippets when selecting another color.
Normally, the chosable colors do not contain them, which prevents them
to be removed. For example, normally, the 'alpha' and 'beta' color
(which are the same as primary and secondary) are displayed instead of
their duplicates... but not for all themes.

This commit was mainly about the addition of 'success', 'info',
'warning' and 'danger' colors to the list (as we do not give the
possibility to select them through the editor but they might still be
used by snippets or in old databases). This also solves a bug for
upcoming features in master.

This commit also makes the excluded sections of the colorpicker hidden
instead of removed for the same reason.

In preparation of task-2152191 and others.

closes odoo/odoo#42505

X-original-commit: 222f72386a8a0a28ff450bf8dfa6a1ac8fa48d8e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-30 15:40:00 +00:00
David Tran f61ea1c38c [FIX] website_theme_install: use correct values for new menu creation
closes odoo/odoo#42486

X-original-commit: 0db925b4ecb63360fa764bc596fb3c0a4c0a63d1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-30 13:14:29 +00:00
Debauche Stéphane 97b23f51a9 [IMP] purchase_stock: fix alert if move created
The delay alert is only triggered when writing on the date,
We want also to trigger it when themove is created.

Task #1970595

closes odoo/odoo#41953

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-12-30 15:15:00 +00:00
Debauche Stéphane a7ceadd30b [FIX] purchase_stock: fix delay_alert on stock move created from PO
Add a field `delay_alert` on the purchase order line, and set in in `_prepare_stock_moves`.
So, we can use this new field to set the value (`delay_alert_date`) on the stock moves.

Task #1970595
2019-12-30 15:13:49 +00:00
Debauche Stéphane a73bed91a0 [IMP] stock/mrp: add a new alert system in the form view
Add two widgets in the `mrp.production` / `stock.picking` form view.
The widget is visible only if one of the stock move linked to the `mrp.production` / `stock.picking`
has the flag `delay_alert_date` set.

Task #1970595
2019-12-30 15:12:08 +00:00
Debauche Stéphane b7f46da90d [IMP] mrp: remove field date_start_wo
This field has been removed, and we now use `date_plan_start` instead.

Task #1970595
2019-12-30 14:27:19 +00:00
Debauche Stéphaneandsle 490addf86b [IMP] stock: improve the alert system
Remove the "manual" system alert and replace it by a date field, `delay_alert_date`.
This field is computed in the method `_delay_alert_check` when we write on the date of a stock move.
The method `_delay_alert_check` look to the next stock move and to the previous know to
check if they will be late or not.

If a stock move will be late because of one of the previous stock move, `delay_alert_date`
will contains the minimal date that the stock move should have. Otherwise, `delay_alert_date`
will be False.

Task #1970595

Co-authored-by: sle <sle@odoo.com>
2019-12-30 14:27:17 +00:00