Commit Graph
140282 Commits
Author SHA1 Message Date
Aurélien Warnon 9622ffe442 [FIX] event: make ticket sale start date inclusive
This commit fixes the ticket sale start date to be considered inclusive.

Indeed, before this commit, if the sales of a ticket starts on the 1st of
December, people arriving on the website at that exact date will NOT be able to
buy tickets although they should be. They will have to wait for the next day to
be able to buy tickets.

A small test was added to ensure this behavior.

Task 2415917

closes odoo/odoo#63685

X-original-commit: ea6952fd7ec881b79a7294c40427ce9966997e66
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-12-22 12:01:05 +00:00
Mohammed Shekha 5e6fd455b1 [IMP] web: export: change field sorting icon to fa-sort
task-2413274

closes odoo/odoo#62998

Related: odoo/enterprise#15215
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-12-22 11:21:03 +00:00
Mohammed Shekha e3be9d183f [IMP] web: editable list: change handle icon to fa-sort
task-2413274
2020-12-22 11:21:03 +00:00
Mohammed Shekha 905ea9bdc6 [FIX] hr_expense: scrollbar in list and kanban
In the expense list and kanban views, there is always a vertical
scrollbar. This is due to the presence of a custom statusbar
displayed above the view. This commit overrides the 'height: 100%'
and 'min-height: 100%' rules set on those views to remove the
scrollbar.

task-2334044

closes odoo/odoo#63681

X-original-commit: d544e584c38f27f8a43f8939d51118f6bf2e0bdc
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-12-22 10:50:26 +00:00
Aurélien Warnon 2a27fb5a2a [FIX] website_crm_partner_assign: fix opportunities portal page without currency
When you remove the 'company_id' on a crm.lead, you also remove the computed
'company_currency'.
When trying to view this kind of leads in the website_crm_partner_assign portal
page, it would raise an error while trying to display the planned_revenue in
the missing currency.

Now, we display the number without any currency sign, which is a "best effort"
solution, just the same as on the crm.lead form view.
So it will look like "9000 at 47%" instead of "$9000 at 47%".

Task 2416841

closes odoo/odoo#63657

X-original-commit: aafbde0b72347b348a7a5a59c934f063247ba4de
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-12-21 16:16:43 +00:00
Adrien Widart 41613de6ca [FIX] stock: no backorder if added on delivery page
In the Barcode app, if the user is on a delivery order, adds a product
and then decreases the product's quantity, when validating the order,
the backorder window is displayed.

To reproduce the error:
(Need sale_management,stock_barcode)
1. Go to Sales
2. Create a SO
	- Add one Product P
3. Save, Confirm
4. Check the generated delivery reference R
4. Go to Barcode > Operations > Delivery Orders > R
5. Complete the P's quantity
6. Add Product
	- Select a Product P_extra
	- Set a quantity (e.g., 1)
7. Confirm
8. Edit the P_extra's line
	- Decrease the quantity (e.g., 0)
9. Confirm
10. Validate

=> A window is displayed so the user can create a backorder for the
missing P_extra. Since the SO does not contains any P_extra, proposing
to create a backorder does not make sense.

When adding an extra product to the delivery, it creates a stock move
line with the `product_uom_qty` set to 0. Since there isn't any stock
move associated, it also creates a new one. Here is the issue: the
`product_uom_qty` of the stock move is defined thanks to the `qty_done`
of the extra product. Later, when validating the delivery, the server
uses the `product_uom_qty` of the stock move to check if a backorder is
needed. This the reason why, if the user decreased the quantity, the
backorder proposition is displayed: the `qty_done` is less than the
`product_uom_qty`.

OPW-2411461

closes odoo/odoo#63664

X-original-commit: f5c0990c6af2f44f503de1cc50cc5b094e31976a
Signed-off-by: adwid <adwid@users.noreply.github.com>
2020-12-21 17:48:52 +00:00
Adrien Widart 2f93435642 [FIX] account: cascade delete of reconcile lines
When deleting an `account_reconcile_model`, it does not delete the
corresponding `account_reconcile_model_line`. Moreover, this may prevent
the user from using the l10n_de_skr04 module.

To reproduce the error:
(Use demo data)
1. Go to Apps
2. Install "Germany SKR04 - Accounting"
3. Change the company
	- Select "DE03 Company"
4. Go to Settings > Invoicing > Fiscal Localization
5. Change the package
	- Select "Deutscher Kontenplan SKR04"
6. Save

=> A validation error is displayed: "The operation cannot be completed:
another model requires the record being deleted[...]".

When changing for SKR04, the module's installation first deletes some
models, among them: `account_reconcile_model` and later `account_tax`. The
validation error appears on `account_tax` deletion. Since version 14, an
`account_reconcile_model` is composed of `account_reconcile_model_line`
and the latter is linked to `account_tax` (with `ondelete='restrict'`).
Here is the issue: when deleting the `account_reconcile_model` model,
the corresponding lines are not deleted. As a result: later, when trying
to delete all the `account_tax`, since some `account_reconcile_model_line`
are still present in database, it triggers the `ondelete='restrict'`
constraint.

OPW-2416066

closes odoo/odoo#63649

X-original-commit: 8c9a038c6527f06b680d6346ba5569fedce4794d
Signed-off-by: adwid <adwid@users.noreply.github.com>
2020-12-21 14:42:49 +00:00
Raphael Collet dcc2a7e39d [FIX] core: first onchange should always compute fields
When a form view is opened, the first call to `onchange` should always
compute fields, even if their dependencies have no default value.  Make
sure it is the case for main records, and for records inside one2many
fields.  The latter case was actually not working as expected.

closes odoo/odoo#63646

X-original-commit: 45422d56bce413b8577f1784e10dd22ede93c751
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-12-21 13:55:20 +00:00
Mohammed ShekhaandKamesh Patel 81f2bc7b0a [FIX] web: SampleServer: round float values
before this commit: when field is float type it display too much decimal
precision value, it should be fixed to 2 precision for sample data.

after this commit: float field will display 2 decimal precision value.

task-2318503

closes odoo/odoo#63643

X-original-commit: 61f8ced67992b20edfac139c749ec00939f408a3
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Kamesh Patel <kat@odoo.com>
2020-12-21 13:03:22 +00:00
Prakash PrajapatiandAaron Bohy b9c5ae27bb [FIX] web: kanban: reload kanban image
Before this commit, if the image changed from the form view, it
wasn't updated when coming back to the kanban view (one must
refresh the page).

This commit makes this work by automatically adding the field
'__last_update' to the list of fields to read when there is an
image with kanban_image src in the template.

closes odoo/odoo#58313

Taskid: 2341493
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2020-12-21 12:45:29 +00:00
Ivan Yelizariev 7411403f97 [FIX] portal: show default lang in selector when lang is not found
STEPS:
* install project, website
* install translation, but don't apply to website
* create a task with Customer that has that language
* close the task
* open rating request message in ``Settings >> Technical >> Messages``
* click any of the smiles

BEFORE:

Error to render compiling AST
IndexError: list index out of range
Template: portal.language_selector
Path: /t/t[1]
Node: <t t-set="active_lang" t-value="list(filter(lambda lg : lg[0] == lang,
languages))[0]"/>

AFTER:
no errors, page is translated to customer's language, though language selector
shows default website's language

---

opw-2416586

closes odoo/odoo#63640

X-original-commit: e9ef98410fa6acba165f3056d9c52f8e68cc768b
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-12-21 12:18:27 +00:00
Rémy Voet (ryv) 6e864e9e0a [FIX] purchase_stock: RFQ update date_planned from portal
In case of RFQ with the "Ask confirmation X day(s) before" set,
the email send to the vendor give a link where he (portal user)
can change the date_planned of PO lines. But
the change wasn't done in the server side because the
`_update_date_planned` (of stock_purchase) doesn't call super if
there isn't a linked move (none in case of RFQ).
Call super also in case there isn't any moves.

close #59040

closes odoo/odoo#63629

X-original-commit: b29ac84fd55923abf582cdee39cb32bacda3eec9
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2020-12-21 10:32:35 +00:00
Alpesh Valaki 315a598fe5 [IMP] account: type on docstring
fix typo on docstring of _get_last_sequence method

closes odoo/odoo#63619

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-12-21 10:24:18 +00:00
Anjali ecad945ef8 [FIX] crm: add missing default values for partner during quick create
This commit adds few missing default values for some of the partner
fields while we create partner on the fly with quick create kanban
card of lead. Below are the fields that we added

 * name
 * is_company
 * company_name
 * phone
 * email

Task ID-2409462

closes odoo/odoo#63622

X-original-commit: 5b3290b0869e3954ff1606ad0ca0a35cfd948698
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-12-21 09:45:36 +00:00
Aaron Bohy f27ae85686 [FIX] website: dashboard: mounted called twice
Before this commit, the 'mounted' method of the ControlPanel in
the website dashboard was called twice, when entering the dashboard.

It happened because the dashboard updated the ControlPanel before
being actually mounted, so mounted was called once when the
dashboard was mounted, and once when the update was applied.

Ideally, this should not be an issue (this isn't an issue with owl).
However, in Odoo, we mix layers of Owl Components and legacy
widgets. In these situations, the above scenario isn't properly
handled (and can't be).

As a consequence, in mobile (enterprise), it crashed because an
handler bound in mounted (thus twice) was only unbound once.

This commit avoids the issue by correctly setting the control
panel props before rendering it (the update was actually useless).

opw~2417307

closes odoo/odoo#63621

X-original-commit: 623a861877014b57627473b9cc5200bafcbe2521
Signed-off-by: Bruno Boi <brboi@users.noreply.github.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-12-21 09:38:54 +00:00
Mohammed Shekha f7ddf3398c [FIX] base_import,web: remove Import from m2x dialogs
Before this commit, the "Import" button was available in the
favorite menus of dialogs opened from many2one and many2many field
widgets. It makes no sense from those dialogs.

Task 2376279

closes odoo/odoo#62079

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-12-21 08:45:57 +00:00
Andrea Grazioso (agr-odoo) e7c92594f0 [FIX] microsoft_calendar: fix recurrence event creation
Create an event as follows:

- Recurrent
- Repeat every 1 Months
- Until End date <far in future>
- Day of Month Day of Month First Monday

An exception will raise

opw-2412598

closes odoo/odoo#63601

X-original-commit: 4cb599f694eecd2a3c96ed25a055f0b9030a5864
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-12-18 17:40:10 +00:00
Goffin Simon 77e935f02b [FIX] account_check_printing: Check number in Payment
Steps to reproduce the bug:

- Let's consider a bank journal BJ with manual numbering activated
- Create a customer payment CP using BJ as journal and confirm CP
- Create a vendor payment VP using BJ as journal, select Check as payment method
- A Check Number with 0001 is automatically assigned to VP
- Confirm or save VP

Bug:

An error was raised saying that:

The following numbers are already used: 0001

PS: When creating the customer payment, a check number was assigned to CP even if
customer payment has nothing to do with check numbers

opw:2415170

closes odoo/odoo#63372

X-original-commit: f01eb942716800921148b5de8d6bc4140d122912
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-12-15 10:06:19 +00:00
Aurélien Warnon 6316dd76d4 [FIX] crm: fix rainbowman message display conditions
This commit fixes the display of the rainbowman message when leads go through
the "won" stage.

Currently, some flows don't show the message when they are supposed to or show
the message when they are NOT supposed to.
This is because the case when the form is saved through the regular "Save"
button is not handled at all.

The CRM form controller extension was completed with the missing use case and
fixed.
An additional QUnit test ensures the correct behavior.

Task-2418294

closes odoo/odoo#63599

X-original-commit: c5cbb9975897935e9ed4e1bce80335207758fa24
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-12-18 16:52:14 +00:00
Christophe Monniez 5cb543651e [FIX] packaging: create rpm repo from container
The createrepo Debian package is not available in Ubuntu anymore, this
can cause problems on Ubuntu based build systems.

In order to solve that once and for all, with this commit the rpm repo is
generated from a Docker container.

Fixes #63419

closes odoo/odoo#63585

X-original-commit: 8f5c5e585572facd8768e9f9dfc0de9e301f0c93
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-12-18 13:17:13 +00:00
Romain Derie 5ec51e1642 [FIX] website: don't add top on bottom popup to prevent offscreen
Since 6ef622772f, all modal have top property set. But since modals can be
set as bottom modal, that top margin will make those go offscreen.

closes odoo/odoo#63582

X-original-commit: 1f365c63cf5dd8b5038a6b1b9839fb086a5871e1
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-12-18 12:54:14 +00:00
Andrea Grazioso (agr-odoo) ed13ef9df4 [FIX] point_of_sale: add timezone info when registering payment date
Journal entries coming from PoS are based in UTC instead of local time.
This commit is an improvement over 23d3856f2a4323097f51254b5e32c517d45bfe66
to add the timezone info

opw-2371863

closes odoo/odoo#63075

X-original-commit: 30ee2ebae3275de259eff6019d3a4582ef86a729
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-12-09 12:09:00 +00:00
Samuel Degueldre e8b2b966b8 [FIX] web_editor: fix permanent loading effect on option double-click
Previously, double clicking an arrow to change the order of images in
the image-gallery snippet would cause the loading effect to permanently
stay and block the snippet editor completely. This was caused by the
fact that when clicking the arrow, the gallery snippet rebuilds itself
from scratch. After a snippet option is used (in this case, the
reordering arrow), we update the snippet overlay, and destroy
snippet-editors whose target is no longer in the DOM. When double
clicking, by the time we handle the second click, the target of the
option has been removed from the DOM, and the widget has been destroyed.
However, when we try to apply the option anyway, we trigger_up some
events (eg to refresh the public widgets) and wait for the trigger_up to
call back. Since the widget is already destroyed, it no longer has a
parent and trigger_up fails silently, never calling us back, and
blocking the mutex.

This commit fixes that by checking whether the widget is destroyed
before trying to apply the option, bailing immediately if it is the
case, and unlocking the mutex.

opw-2394953

closes odoo/odoo#63557

X-original-commit: b23dd1b20fbd656d40e2d8bc4a32a27652e50ee1
Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
2020-12-17 19:49:07 +00:00
Adrien Widart 8253664223 [FIX] point_of_sale: list 5 payment methods
If a POS has more than 5 payment methods, the display is not correct:
the list is full width when it should be on left (as long as the screen
is large enough).

This fix ensures the display is the same as the previous version,
see (from v13):
https://github.com/odoo/odoo/blob/732ba5ca51e628b9d9a7427acd30d01d83e85068/addons/point_of_sale/static/src/css/pos.css#L1213-L1215

So, if the screen is larger than 768px, the width of the list will be
limited to 34% of the display area.

OPW-2400629

closes odoo/odoo#63488

X-original-commit: 06f15401a6f30648cddffdd07b765c6cb96fcf99
Signed-off-by: adwid <adwid@users.noreply.github.com>
2020-12-17 07:47:21 +00:00
Benoit Socias 8b80ae444b [MERGE] website: remove duplicate entries in POT file
Before this commit the merge operation did not decide which entry to
keep.

After this commit the merge is solved.

#63534

closes odoo/odoo#63553

X-original-commit: 33a482be1aa7162f446ff5cdda35ba2f7ce1f273
Related: odoo/design-themes#434
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-12-17 16:55:30 +00:00
fw-bot 337434428e Cherry pick of 361eac12074e480d26c23d6f2eba704a18515f2d failed
stdout:

stderr:

Error: could not apply 361eac12074... [IMP] website, web_tour: have steps to select shape or color
Hint: after resolving the conflicts, mark the corrected paths
Hint: with 'git add <paths>' or 'git rm <paths>'
Hint: and commit the result with 'git commit'
X-original-commit: 94540d5bbac97f59f24fb0f2d644c571640e8cbc
2020-12-17 16:55:29 +00:00
Andrea Grazioso (agr-odoo) d947b37767 [FIX] sale_coupon: select correct minimum amount with/without tax rule
Create a promotion program with the "Minimum Purchase Of" right field
left as blank
It won't be taken into account in SO when clicking on 'Promotions'

When the field is left as blank `rule_minimum_amount_tax_inclusion`
value is `False` and thus break the check.

opw-2392546

closes odoo/odoo#63330

X-original-commit: 814cd954944b76fb8a8cb8e4b8da8d17c0eec88c
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-12-14 13:28:46 +00:00
Benoit Socias 4402f873be [IMP] gamification,gamification_sale_crm: compute goals using batch mode
Trying to improve the resources used by the challenge update cron
operation.

Before this commit some count-based goals and all sum-based goals were
computed with one select count or sum per user.

After this commit each count or sum based goal is computed in a single select
for all users. The goal form now also allows to enable batch mode for
sum computations. Other changes include:
- adding an index on the challenge_id of goals after verifying the
positive impact of such an index on high volumes on a staging server
- introducing additional intermediary commits to allow massive crons to
catch up over several attempts.

task-internal

closes odoo/odoo#63265

X-original-commit: 0f9411d10753aa96103ce77702dbdc0516e9969a
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-12-11 17:52:11 +00:00
Sébastien Theys 7a5e08bdd3 [FIX] mail: speed up render of Message by inserting content manually
`t-raw` is too slow due to parsing the HTML in JS, converting it to VDOM and
comparing to existing VDOM. Here we can make a custom comparison based on actual
string, and directly replace in DOM if needed.

Part of task-2399731

closes odoo/odoo#63539

X-original-commit: cc531a07002fd8642f53e77c0fa52a49753e9df8
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-12-17 13:15:27 +00:00
Victor Feyens 6a77d34c3b [FIX] calendar_sms: do not clear the cache
in a cron run frequently.

The cron "ir_cron_scheduler_alarm" stores its last run datetime in an
ir.config.parameter.  Since modifying config parameters cleans the
cache,
the cron clears the cache every 30 minutes, unless modified...

As the cache is used to improve global system performance, clearing it
frequently should be avoided as much as possible.

Since v13, ir.cron records now store their lastcall datetime, there
is no need to keep the information in a config parameter anymore.

This commit uses this lastcall information instead, as it was done for
the calendar module:
See
https://github.com/odoo/odoo/commit/52645a7b43be157be0782674a0f6b38359293f21

Fixes #63354 for 13+ versions.

For earlier versions (12.0), it cannot be "fixed" since the lastcall
information isn't available (note that the cache clear also happens in
the base calendar method in 12.0).

closes odoo/odoo#63560

X-original-commit: 10c08157cb152f111bc9df783e15632c52a61b39
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-12-17 20:33:13 +00:00
jpr-odoo f3009d30e5 [FIX] website: fixed traceback while trying to open password protected page
task-2281216
Closes  https://github.com/odoo/odoo/pull/55692

closes odoo/odoo#63555

X-original-commit: 7e0541c90542d2d040415ef0dbc4e0cb8e7f2ffc
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-12-17 18:11:29 +00:00
Ivan Yelizariev f412ff0ceb [FIX] account_edi: hide alert when there are no web services
this is more safe way than previously applied in
https://github.com/odoo/odoo/pull/62939

because it doesn't require ``-u account_edi`` in cases when it worked
correctly, i.e. when _compute_edi_web_services_to_process is called, but
computes empty string value.

Additionally, it fixes same problem in account.payment model.

---

opw-2414500

closes odoo/odoo#63543

X-original-commit: d393467886be1bd356a135e3fdc1ebb304c6614c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-12-17 13:58:28 +00:00
Joseph Caburnay d7ffac5676 [FIX] point_of_sale: missing search bar when no pos category
To reproduce:
1. Start an odoo instance without demo with point_of_sale module.
2. Install a generic fiscal local if not automatically installed.
3. Create a product.
4. Open a pos session.
5. BUG: no search bar

This is because the search bar is rendered inside ProductsWidgetControlPanel
which is only rendered when there are categories. Instead, we render it
always but we pass the hasNoCategory information to selectively render
it's part. This now always show the search bar.

closes odoo/odoo#63551

Opw: 2418858
X-original-commit: bf69c811736a81cd95d4bffc06b23c539e4671e6
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-12-17 16:14:34 +00:00
Pierre Masereel cd61b662e7 [FIX] point_of_sale: discount product with tax
When you are using a discount product with a tax, you get a traceback
when trying to add the discount. It is caused by a typo and is fixed
here.

closes odoo/odoo#63550

X-original-commit: b389dcabf49fd05c5239d68fd26ef4239963a7e5
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-12-17 16:14:08 +00:00
lejeune quentin 2be28bfbde [IMP] hw_drivers: Map drivers actions
Add possibilities to map actions for the drivers

To avoid a sequence of "if elif else" we integrate a '_actions()' dictionary
where the key is the name of the action and the value is
the name of the function to be executed in the drivers
with the action data as a parameter

closes odoo/odoo#63375

Related: odoo/enterprise#15310
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-12-16 15:52:34 +00:00
Pierre Masereel 6843d63769 [FIX] point_of_sale: having negative value with decrease quantity
When you have a localisation like the french one that does not allow
you to decrease the value of a line, you cannot make returns because the
popup that shows you new value to encode, does not let you enter
negative numbers.

To allow those negative values, we let the modification of the line if
we are on the last line, and the quantity is equal to 1 which is the
default value of the line. It is the same behavior as in 13.0.

OPW-2411356

closes odoo/odoo#63538

X-original-commit: b6b5e7c148f2b7b44830022325aa9010a4c683ba
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-12-17 13:14:13 +00:00
Nicolas Galler 303c04348e [FIX] stock: in forecast report, associate MTO lines only with their source
Behavior prior to this commit:

If I have a pre-existing order (confirmed, but without available
product) on a product with an MTO route, and I now place a new order on
that product then confirm the generated PO, in the forecast report the
quantities from the PO will be shown as being applied to the
pre-existing order first.

For example:
 - create a product with an MTO route (set a vendor)
 - create a SO (SO1) for 5 units of that product and confirm it.  Verify that
 a PO (PO1) was generated.  Cancel the PO.
 - create a new SO (SO2) for 10 units of the product and confirm it.  Confirm
 the PO (PO2) that is generated.
 - run the forecast report.  It should show:

| Replenishment | Quantity | Used By |
|------------------------------------|
|   PO          |   10     | SO2     |
| Not available |   -5     | SO1     |

But instead it shows:

| Replenishment | Quantity | Used By |
|------------------------------------|
|   PO          |    5     | SO1     |
|   PO          |    5     | SO2     |
| Not available |   -5     | SO2     |

When the product is received for PO, the quantity received is correctly
applied to SO2, not SO1.

Behavior after this commit:

 - when generating the forecast report, we have to tie each outgoing
 shipment with 0 or more incoming shipment.  After this commit, the
 computation will be made without considering candidate incoming
 shipments that are linked (via `move_dest_ids`) to a different
 outgoing shipment.
 - for receipts that are not tied to another move (move_dest_ids is
 empty), there is no change of behavior
 - for receipts that are "over-delivering", for example if there was a
 generated PO for 10 units but they manually increased it to 15 to cover
 both SO, there is no change of behavior: it will still show as
 replenishing both SO.

Note:

 - in a multi step environment the report does not correctly allocate
 quantities once some steps of the order are processed (the quantity
 will be shown as coming from stock, but in fact not all steps have been
 processed), this is accepted as a known limitation to prevent making
 too much of a performance hit for the MTO case (this behavior is the
 same as what was present before the commit)

opw-2412137

closes odoo/odoo#63529

X-original-commit: 95435c056236438c61688855748b3afac57416a2
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
2020-12-17 12:21:55 +00:00
Adrien Widart c915456b94 [FIX] point_of_sale: barcode and decimal notation
In some languages, if the thousands/decimals separators are different
from ','/'.' , when scanning a barcode that contains a decimal quantity,
the conversion won't be correct.

To reproduce the error:
1. Go to Settings > Inventory
2. Enable "Units of Measure"
3. Go to Point of Sale > Products > Products
4. Create a Product P
	- Set a barcode, e.g. 2112345000008
	- Set UoM to 'kg'
5. Go to Settings > Translations > Languages
6. Add and switch to French (BE)
7. Run one POS
8. Use the debugging window to simulate a scan
	- Enter the code, e.g. 2112345087550
		(It means 8.755kg of product P)
	- Click on "Scan EAN-13"

=> Here is the error: it actually adds 8755kg of P-product. This comes
from the quantity conversion. The barcode provides the qty as a number with
basic decimal notation (.) but later, it is converted using the user's
language configuration.

OPW-2412561

closes odoo/odoo#63491

X-original-commit: 6abd50ae8e1b19339163c717705826544e222e13
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: adwid <adwid@users.noreply.github.com>
2020-12-17 08:47:38 +00:00
Alexandre Kühn 6e8488caa4 [FIX] mail: inconsistency of new message style
The style of discuss new message (+) and chat window new message
should be consistent, as they both cover the exact same feature.

closes odoo/odoo#63530

X-original-commit: d8e816f95e2c51071415a3d4a9171d7014bb7b1c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-12-17 12:24:20 +00:00
Siddarth Gajjar 4f5c4911cf [IMP] website: improve autocomplete dropdown UI
- Before this commit, Autocomplete dropdown ui is not
compatible with existing editor ui.
- After this, Autocomplete dropdown UI for url and GMAP imrpoved.

closes odoo/odoo#63528

Taskid: 2352870
Closes: https://github.com/odoo/odoo/pull/60735
X-original-commit: d44339190ba90c3a3564cc30b78477a1724efaee
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-12-17 12:20:30 +00:00
Gorash 1a8ac6b79e [FIX] web_editor: Show the toolbar when select the text in forum edition
closes odoo/odoo#63527

X-original-commit: 610c546138bdfea952d775bef48ea9046f8cfb5b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-12-17 12:06:15 +00:00
ijas ahammedandThibault Delavallée 0b6a2ee5fb [FIX] crm: do not propagate lead phone to partner if formatting differs
With a recent commit[1], we fixed the issue of false warning while changing
the partner on lead. But that fix ignored the fact that the lead has an
automatic formatting that may lead to false warning.

Right way to detect a phone number change is
  * lead phone is different from partner phone;
  * lead formatted phone is different from partner formatted phone;

If those two conditions are met we are quite sure numbers are different and
not only differs in their formatting.

In this commit we also fix inverse of phone number. When updating lead phone
value we have to use the same heuristic to update partner phone value. That
was we avoid unnecessary partner update when only formatting differs.

Tests are added to ensure new behavior and that ribbon message is effectively
trig erred with correct content.

LINKS

Task ID-2390287

[1] - https://github.com/odoo/odoo/commit/d29862c1de6208f7fdb7c8104afe0d35241d130b

closes odoo/odoo#63521

X-original-commit: 5154f40544e7913f7bcd0ff73f034d111700f580
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Ijas Ahammed <ija@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2020-12-17 11:32:52 +00:00
oco-odoo 68230bda64 [FIX] l10n_fr: use correct account type for "chèques à encaisser"
This account is intended to be used on a bank journal instead of the bank account. Making it reconcilable is required so that it can be reconciled with a statement made in another bank journal (representing the actual bank account).

https://github.com/odoo/odoo/commit/7df9704845f99ad985607940386bacf691ef28db changed this account's type to liquidity, but that breaks the above use case, as a liquidity account is not supposed to be reconcilable at all (and so, instead of creating a writeoff, only statement_line_id is set on the check's line, and the statement balances of each journals don't match the general ledger).

OPW 2356956

closes odoo/odoo#63520

X-original-commit: 90a178da9f535a7aad59033d697323dc32623b8b
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-12-17 11:31:38 +00:00
Lavish Chhatwani 3df926b30b [FIX] websites_slides: remove active test from context
Before Commit :
-when user archive a course content, it's still visible
 on the course itself, without real difference between
 active content and archived. it was confusing.

After Commit :
-now when user archive a course content, it's not visible
 anymore on the course.

closes odoo/odoo#63508

Task-id: 2411211
X-original-commit: 363dcd4e19e88854118e10c11ee2c6bbdf13b537
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-12-17 10:42:22 +00:00
Simran Gajsinghani 6f9a2ca2fb [IMP] website: show searched pages count on website pages
in this commit, when activated 'Show # found' option in Customize menu,
the count of searched records for the manage your pages, event, and form page
displayed on the search button(#found).

task-2115526

closes odoo/odoo#40121

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-12-17 10:25:28 +00:00
Antoine Guenet 96fdf12ff1 [FIX] web_editor: properly position sidebar scrollbar
closes odoo/odoo#63495

X-original-commit: 3c249d385f46c0276ce04d5c3cce4fda620d2ba3
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-12-17 09:33:19 +00:00
Jigar Vaghela 29c82528d0 [FIX] account: correct management of groups of taxes on misc operations
Using group of taxes with type_tax_use='none' children messed up the sign of the tax_base_amount and line tags.

closes odoo/odoo#63479

X-original-commit: 3642c429899c4d5def27c9ba10ae76c763a8a566
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-12-16 17:46:30 +00:00
Adrien Widart 79fc263373 [FIX] hr_expense: expense reconciliation
The reconciliation between an expense and a bank statement does not
update the expense and its sheet.

To reproduce the error:
(Need account_accountant)
1. Go to Expenses
2. Create one (e.g. an expense of $20)
3. Save, Create Report, Approve, Post Journal Entries
4. Go to Accounting > Bank
5. Create a bank statement (e.g. $-20)
6. Save, Post, Reconcile
7. Select the expense, Validate
8. Go to Expense > The created expense

=> The expense's state is still 'Approved'. It should be 'Paid'.
Moreover, if you click on the associated report ("View Report"), the
same error appears: the sheet's state is 'Posted' instead of 'Paid'.

The problem was that the method 'action_invoice_paid' (deleted in this
commit) was never reached. Moreover, there was no way to get the
expense's residual amount.

OPW-2389414

closes odoo/odoo#63486

Signed-off-by: adwid <adwid@users.noreply.github.com>
2020-12-17 06:54:30 +00:00
Goffin Simon 1b2aef65f4 [FIX] l10n_ch, l10n_ch_qriban: Impossible to create a vendor bill
Fine tuning of this commit: https://github.com/odoo/odoo/commit/6e374e25943106be84711233f3960f2f3a4b9aa9

To fix the issue when l10n_ch_qriban is not installed

opw:2416809

closes odoo/odoo#63478

X-original-commit: b226f07628618aac6ada0ffce736e29cb1cdc550
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-12-16 17:39:33 +00:00
Gorash c9fdf4bd14 [FIX] mass_mailing: adapt tour to the new editor design.
closes odoo/odoo#63471

X-original-commit: 537914d7e74790a832f8d6c24d79ffe2fb463f7e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-12-16 16:07:47 +00:00