Commit Graph
134398 Commits
Author SHA1 Message Date
Christophe Monniez bf3f67be28 [IMP] web: add a light mode to clickEverywhere test
The test clickEverywhere may last a very long time when all modules are
installed. For that reason, it's not a standard test and we run it at
night.

Unfortunately, it may happen that an App menu breaks and that this
failure is only spotted the next morning.

With this commit, a light mode is added to the clickEverywhere test. In
this mode, only the app menus are tested.
Also, two python tests are added that use this mode and are launched as
standard tests.

closes odoo/odoo#46934

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-05 08:06:02 +00:00
jvm-odoo 1a7e0fb01b [FIX] mass_mailing: remove inactive lists from mass mailing
Issue

	- Install Mass Mailing
	- Create 2 mailing list (x & y) with differents
	  contacts
	- Create a mass mailing with x & y, send it

	Ok, sent to everyome

	- Archive mailing list y
	- Duplicate the last mass mailing, send it

	Not ok, sent to y contacts too

	When a list is archived, I can't manually
	remove it from the mass mailing (it disappears)

Cause

	When archiving a list, it still remains in
	contact_list_ids

Solution

	Prevent archiving a mailing list if any mass mailing
	using it exist with state != 'done'

	Re-evaluate the domain field at copy

OPW-2202111

closes odoo/odoo#47094

X-original-commit: 4346f1da7a26a11f49c8e76f6ed8d6d6078a1d8a
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-03-06 14:27:02 +00:00
jerome hanke (jhk) 33895b3fd7 [FIX] account: show taxes when they are zero on invoices print
- Create a 0 % tax
- Create an invoice with a line using the 0 % tax
- Print the invoice

The 0 % tax is not shown in the 'Tax amount by group' summary, while it
should be.

In 12.0, the 0 % is created in `account.invoice.tax`, therefore the tax
is shown. However, in 13.0 there is no `account.invoice.tax` anymore,
and no journal item is created for a zero amount. Therefore, the tax is
not shown.

We explicitly loop on the zero taxes and add them in the 'Tax amount by
group'.

opw-2209343

closes odoo/odoo#47092

X-original-commit: 37a0f7acae8aebef35577b178f8aeefed11c9105
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-06 14:25:09 +00:00
Goffin Simon ca72c490d0 [FIX] website_sale: Wrong pricelist in 'Suggested Accessories'
Steps to reproduce the bug:

- Let's consider two products P1 and P2 where P2 is an accessory of P1
- Let's consider a pricelist PL1 where P1 and P2 = 10€
- Let's consider a pricelist PL2 where P2 = 20€
- Set PL1 as pricelist of Public user
- Set PL2 as pricelist of Odoobot
- Go to the shop with Public user and add P1 in the cart

Bug:

The suggested product P2 was at 20€ instead of 10€

opw:2206947

closes odoo/odoo#46973

X-original-commit: a9351a0b28ea753e3b7846dbd6aaade7eca96345
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-03-05 13:06:49 +00:00
jerome hanke (jhk) da29849414 [FIX] account: partner vendor view has vendor filter by default
Steps to reproduce:
- install accounting
- go to accounting > vendors > vendors

Previous behavior:
all contacts are visible

Current behavior:
the vendors filter is set by default

opw-2185332

closes odoo/odoo#47095

X-original-commit: b77cdc020c1e338e09960ab9dea3f3ec907a3fa6
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-06 14:27:56 +00:00
Romain Derie 8066001ee4 [FIX] website: add test for 5ac269d722f
5ac269d722f fixed 7e2b0ebe799 that prevented the website menu to actually be
visible, since the JS in charge of displaying the menu was 'crashing'.

A test was missing to avoid that issue to appear ever again, since it is quite
a critical problem.

Note that it might look strange that breaking such a mechanism does not make
the runbot red, but since the menus are actually considered visible, the tests
are able to 'see' it in DOM and click on it.
They are actually hidden through an opacity 0 & height 0 while the JS process
them.

task-2093679

closes odoo/odoo#47138

X-original-commit: 0dc00a252dfe7fee658579a60dc7b1b1ca71a661
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-07 12:16:12 +00:00
qsm-odoo 05d17089c4 [FIX] web_editor, website: review default palette system
Before this commit, this was done:

1) Primary variables (app order):

(a) web_editor: define palettes (color + theme + gray), only 1 empty
                one. Mark the first ones as the selected ones.

(b) website: fill all defined palettes with the website-related
             color key and values (body, menu, logo-height, etc).
             + define "website values" palette.

2) Secondary variables (reverse app order):

(c) website: merge the user palettes on top of the selected palettes
             (so user values overriding values added in (a) and (b)),
             the resulting palettes are added in palettes lists and the
             selected palette numbers are set to select those ones.
             + final selection of "website values" palette.

(d) web_editor: final selection of the selected color palette amongst
                the color palettes.

--

The problem with all of this is that the definition of palettes
in themes (occuring between step (b) and (c)) never received the
website-related color key and values of step (b) and were thus forced
to redefine all of those by themself even if they wanted to use the
default website one.

This commit changes the system so that step (a) and (b) now define
"base" palettes (color, theme, gray, website values) and step (c) and
(d) now merge the final selected palettes with those "base" palettes.
This is in fact theoratically more efficient and allows to not force
themes to define every possible palette value we might introduce.

closes odoo/odoo#47097

Related: odoo/design-themes#216
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-07 11:09:36 +00:00
fja-odoo acdf3cf7f5 [IMP] website: add redirect icon to we-urlpicker
Add an icon to open the url the we-urlpicker currently holds in a new
tab.

part of: https://github.com/odoo/odoo/pull/45397

task-2197008

closes odoo/odoo#45397

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-06 16:25:34 +00:00
fja-odoo f07b5b9d74 [IMP] website_form: add/rename form options
Add a height option on textarea
Rename some fields
Add margin on default form

part of: https://github.com/odoo/odoo/pull/45397

task-2197008
2020-03-06 16:25:34 +00:00
fja-odoo b943dd83f6 [IMP] web_editor: add default opt selectAttribute
Add default option selectAttribute
Most of the logic is shared with selectDataAttribute

part of: https://github.com/odoo/odoo/pull/45397

task-2197008
2020-03-06 16:25:34 +00:00
jpr-odoo 223038682f [FIX] web_editor: correct parsing of dailymotion URL
The parsing of dailymotion URL was not done correctly. This made the
media dialog duplicate the URL params if such an URL was re-edited.

task-2159152

closes odoo/odoo#47102

X-original-commit: 8d8f442f62919b1cee595ed1fae2c6e4f05eb8fa
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-06 14:55:03 +00:00
Sébastien Theys b07728e94e [FIX] web, website_*: avoid inline style for image width 128
closes odoo/odoo#47134

X-original-commit: ccb00bd40e7ce58108aeb3ca66abf28a1e12c290
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-03-06 20:04:05 +00:00
alt-odoo 8e98d71f36 [FIX] payment_paypal: missing parentheses in mc_gross computation
This is a small fixup of previous commit 581020c733044b52cacd0d41a6a8eb8708671d0d.

closes odoo/odoo#47127

X-original-commit: e1e224bbf880718bcfb8d3874bad003aef5e8a27
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2020-03-06 17:45:16 +00:00
jvm-odoo 0f0d0e59bc [FIX] payment_stripe: fix empty error when cancelling payment
Issue

	- Install eCommerce
	- Set Stripe up (API keys)
	- Go on Shop
	- Add a product > Checkout
	- Pay with stripe
	- Go back when arriving on Stripe payment page
	  (top left link)

	Empty error box

Cause

	This behavior is not handled by payment_stripe

Solution

	Cancel transaction when going back.
	It will display a message "transaction cancelled"

OPW-2195385

closes odoo/odoo#47113

X-original-commit: b8b9a04ff5b5b2ba40b26632e2395b7cdb7ea300
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-03-06 15:53:22 +00:00
Paul Morelle 72244ca755 [FIX] website_*: force width of partners logos to 128px
* = website_crm_partner_assign, website_customer

Follow up of [1] which still had a misalignment for logos higher than large
(portrait), or logos smaller than 128px.

The layout of the related pages relies on the logos being exactly 128px for the
text following the images to be aligned.

There are two issues to fix:

- When images are bigger than 128px, due to incomplete migration at this time:
  `o_image_128_max` is added to ensure they are not displayed bigger than 128px.

- When images are smaller than 128px, due to the original image being too small:
  the parent element of the image is forced to the expected width of 128px.

  The 128px width is actually not forced on the image itself but on the parent
  of the image in order to:

  - avoid a rectangular image (larger than tall) from using 128px height and
    creating empty space when its height is actually smaller,

  - and avoid images smaller than 128px to be scaled up.

Additional fix:

In "Our References" template, remove the `row` class on the container of
media elements, so that all media are always on their own line.

[1] 8748416b4d8ae4840d7738a0edf226f3240d97cb

closes odoo/odoo#47093

X-original-commit: 5e3242f904ddcee9cf660f13b446b88bead35777
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-03-06 14:25:27 +00:00
jbw 4927d66635 [FIX] account : wrong field name for mapped on account_move
The "type" field of account_move was renamed "move_type".
Previous name "type" was still used in account_resequence.py.
Error : https://pastebin.com/kqpbA9Sh

closes odoo/odoo#46989

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-03-05 14:09:25 +00:00
Lucas Lefèvre 7be54c3a5e [IMP] hr_recruitment: Create applicant's partner as private contact
Purpose
=======
In the Recruitment app, when a new applicant is created and moved staged,
an email may be sent according to the stage configuration.
If the email is not found in the database, a partner is created.
The new contact is now visible and available to the rest of users
(for example can be selected as a customer on a SO), which is a potential
security risk as only HR employees should be able to see this
applicant information. There should be a way to limit the access to this
applicants Contact, for example defaulting the type to private rather
than contact.

Specification
=============
The created partner should be of type private.

closes odoo/odoo#46351

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-06 14:20:42 +00:00
Krupa Patel 5f85a7605a [FIX] web_editor: add focus in url input of link dialog
Before this commit, when clicking on the link button after focusing a
link, the first input of the link dialog was hidden (label), and the
second input (URL) was not focused.

In this commit, we focus the first *visible* input so users are able to
directly copy-paste URL.

task-2083209

closes odoo/odoo#44931

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-06 13:47:16 +00:00
Odoo's Mergebot 034d1c1c7f [MERGE] website slides: add course tags to eLearning frontend
PURPOSE

Add more visibility to course tags as well as the ability to add new ones via
the front-end.

SPECIFICATIONS

Course tags are only viewable in the courses page. In this merge we add more
course tag functionality by:

- making course tag creation more intuitive via backend
- making course tags viewable within a course's specific webpage
- making it possible for those with the correct access rights to add new
  course tags via the course's specific webpage (via a "+ Add Tag" button)
- adding the ability to assign colors to course tags
- note that coloring should not show when courses page is filtered by course
  tag to allow for easier identification of tag filters.

See sub commits for more details.

LINKS

Task: 2128166
Migration PR: odoo/upgrade#862

closes odoo/odoo#44365

Related: odoo/upgrade#862
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-06 15:48:03 +01:00
jvm-odoo 3b862b4c29 [FIX] website_links: fix UI for big data
This commit increase the containers sizes in linktracker
because at the moment it's not adapted for big data.

It also add title attributes on truncated link to
preview the full link on hover.

OPW-2203428

closes odoo/odoo#47071

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-06 11:10:48 +00:00
jbm-odoo 5889dc3cc4 [FIX] fleet,hr_fleet: Fix user rights
Task ID: 2170625

closes odoo/odoo#47079

X-original-commit: ee13013808460c5100bec03ed415fc184ff031e5
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-06 12:43:06 +00:00
Arnold Moyaux 1d1cdf3929 [FIX] stock_landed_costs: allow to create landed cost
The checkbox on product in order to define landed cost is under the
invoice tab. However it requires complex manipulation to be displayed.
Move the option under the purchase tab

closes odoo/odoo#47073

X-original-commit: f7567f10dd0cc936336066e7835c908fde163dc0
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-06 11:15:37 +00:00
Arnold Moyaux 871a925045 [FIX] stock_landed_cost: ensure landed cost product
On the landed cost form, the additional costs would allow
product that are not landed cost. It could lead to a misunderstanding
where the user thinks he should enter the picking's products.

X-original-commit: a0b8ebe9136890a950088c5a4195bfab576191a3
2020-03-06 11:15:36 +00:00
Hemali Bhimani 506c9764e0 [IMP] sale: opportunity to print a quote and change the status
currently button "print" does not exist so it is not possible to
reach the status "quotation sent" without sending it by email.
After this commit without "send by email" user can send
and/or print a quote and change the status of the quote to
"quotation sent" and also add the customer as follower

closes odoo/odoo#47008

Task: 2168504
Closes: #46813
X-original-commit: 0088e967afe4b8884e5bd482de855297d956207a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-05 15:23:02 +00:00
Odoo's Mergebot e6c406d8d6 [MERGE] survey: support conditional questions
Purpose
=======

This merge adds a new survey feature : conditional questions. A conditional
question is a question that will be displayed to the user only if the user
selects a specific answer from another previous question i.e. question B is
displayed if user answers 'Choice 1' at question A.

Specifications
==============

There are 2 different ways to handle conditional questions.

  * For one_page and page_per_section survey layout: conditional management is
    done mainly at frontend side. The idea is to be able to load all the
    questions of the section, hide the conditional questions and display them
    dynamically on answer check.
    E.g.: If user checks answer 'Choice 1' from question A, question B is
    displayed immediately.
    If question B is on section 2 and survey layout is set to section per page,
    question B will be displayed immediately on next page template load.
    Indeed, on each page load, server sends all the selected answers and the
    template displays the conditional question depending on the already
    elected answers;

  * For page_per_question survey layout: conditional management is done mainly
    at backend side. The idea is to find on each page the next question to
    display depending on:

    * navigation direction (next - previous)
    * already selected answers and conditional question dependance
    * survey questions sequence

    E.g.: If questions survey are Question A, B and C and question B must be
    displayed if answer 'Choice 1' from question A is selected.
    At Question A, if user select 'Choice 1' and goes next: display B
    At Question B, no matter the answer, if user goes next: display C
    At Question B, no matter the answer, if user goes prev: display A
    At Question A, if user select 'Choice 2' and goes next: display C
    At Question C, no matter the answer, if user goes next: End survey
    At Question C, if user has selected 'Choice 1' at question A and goes prev -> B
    At Question C, if user has selected 'Choice 2' at question A and goes prev -> A

In both modes answers on questions that should not have been displayed to the
user depending on the previous selected answers are cleared.
E.g. : User checks 'choice 1' from question A, then complete question B.
Then user unchecks 'choice 1' -> answer on question B is cleared.

Remove questions that should not have been displayed to the user (depending of
the made choices) in scoring computation and print layout.
--> Inactives questions are removed from predefined questions when user finish
the survey.
E.g.: If the user selects first path on 2, he will never see second path.
If the user answers correctly to all question of first path, he should have
100%, instead of 50%, even if questions of path 2 are mandatory and scored.

Specifications: sessions
========================

This merge makes the live session mode work with conditional question.
The point is to determine which question to display next. As multiple users
are 'voting' for answers of the same questions, the way to determine the
next question to display is to keep only the most voted answer.

The most voted answer will be the only one to trigger the linked conditional
question.

E.g.: considering
- following survey configuration:
    - Q1: A1, A2
    - Q2: triggered by Q1-A1
    - Q3: triggered by Q1-A2
- following user inputs:
    - U1: A1 selected
    - U2: A2 selected
    - U3: A2 selected
The next question displayed to ALL users will be Q3.

Note: If U4 had selected A1, the next question would have been Q2 as
when there is an equality, we select the first one.

Links
=====

Task ID 23509
Upgrade PR odoo/upgrade#906

closes odoo/odoo#44950

Related: odoo/upgrade#906
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-06 14:29:24 +01:00
Odoo's Mergebot fb846dc44a [MERGE] sms, mass_mailing(_sms): review contact list and composer usability
PURPOSE

Improve SMS composer usability, notably in single recipient mode. Allow to
edit and store number directly.

SPECIFICATIONS

  * the SMS button is visible next to a phone number in mass_mailing, and
    mass_mailing_sms;
  * in the mass_mailing contact list, the "email blacklisted" field has been
    moved next to the email field;
  * when mass_mailing_sms has been installed, the mass_mailing contact list
    also shows the phone number and whether this number has been blacklisted
    the mass_mailing_sms contact list also shows the email and whether this
    email has been blacklisted;
  * when sending an sms to a single contact, his phone number is now an
    editable field in the wizard and there is a warning if the number is
    invalid. Therefore the operator can modify the phone number directly
    and this new number is saved onto the record directly;

LINKS

Task ID 2088303

closes odoo/odoo#40482

Related: odoo/upgrade#873
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-06 14:29:10 +01:00
David Beguin 2d499c0236 [IMP] survey: integrate conditional questions in session mode
Purpose
=======

This commit makes the live session mode work with conditional question.
The point is to determine which question to display next. As multiple users
are 'voting' for answers of the same questions, the way to determine the
next question to display is to keep only the most voted answer.

The most voted answer will be the only one to trigger the linked conditional
question.

E.g.: considering
- following survey configuration:
    - Q1: A1, A2
    - Q2: triggered by Q1-A1
    - Q3: triggered by Q1-A2
- following user inputs:
    - U1: A1 selected
    - U2: A2 selected
    - U3: A2 selected
The next question displayed to ALL users will be Q3.

Note: If U4 had selected A1, the next question would have been Q2 as
when there is an equality, we select the first one.

Link
====

Task ID: 23509
PR #44950
2020-03-06 10:29:50 +00:00
David Beguin 3968bed239 [IMP] survey: add conditional questions demo data
Purpose
=======

This commit adds demo data to illustrate the conditional questions
configuration. Users will be able to choose among 4 themes. Depending on their
choice(s), the survey will continue by displaying only the questions related
to the selected theme(s).

Link
====

Task ID: 23509
PR #44950
2020-03-06 10:29:50 +00:00
David Beguin 0675d68afb [IMP] survey: add conditional display option on questions
Purpose
=======

This commit adds a new survey mode : conditional questions. A conditional
question is a question that will be displayed to the user only if the user
selects a specific answer from another previous question i.e. question B is
displayed if user answers 'Choice 1' at question A.

Specifications
==============

There are 2 different ways to handle conditional questions.

  * For one_page and page_per_section survey layout: conditional management is
    done mainly at frontend side. The idea is to be able to load all the
    questions of the section, hide the conditional questions and display them
    dynamically on answer check.
    E.g.: If user checks answer 'Choice 1' from question A, question B is
    displayed immediately.
    If question B is on section 2 and survey layout is set to section per page,
    question B will be displayed immediately on next page template load.
    Indeed, on each page load, server sends all the selected answers and the
    template displays the conditional question depending on the already
    elected answers;

  * For page_per_question survey layout: conditional management is done mainly
    at backend side. The idea is to find on each page the next question to
    display depending on:

    * navigation direction (next - previous)
    * already selected answers and conditional question dependance
    * survey questions sequence

	E.g.: If questions survey are Question A, B and C and question B must be
	displayed if answer 'Choice 1' from question A is selected.
	At Question A, if user select 'Choice 1' and goes next: display B
	At Question B, no matter the answer, if user goes next: display C
	At Question B, no matter the answer, if user goes prev: display A
	At Question A, if user select 'Choice 2' and goes next: display C
	At Question C, no matter the answer, if user goes next: End survey
	At Question C, if user has selected 'Choice 1' at question A and goes prev -> B
	At Question C, if user has selected 'Choice 2' at question A and goes prev -> A

In both modes answers on questions that should not have been displayed to the
user depending on the previous selected answers are cleared.
E.g. : User checks 'choice 1' from question A, then complete question B.
Then user unchecks 'choice 1' -> answer on question B is cleared.

Ignore conditional configuration :

  * during survey session, to avoid having different users answering different
    questions on the same session. That would be confusing for users to see
    questions on presenter screen that they didn't have the opportunity to
    answer;
  * if survey questions selection is random, because it will not display
    conditional questions if they are not kept by randomization. To avoid
    confusion, conditional configuration is simply ignored, not unset, so the
	user can still reactivate it without having to reconfigure everything.

Remove questions that should not have been displayed to the user (depending of
the made choices) in scoring computation and print layout.
--> Inactives questions are removed from predefined questions when user finish
the survey.
E.g.: If the user selects first path on 2, he will never see second path.
If the user answers correctly to all question of first path, he should have
100%, instead of 50%, even if questions of path 2 are mandatory and scored.

Link
====

Task ID: 23509
PR #44950
2020-03-06 10:29:50 +00:00
Victor Feyens 4d1009a275 [FIX] delivery: support multi for delivery_state compute
closes odoo/odoo#47017

X-original-commit: f778cd19be73fb4e6a1ed0d1b9194607578ab1d5
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-03-06 10:21:56 +00:00
Victor Feyens 623d6a066b [FIX] delivery, sale: improve invoice_status performance.
* Avoid reading all lines invoice_status when the SO isn't confirmed.
* Do not use _default_product_id to discern down_payment lines, use is_downpayment instead
	(one ref = one query less by compute call)
* Do not consider display_type lines for SO invoice_status.

X-original-commit: 76a6d0475872f9ffa21cb917f13bc553c720eafd
2020-03-06 10:21:56 +00:00
Victor Feyens 20fec19fd0 [FIX] sale_stock: batch quantities computation correctly.
Available quantities computation is grouped by warehouse,date but using
datetime.now as fallback during the for loop ensures no batch
computation is done at all if order is not confirmed and has no
commitment_date.

X-original-commit: 563d0f73a8cea1933e57ae2b914f161ffeb5b7e4
2020-03-06 10:21:56 +00:00
Ankita Raval 5131572dab [FIX] mrp_workorder: Prevent to delete WO from Gantt
In this commit,Add a attribut "delete" in mrp workorder gantt view
to disable Remove button on "Planning by Workcenter" gantt view.

task-id:2206166

closes odoo/odoo#47064

X-original-commit: 669408f8b1e760a815e212d9e9fab8663e665dd6
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-06 10:20:08 +00:00
fja-odoo c730da7197 [FIX] website, *: fix placeholder translate
* = web_editor

InputUserValueWidget's data-placeholder where not translatable.

task-2210358

closes odoo/odoo#47029

X-original-commit: dfaf497de5eb95f1ba65e927631cc48d97ca6127
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-05 17:10:50 +00:00
Rémy Voet (ryv) 94b39d3ea3 [REF] stock,purchase,repair,mrp: clean ACL/report
For stock, purchase, repair and mrp modules, do a small clean of ACL:
Remove duplication and useless line.
Also improve the readability of the stock traceability report.

task-2172399

closes odoo/odoo#45055

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-06 09:16:16 +00:00
Xavier Morel 93ac430147 [REV] theme_*: rollback categories to just Theme
odoo/odoo#4c291e3f7049c3af859902a6f5857eab68be2f9e changed theme
categories from Theme to Website/Theme, however theme support has
technical dependencies on the category, so this breaks
design-theme (which was missed as design-themes was not yet under the
Not Rocket Science Rule).

Revert the change specifically for the theme modules.

closes odoo/odoo#47059
2020-03-06 09:20:01 +00:00
Loan (lse) 1c1d84255a [FIX] mass_mailing: remove wrong state default value from context
When testing to send an email of a campaign from the automation
marketing app, a traceback is thrown.

This is due to a context error. We define a default value which isn't
possible to be assigned for the variable.

opw-2190077

closes odoo/odoo#47039

X-original-commit: ff1d42e26bca3ce60697f9d4ee28f6aae5b7046b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-05 18:41:12 +00:00
jvm-odoo 0e3b5c265b [FIX] mass_mailing: fix content not saved
Issue

	- Install Email Marketing
	- Create/Edit one of them
	- Save

	Changes not saved

	- Click edit & save

	Changes saved

Cause

	Before 30db768, the order of execution was:

	1. field_html > commitChanges (value = <p><br></p>)
	2. mass_mailing_widget > commitChanges (value = "test")

	After 30db768:

	1. mass_mailing_widget > commitChanges (value = "test")
	2. field_html > commitChanges (value = <p><br></p>)

Solution

	Use this.saveCroppedImages in mass_mailing widget to
	add the delay there too

OPW-2207107
OPW-2207817

closes odoo/odoo#47018

X-original-commit: 31e36fdc9b63fade99cef0c9ac4ed093b3936707
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-03-05 16:05:56 +00:00
Victor Feyens 917e7a1a9b [FIX] product: standard_price depends on company context
Product templates standard_price (cost) is company_dependent,
because the product_product standard_price is company dependent.

closes odoo/odoo#47041

Forward-port-of: odoo/odoo#46841
X-original-commit: 30ee9f1ac411aca9c2bf2158fca9be7db743616d
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-03-05 19:17:17 +00:00
Xavier-Do 5ae6f02e45 [IMP] tests: scan upgrade path for additionnal tests
A future upgrades improvement will be to add tests in upgrades
modules. This small imp will scan in upgrade for some tests,
specific tooling will be added to upgrade repository in odoo/upgrade#878

closes odoo/odoo#47030

X-original-commit: 59b5a03bdf7ae1ad8851a67d278edc31a26a96a8
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-03-05 17:30:22 +00:00
fda-odoo 32c8922432 [FIX] web: eventBusDispatchToDOM set to true in pdf.js
In the module account_invoice_extract, the the code need to react to the 'pagerendered' event triggered by pdf.js. However in recent version of pdf.js, event are not visible outside of the library, except if the 'eventBusDispatchToDOM' has been set to true.

We tried to set this option from outside of the library but without success, as our pdf viewer is in an iframe.
There is no state of the iframe in which we can add an event listener to set the option.
pdf.js has an event used to signal when we can set settings, called 'webviewerloaded'.
This event is triggered in an EventListener attached to the 'DOMContentLoaded' event.
So, to list options we had, we could:
a) add an eventListener to the iframe document or window to react to 'webviewerloaded'. This doesn't work as document and windows are not the definitive ones and won't catche the event later.
b) add an eventListener to the iframe to react to 'DOMContentLoaded', which doens't work too as our listener will be called after the pdf.js one.

Finally the option was choosed to modify the default value of this option directly in pdf.js as no hook worked in the
'account_invoice_extract' module.

closes odoo/odoo#47024

X-original-commit: 42e6f56c887c3175c76f0f84b8581e288ebc7daf
Related: odoo/enterprise#9044
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
2020-03-05 16:31:29 +00:00
Thomas Binsfeld 193ce3de97 [IMP] sale: get invoice grouping keys from an easy to override function
closes odoo/odoo#47023

X-original-commit: d7244f38c1e39d353eacad970a5e1099995238a7
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-03-05 16:31:06 +00:00
Nicolas Martinelli 4ca24a47de [FIX] mrp: default UoM when registering lot
- Create a products A
- Create a products B
  Tracked by lot
  UoM: kg
- Get some quantity in stock for B
- Create a BOM for A: 2g of B to produce A
- Create a MO for A, Produce

In the lot registration wizard, 2kg of B are suggested instead of 2g of
B.

In this case, the UoM of the product is taken instead of the move.
However, it should only be the case if the product is tracked by unique
S/N.

opw-2200263

closes odoo/odoo#47019

X-original-commit: 9d114eb7a48b82b76e9c900cce22dc5022206367
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-05 16:07:34 +00:00
Nicolas Martinelli 3c4c625a0a [FIX] sale_mrp: delivered qty in dropship
- Activate Dropshipping
- Create 3 products: KIT AB, A, B
  All have the Dropship route and a supplier set
- Create a BOM of type kit: KIT AB is composed of A & B
- Create a SO for 1 unit of KIT AB, validate
- Validate the created PO
- Deliver the products

The delivered quantity remains zero.

This happens because the `bom_line_id` was not written on the
`stock.move`. Indeed, the latter is created from a PO, not from a SO.
Since the PO doesn't have a `bom_line_id` field, the information is
lost.

As a solution, we apply the 'all or nothing' policy in case of
dropshipping.

opw-2207118

closes odoo/odoo#47014

X-original-commit: 6016476952f53097f8b04f34bdbaf09c12e431fe
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-05 16:02:38 +00:00
svs-odoo cdddd45a73 [IMP] stock: _get_without_quantities_error_message
Adds a method to be able to override the error message in the case where
the user try to validate a picking with no quantities done nor reserved.

task-2123726

closes odoo/odoo#45457

Related: odoo/enterprise#8364
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-05 13:32:57 +00:00
svs-odoo 3ed3ed183c [IMP] stock_picking_batch: confirm waiting picking
Before this commit, the batch action done processes only if all batch's
pickings are `reserved`, which cause batches with a waiting picking
(`confirmed` state) can not be validated.
As the picking itself can be validated even if it is in waiting state,
it seems logical that we can do the same from batch picking.

task-2123726
2020-03-05 13:32:57 +00:00
svs-odoo 339c40abe1 [IMP] stock: inventory line product_qty readonly
Moves the readonly condition for the `product_qty` field into the model
to have the same condition in the barcode app (enterprise).

task-2123726
2020-03-05 13:32:57 +00:00
Florimond Husquinet (fhu)andThibault Delavallée f685e70616 [IMP] sms: allow to edit number when sending an SMS to one recipient
After this commit

  * the SMS button is visible next to a phone number in mass_mailing, and
    mass_mailing_sms
  * when sending an sms to a single contact, its phone number is now an
    editable field in the wizard and there is a warning if the number is
    invalid;
  * if operator updated the recipient number, update record number according
    to the new number only in single recipient mode (aka, solving number
    issues directly from interface);

LINKS

Task ID 2088303
Community PR odoo/odoo#40482
Upgrade PR odoo/upgrade#873

Co-Authored-By: Florimond Husquinet <fhu@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-03-05 11:27:01 +00:00
Thibault Delavallée e36661ecd9 [REF] sms: improve _sms_get_recipients returned information
Purpose is to improve information given back, adding notably

  * whether the value comes from the customer (partner_id field) or directly
    from the record we are looping on;
  * the actual field used when no specific field is enforced;

LINKS

Task ID 2088303
Community PR odoo/odoo#40482
2020-03-05 11:04:49 +00:00
Thibault DelavalléeandFlorimond Husquinet 3150541bed [REF] sms: composer model cleaning
In this commit we perform some cleaning in composer model before adding
number update feature:

  * remove partner_ids field that is not used anymore. It comes from early
    implementation of SMS composer and is now dead;
  * rename recipient_count to recipient_valid_count to better reflect its
    use;
  * rename recipient_description to recipient_single_description to better
    reflect it is used only in mono-recipient mode;
  * add a new single comment computed field, allowing to display some
    information only when sending an sms to a single given record;

We also fix computed fields by making them work in batch.

LINKS

Task ID
Community PR odoo/odoo#40482
Upgrade PR odoo/upgrade#873

Co-Authored-By: Florimond Husquinet <fhu@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-03-05 11:04:49 +00:00