Commit Graph
144352 Commits
Author SHA1 Message Date
Ivan Yelizariev 889cc9be80 [FIX] website: allow submit sitemap to non-first website
closes odoo/odoo#75184

X-original-commit: 81bd6a589bab99418ffba63307684d228ebc718a
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-08-17 11:03:10 +00:00
Ivan Yelizariev 0f3ea5e1f4 [FIX] website: allow edit robots.txt to non-first website
Previous implementation always updated *current website*, which is not
always the same as the value from `res.config.settings`.

---

opw-2623007

X-original-commit: d66d44db031be76403ce7c01616e334ef196fd03
2021-08-17 11:03:09 +00:00
Carlos Lopez 437469b935 [IMP] sale, pos_sale: facilitate inheritance on sale report
closes odoo/odoo#74896

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-08-17 12:32:23 +00:00
John (jol) 767af70725 [FIX] l10n_es_reports: hide spanish tab on invoice
In a multi-company environment, with l10n_es_reports installed,
a tab was added to the invoice form view.

That tab was also visible in other localizations as well,
which was not desired.

closes odoo/odoo#74701

Task: 2611256
Related: odoo/enterprise#20042
Signed-off-by: William André (wan) <wan@odoo.com>
2021-08-04 12:23:29 +00:00
Swapnesh Shah 5574c5c7dd [FIX] stock: do not copy move on duplicating scrap
Before this commit, Scrap move was copied to new record on
duplicating Scrap order.

With this commit, Scrap move is not copied.

closes odoo/odoo#75180

X-original-commit: a725fed5168a140cb631732c3ffc994cd90b02b2
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-08-17 10:16:10 +00:00
Guillaume (guva) 467a788302 [FIX] event_sale : compute attendees on cancel SO
Steps to reproduce:

- create a sale order with an event registration,
- on the event, the number of attendees is well computed
- cancel the sale order
- on the event, the number of attendees is still the same as before

Cause of the issue

There was no specific action for canceling a sale order linked
to an event registration

Solution

Add a action_cancel method which cancel also the sale order lines when
canceling the sale order

Also add a test to ensure the flow will not break in the future

opw-2576790

closes odoo/odoo#75174

X-original-commit: 9dcfae2234b1f45da1837c519b54926522cfa070
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: guva-odoo <guva-odoo@users.noreply.github.com>
2021-08-17 08:43:57 +00:00
Benjamin Frantzen (bfr) d22b517838 [ADD] l10n_no_edi: added support for EHF3
EHF3 is the Norvegian standard for Peppol. This module generates xml (based on BIS3 with NO country profile) to be submitted on the Peppol network.

TASK ID: 2528203

closes odoo/odoo#70679

Related: odoo/enterprise#20050
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-08-17 09:39:57 +00:00
Benjamin Frantzen (bfr) 4d2c7903f6 [REF] account_edi_ubl, l10n_nl_edi: removed unnecessary code and small refactor of how errors are handled
- Overriding '_is_embedding_to_invoice_pdf_needed' is unnecessary since the default value is already 'False'.
- When calling '_check_move_configuration', we should not ignore the errors returned by 'super'
2021-08-17 08:21:57 +00:00
François (frc) cdd920a113 [IMP] iap_tools: New parameter TTL for iap_charge & authorize
closes odoo/odoo#74599

Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
2021-08-11 13:40:04 +00:00
thicham43 9ef3a47464 [CLA] signature for thicham43
closes odoo/odoo#75162

X-original-commit: 24dfb0987586d48556ecd86b2dd6172cd82c19d9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-16 15:19:30 +00:00
Ivan Yelizariev 4467734b77 [IMP] stock: clean up commit calls and add logs
the deleted commit is not needed since it's already called in
`_procure_orderpoint_confirm`.

The logs are usefull to check whether we have progress on repeating the
scheduler that gives timeout error.

closes odoo/odoo#75146

Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-08-16 11:44:14 +00:00
prro-odoo bff53f529c [FIX] sale_coupon: allow changing reward line quantity
How to reproduce the problem:
- Install the sale_coupon module
- Sales -> Products -> Promotion Programs
- Create a promotion with "Fixed Amount" discount, "Apply on current
order", with Based on Products as "Name = Large Cabinet"
- Create a SO with 3 Large Cabinet.
- Modify the quantity on the new reward line: the price unit became 0.

A client should be able to manually change the discount quantity.
That was not possible before due to the fact that the reward products of
a promotion are saved in the DB with a list price of 0.
As the reward generation handles the job of computing the correct
unit price on a reward SOL, that unit price is simply re-used when
the quantity is changed.

Also corrects the case where a Free Product is different from the
Rule Product(s): with the promotion
"Buy 1 Product A, get 1 free Product B", if the Sale Order has
3 Product A, for example, the promotion will offer only 1 Product B,
while it should offer 3.

opw-2522604

closes odoo/odoo#75143

X-original-commit: 97b78e8982f1e143350521bdee3c280618fb1846
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Signed-off-by: prro-odoo <proose@users.noreply.github.com>
2021-08-16 11:35:55 +00:00
Mathieu Duckerts-Antoine a1f286916d [IMP] web: new ControlPanel class
We introduce here an incomplete implementation of the new ControlPanel.
The idea is to allow the rewritting of the client actions that do not
use the search view but only the breadcrumbs or the button zone...
The full implementation of the new ControlPanel will be merged when the
new search infrastructure is ready to be merged.

closes odoo/odoo#75083

Related: odoo/enterprise#20231
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-08-16 16:03:30 +00:00
Jorge Pinna PuissantandSamuel Degueldre 00e3cb74c4 [REF] web: migrate from moment to luxon
Migrate the code of parse and format dates of mock server from moment to
luxon.

Co-authored-by: Samuel Degueldre <sad@odoo.com>
2021-08-16 14:56:34 +00:00
Aaron Bohy 6a59d0014e [REF] web: reorganize formatters and parsers
- fields/format.js has been renamed into fields/formatters.js
 - fields/parsers.js has been introduced
 - parsers and formatters from l10n/numbers have been moved to
   fields/parsers.js and fields/formatters.js
 - same for parseCurrency and formatCurrency, and they have been
   renamed into parse/formatMonetary
 - humanReadable option is now a boolean, no longer a function
 - formatPercentage implementation has been simplified thanks to
   that reorganization
 - tests have been reorganized accordingly
2021-08-16 14:56:16 +00:00
Aaron Bohy dc4bff826c [IMP] web: add some field formatters
Reintroduces a registry "formatters" that contains util functions for
formatting field values. Those formatters take the same parameters:
value, field, options.
2021-08-16 14:56:15 +00:00
Jorge Pinna PuissantandSamuel Degueldre b27ec4067a [IMP] web: mock routes/methods defined outside web
Add a registry on the mockServer to allow mocking routes/methods
defined outside web

Co-authored-by: Samuel Degueldre <sad@odoo.com>
2021-08-16 14:56:15 +00:00
Aaron Bohy 24c643bc4f [IMP] web: migrate math helpers
We move some util functions from the legacy file math_utils.js to the
file arrays.js. Those funcions will be used in the new implementation of
the pivot view.
2021-08-16 12:53:51 +00:00
Mathieu Duckerts-Antoine b134c1e45e [REF] web: new view service API
We simplify and document the view service API.
2021-08-16 12:53:50 +00:00
Géry Debongnie 2ebddcc585 [REF] web: remove useless view_utils file
The helper json_node_to_xml won't be used outside of the legacy code.
2021-08-16 12:53:50 +00:00
Mathieu Duckerts-Antoine dd8bf39d2a [REF] web: legacy template name
We prepare the rewritting of the search components for the new weclient:
we rename some legacy templates to allow the new components to use the
natural template names.
2021-08-16 12:53:50 +00:00
Mathieu Duckerts-Antoine b626631241 [FIX] web: ConfirmationDialog size
Before this commit, the confirmation dialogs displayed by the new dialog
service had the size "modal-lg" (default set on the Dialog class).
We set their size to "modal-md".
2021-08-16 12:53:50 +00:00
Mathieu Duckerts-Antoine 2000b122d5 [IMP] web: default title for confirmation dialogs
The confirmation have now "Confirmation" as default title.
2021-08-16 12:52:15 +00:00
prro-odoo 5c4a971d89 [FIX] fleet: display only current companies' fleet
How to reproduce the problem:
- Install the Fleet app.
- Create a user that has access to 2 or more companies (e.g. Mitchell Admin).
- Log in as this user. Go to fleet -> Vehicles -> Vehicles Costs/Contracts/Fuel Logs/Services Logs
- Uncheck one of your companies.
- The user still has access to the fleet of the other companies, even if they are unchecked.

Cause of the problem : missing record rules

Solution : added multi-companies rules

opw-2518188

closes odoo/odoo#73925

X-original-commit: 41828bc22b5cf663b96196371f412ad2bfbbfb22
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-17 07:25:48 +00:00
Manish Bohra 3d131452a7 [CLA] Manish Bohra
closes odoo/odoo#75165

X-original-commit: 3711c299523c8da4abb6066e505ec05090d1567d
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-16 16:46:21 +00:00
Nicolas Bayet e41eebd7a8 [FIX] web_editor: prevent traceback on get Powerbox element
Whenever using the `getPowerboxElement`, it is possible to have a
null node.

closes odoo/odoo#75163

X-original-commit: 03d7021b251d31cfda055c6ffe9684fad191903c
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
2021-08-16 15:24:35 +00:00
qsm-odoo 6b89b53b63 [FIX] website: properly mark selected color for menu, footer, etc
When a color combination was used as "color" (base case) for the menu,
the menu background in the boxed template, the footer or the copyright
section, it was not properly marked as selected in the color palette
widget of the editor panel.

Related to task-2599770

closes odoo/odoo#75157

X-original-commit: 04c476a11a084c825725cae89e104e9f205c685b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-16 14:54:44 +00:00
Martin Trigaux c6be07e893 [FIX] stock: lazy loading of translation
The term was untranslated
Export missing stock terms

Forward-port of fb0383f8c1d4ef5817cf67

closes odoo/odoo#75155

X-original-commit: 4a0d1dfd2b48ecad107a687093ac34a3b0d67d60
Related: odoo/enterprise#20247
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-16 13:11:30 +00:00
Adrien Widart 89f5f504be [FIX] mrp: create SM for by-products when RR triggered
When combining a reordering rule, the 3-steps manufacture and
by-products option, the picking from the post-production to the stock
will not contain the residual products produced by the MO (by-products)

To reproduce the error:
1. In Settings, enable:
    - By-Products
    - Multi-Step Routes
2. Inventory > Configuration > Warehouse Management > Warehouses, edit
company's warehouse:
    - Manufacture: 3 steps
3. Create 3 products P_compo, P_finished, P_secondary
    - P_compo is consumable
    - P_finished and P_secondary are storable
    - Routes of P_finished: Manufacture
4. Create a reordering rule for P_finished:
    - Min = Max = 1
5. Create a BoM:
    - Product: P_finished
    - Type: Manufacture
    - Components: 1 x P_compo
    - By-products: 1 x P_secondary
6. Inventory > Operations > Run Scheduler
7. Open the generated MO
8. Check Availability, Produce, Mark as Done
    - Note that in the "Produce" wizard, we mention that one P_secondary
is also produced
    - Also note that in "Finished Products" tab, there are 1 x
P_finished and 1 x P_secondary
9. Open the Transfers

Error: The picking Post-Production -> Stock does not exist

When creating the byproducts move
https://github.com/odoo/odoo/blob/ad62f877c174d56b90ec516cf24494d751383db9/addons/mrp/models/mrp_production.py#L587
the field `move_dest_ids` is present (is the move created after
evaluating the RR)
https://github.com/odoo/odoo/blob/ad62f877c174d56b90ec516cf24494d751383db9/addons/mrp/models/mrp_production.py#L580
so it is used, but this will cause the `_push_apply` to skip the
evaluation of the move
https://github.com/odoo/odoo/blob/f0eaa756c4947e2a595359959b34b14bfda81a07/addons/stock/models/stock_move.py#L678-L679
and `_assign_picking` will not run, as it normally do when creating the
manufacture

Thanks to this change, the picking Post-Production -> Stock will exist
and contain the residual products

OPW-2581762

closes odoo/odoo#75068

X-original-commit: 098af2fa85d2aebfc71b7e2342a1bbf05100e10d
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-08-16 07:05:51 +00:00
Joseph Shusterman aa1fdace61 [CLA] Bluemark signs Odoo CCLA
closes odoo/odoo#75154

X-original-commit: 6f8b65c5a0c65d2c1a49f152423e69bfa6b3896d
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-16 12:40:07 +00:00
Jairo Llopis 4518347501 [FIX] account,sale: restore record assignment notifications
All accross Odoo, when a document is assigned to a salesperson, that person is notified via email.

However, the `account.move` model is inconsistent with that behavior, because the salesperson field name is `invoice_user_id` instead of just `user_id`.

With this fix:

- When creating an invoice from a sales order, the salesperson will get the assignment notification.
- When modifying the salesperson in the invoice form, the new salesperson will get the assignment notification.
- In both cases, the salesperson will get subscribed to the invoice.

This restores the behavior that `account.invoice` had in v12. For master, a better fix should be considered (a.k.a. simply removing the `invoice_user_id` field and using only `user_id` to avoid these kind of inconsistencies).

@Tecnativa TT29909

closes odoo/odoo#75152

X-original-commit: 95cfa5755b2cb1760f6cce3acb1d1a5ad791d6b7
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-08-16 12:26:28 +00:00
Julien Banken e605faa59c [FIX] mass_mailing: fix the issue with the action helper overflow.
In the 'mass_mailing' module, the action helper has an absolute position
and will be placed relatively to the top left corner of the form sheet
With this configuration, the element can sometimes be placed off the
notebook page. It can occur when the list of recipients placed above the
notebook page contains a lot of elements.

To fix the issue, we will wrap the content of the notebook page in a
`div` having the `position-relative` class. The content helper will then
be placed relatively to that element which prevents the overflow.

task-2614456

closes odoo/odoo#75149

X-original-commit: 5d34828f5e25bb7c28c226c4226c1062138721c7
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-16 12:05:57 +00:00
Aurélien Warnon d112c79f67 [FIX] website_livechat: adapt visitor kanban to fix scss styling
The commit fixes a small UI glitch in the website.visitors kanban view when
website_livechat is installed.

Since 5a0a1e76b3
The "o_field_many2one_avatar" class works a bit differently and requires
additional wrapping.
To get around that, we specify a custom image tag with the appropriate size and
classes to get a small rounded avatar-style rendering.

Task-2612936

closes odoo/odoo#75148

X-original-commit: aa2951731458896bebfa6146a5899277b2d07e26
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-16 12:05:36 +00:00
Ivan Yelizariev 99787182e4 [FIX] base: skip unneeded update_list call
`update_list` is an expensive operation and could be avoided when no modules are
updated. Particually, it speeds up initial theme installation on website, which
has following code:

```
    themes.filtered(lambda m: m.state == 'installed').button_upgrade()
```

Benchmark for Odoo 15: `/website/configurator_apply` spends 1.3 sec for unneeded
`update_list` call.

closes odoo/odoo#75140

X-original-commit: 82ba4994e54fc46cc55a463629727e840349bb6e
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-08-16 11:01:44 +00:00
Ivan Yelizariev 45ab7d954b [FIX] mass_mailing: properly handle multiple bounced_partner
It may be a recordset in case of partner duplicates. The variable
bounced_partner is simple search by email:

https://github.com/odoo/odoo/blob/72b5a17fc0e6f439d462647a7b55c9a26235a8df/addons/mail/models/mail_thread.py#L1349

closes odoo/odoo#75139

X-original-commit: 9c827ff7c5e69ba97105e36bf43c7d44860981dc
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-08-16 11:00:35 +00:00
Biruk Haileye Tabor 7f37d81d11 [CLA] sign the CLA for bhtabor
closes odoo/odoo#75135

X-original-commit: 6968c6c5e2f0f3b5f157dff3865b21e5d818b4d4
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-16 10:36:39 +00:00
Aurélien (avd) 413e625322 [IMP] stock: various optimizations when validating inventory.
Backport of 14.0 PR odoo/odoo#73082 with some slight changes.

Backport of master PR odoo/odoo#62083.

Improve stock.picking._compute_state by computing pickings new state conditions
beforehand. This avoids looping through picking.move_lines for each
condition for each picking.

opw-2613931

closes odoo/odoo#75125

X-original-commit: dca7119f6fe4f9e66c3ecc58f204420e2ad805cd
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-08-16 09:38:43 +00:00
Rémy Voet (ryv) 7b7f65d504 [IMP] mrp: improve bom filter line by variant feature
On BoM, a component line can be filter out depending
of the product variant to manufacture
(with "Apply on Variant" field).

Extend this feature to operation and byproduct line.

task-2614126

closes odoo/odoo#74973

Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-08-16 07:20:03 +00:00
Quentin Wolfs e2f59a6dd1 [IMP] stock: traceability report origin
Add reference of the traceability report's origin (production.lot,
manufacturing order, picking, ...) to the end of the
report.
Change the layout a bit so the data isn't squashed by
the border.

Task-2467686

closes odoo/odoo#74120

Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-08-16 08:14:09 +00:00
Quentin Wolfs ff16769cc4 [IMP] stock: send mass mailing from picking
Add mass mailing to the picking list view like in CRM

Task-2467686
2021-08-12 06:34:04 +00:00
Quentin Wolfs 5af43def0c [IMP] stock: add delivery address on lot
In the case of a serial number, add delivery address partner_id of most
recent delivery to lot view

Task-2467686
2021-08-12 06:34:04 +00:00
Quentin Wolfs e68ec01b1b [IMP] repair: add link from lot to repair orders
Add links to repair orders in which the tracked lot was consumed

Task-2467686
2021-08-12 06:34:04 +00:00
Quentin Wolfs 4e39893706 [IMP] stock: add link from lot to deliveries
Add links from the production_lot view to the final deliveries of either
the tracked lot or the final product in which this lot was used

Task-2467686
2021-08-12 06:34:04 +00:00
yhu-odoo af13e76629 [IMP] stock: delivery slip address format
Make delivery slip show addresses the same way as picking operations

Task 2334764

closes odoo/odoo#67776

Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-06-24 10:40:35 +00:00
yhu-odoo 825bc6b1d7 [IMP] stock: set partner for inter-warehouse transfers
when we have wh1 resupply form wh2, two transfers will be created. One
delivery from wh2 to transit location, one receipt from transit location
to wh1. Both transders don't have receive from/deviver to. In this
commit, we set the corresponding warehouse address as receive
from/deliver to.

Task 2334764
2021-06-22 13:50:52 +00:00
yhu-odoo 94b9906ce0 [FIX] stock: wrong contact on picking when manual replenish
When do a manual replenishment, we set the responsible persion of the
product to be the partner of the procurement group. Then this parnter_id
is propagated to stock.move and then stock.picking. So the responsible
person will be shown on the picking form as contact person.
To fix, remove it when creating procuremnet group.

Task-2334764
PR #67776
2021-06-22 13:50:52 +00:00
Aaron Bohy 436c5023d7 [IMP] odoo: models: add field name in field descr
The fields dict maps field names to their description. Before this
commit, the field name wasn't specified in the description, meaning
that we could never manipulate the field description without its
key, which would often be convenient.

closes odoo/odoo#75121

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-08-16 09:02:47 +00:00
Fabien Pinckaers 61bd712459 [IMP] website_event_track: container-fluid for agenda as it can have a lot of columns
closes odoo/odoo#75082

Signed-off-by: Fabien Pinckaers <fpodoo@users.noreply.github.com>
2021-08-13 11:45:34 +00:00
Nicolas Bayet 072c038df5 [FIX] web_editor: prevent Odoo editor hints on technical elements
Some templates contain empty <li> elements for styling purposes
only and should be blacklisted in the context of Odoo editor hints
as these elements are not editable.

task-2550858

closes odoo/odoo#74944

Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
2021-08-16 07:13:23 +00:00
Nicolas Bayet a51df6c850 [FIX] web_editor: disable Powerbox in Odoo fields that are not html
If the active element is an Odoo field (ie. a field with the
`data-oe-model` attribute) it means the content should not be
considered html, unless its type is specifically `html`.

If the Odoo field is of the `html` type, the Powerbox should only
be triggered if the active element is _within_ that field rather
than _being_ the field itself.

task-2550858
2021-08-16 07:12:32 +00:00