Commit Graph
144215 Commits
Author SHA1 Message Date
Martin Trigaux fd67339a3e [IMP] base: remove get_object helper
Not used anywhere, similar to env.ref
2021-08-10 13:49:05 +02:00
Martin Trigaux 15692f3948 [IMP] *: merge ir.model.data helpers
remove _get_id and _get_object_reference that were one liner to
_xmlid_lookup
2021-08-10 13:49:05 +02:00
Martin Trigaux fc6a2be38d [FIX] mass_mailing: give read access to marketing user
Many2one to ir.model
2021-08-10 13:49:04 +02:00
Martin Trigaux c7bac3dee0 [IMP] *: make ir.model.data helper private
No reason to interfact with them directly in RPC
2021-08-10 13:49:04 +02:00
Martin Trigaux abc04a9f18 [IMP] base_setup: avoid call to ir.model.data
Can retrieve the action from _action_show
2021-08-10 13:49:04 +02:00
Martin Trigaux 293d3765fa [IMP] lunch: avoid a call to ir.model.data
Not needed to do it via a specific call, can be included in the
controller data
2021-08-10 13:49:04 +02:00
Martin Trigaux 8e4cec6b07 [IMP] account: remove deprecated method
Never called, action no longer exists
2021-08-10 13:49:04 +02:00
Martin Trigaux 39da150ac2 [FIX] *: add sudo when accessing ir.model.data 2021-08-10 13:49:04 +02:00
Martin Trigaux e8b533088b [FIX] *: add sudo when retriving fields 2021-08-10 13:49:04 +02:00
Martin Trigaux aa8eba2fb9 [FIX] *: add sudo when accessing models 2021-08-10 13:49:04 +02:00
Martin Trigaux 03ff8d4d58 [FIX] *: retrieve model with sudo in selection fields 2021-08-10 13:49:04 +02:00
Martin Trigaux 5dc4cff60a [IMP] base: remove read access to ir.model*
Model, fields and selections are no longer readable
Removes metadata access
2021-08-10 13:49:04 +02:00
Toufik Ben Jaa 4fed9f8997 [FIX] purchase: invoicing status not diplayed on portal
- A typo has been introduced by the PR https://github.com/odoo/odoo/pull/61035
    This forbids to display the "Waiting For bill" tag on the portal
    page for the purchase orders.

closes odoo/odoo#74888

X-original-commit: 0b9d9ff95d2ee9a72b10ddff006399a054bfa56c
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2021-08-09 17:19:23 +00:00
Swapnesh Shah 998e588cfd [FIX] purchase: use correct label/title on kanban
closes odoo/odoo#74892

Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-08-09 19:33:42 +00:00
Jeremy KerstenandYounn Olivier 88cb6db6de [IMP] website_sale*: add to whislist and notify stock
This module allows users to be notified by email when a product out of
stock comes back in stock. For that they can add it to their wishlist
and select the appropriate option.

We show out-of-stock warning in all case whatever the show availibility option.
You cannot custom you 'in stock' message ot free message.

Spec of Pde and Fp

Part of https://github.com/odoo/odoo/pull/68221
task-2458165

closes odoo/odoo#68221

Related: odoo/upgrade#2405
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: Kersten Jeremy <jke@odoo.com>
Co-authored-by: Younn Olivier <yol@odoo.com>
2021-08-09 14:13:58 +00:00
Younn Olivier 91ba4a399d [ADD] website_sale_comparison_wishlist: add comparison from wishlist
Add a bridge module to allow users to compare products from the wishlist
page.

task-2458165
Part of https://github.com/odoo/odoo/pull/68221
2021-08-09 13:10:44 +00:00
Younn Olivier 098842d1e9 [FIX] website_sale: fix addToCart methods return values
Some return values were missing on cartHandlerMixin._addToCartInPage and
WebsiteSale._submitForm, therefore it was not possible to wait for their
promises to be resolved.

task-2458165
Part of https://github.com/odoo/odoo/pull/68221
2021-08-09 13:10:43 +00:00
Younn Olivier 198a075cf4 [IMP] web_editor: add height option on html field
It is possible to specify a height for the html field, instead of the
default 380px.

task-2458165
Part of https://github.com/odoo/odoo/pull/68221
2021-08-09 13:10:43 +00:00
Younn Olivier 4da9533cdf [IMP] website_sale_stock: use free_qty instead of virtual_quantity
Replaces the forecasted quantity by the available quantity to be
coherent with Sales app.

task-2458165
Related to https://github.com/odoo/odoo/issues/68185
Part of https://github.com/odoo/odoo/pull/68221
2021-08-09 13:10:43 +00:00
Romain Derie cfe4a47702 [REM] website: remove unused compute
The field was removed with 15aae7ea34

closes odoo/odoo#74875

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-08-09 15:10:26 +00:00
f57a13f3f6 [IMP] website: add the possibility to share coupon and promotion links
Coupons and promotion programs can now be shared by creating a link that can
directly be used by the customer.

Using the link, the system will try to apply the coupon/promotion to the
customer's order.
If this can't be done, the error will be shown to the user, for instance
"A minimum amount of 1000$ is required to get the free ipad".
That coupon/promotion will then be stored in session and the system will try
automatically reapply it when something is added to the cart.

task-2489749

closes odoo/odoo#69053

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
Co-authored-by: Tom De Caluwé <tdc@odoo.com>
2021-08-09 14:16:54 +00:00
prro-odoo 280e2f6e04 [FIX] repair: display correct default location
How to reproduce the problem:
- Install the repair App
- Repairs -> Create (a Repair Order) (and activate the debug mode)
- Change the Location Field to something else (than the usual default WH/Stock)
- Open Developer Tools -> Set Defaults
- For Defaults, choose "Location = [the changed Location]", "All Users" -> Save Default
- Create a new Repair Order: the Location is not set to the default we set earlier through the Developer Tools

Cause of the problem : an Onchange method was overriding the default Location

Solution : it will now check, in the onchange, if the change is necessary, before overriding the default.

opw-2545876

closes odoo/odoo#74871

X-original-commit: 9877ad1599513338c5333d3a728edb8d6ebcac26
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-08-09 14:26:46 +00:00
Tiffany Chang (tic) b30016c723 [FIX] mrp: fix MO onchange issue with move_finished_ids
Previous fix commit 5e34a02 was too aggressive in when it would delete
the move_finished_ids. In certain use cases it would result in no
move_finished_ids and a corrupted MO:

Steps to reproduce:
1. Create a new MO
2. Save the MO (do NOT confirm)
3. Update the qty to product_qty (qty to produce)
4. Confirm + Mark As Done

End result: "qty to produce must be positive" error whenever MO was
attempted to be completed and MO can never be completed.

To fix this, we split out when the move_finish_ids. They should all
be deleted ONLY when the product to produce is changed. Unfortunately to
cover all cases, we must always wipe the moves whenever the product is
changed (e.g. when changing the product twice with the original product
being the final saved value, we have no way of knowing to keep the
original move_finished_ids due to onchange only being able to check
against the last saved value, not last selected value).

Additional test + test update done to support preventing this
catastrophe in the future.

Part of Task: 2618962

closes odoo/odoo#74859

X-original-commit: fa468782f4a52334fd055fb5cd11e2c62ddd6f9d
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Tiffany Chang <ticodoo@users.noreply.github.com>
2021-08-09 11:52:46 +00:00
Adrien Widart 3b0c610b1c [FIX] web: get remaining days on a date field
When getting the remaining days before the deadline of an activity, the
module applies the TZ offset on the deadline date. This leads to
incorrect data.

To reproduce the error:
(Need crm)
1. Configure your computer:
    - TZ: America/Anchorage (UTC-8)
2. Log in DB
3. Ensure user's profile has the correct TZ
4. Create a lead
5. Schedule an activity A:
    - To Do
    - Due Date: tomorrow
6. CRM > Sales > My Activities

Error: The deadline of A is "Today" instead of "Tomorrow"

To get the days difference, the module computes the current date in
user's TZ. Then, it takes the deadline value and applies the offset
between UTC and user's TZ to this deadline value. Eventually, it
compares the two dates.

Here is the problem: the deadline is a date, not a datetime. As a
result, when applying the offset, if the user's TZ is a "negative" one
(UTC-...), it will change the date to the previous day.

For instance, suppose current date is 2021/08/06. In above use case, the
deadline is 2021/08/07. When comparing the dates, the deadline
(2021/08/07 00:00:00) becomes 2021/08/06 16:00:00 (because we are
UTC-8), thus the module will display "Today".

We shouldn't add any offset on a date field.

OPW-2448835

closes odoo/odoo#74858

X-original-commit: 549f0a11deb700dc6a65a3fbff94a889b9b1f278
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-08-09 11:26:51 +00:00
alt-odoo 424c3c727b [FIX] account: prevent ValueError when applying reconciliation rule
If we have a reconciliation model having a rule using a regex, we are extracting
the balance from the label, but we should not raise an error in case the regex
is matching an incorrect float value, and just set a zero balance instead.

closes odoo/odoo#74853

X-original-commit: a8d65794cfe6c7c64e03b13b8cbaa52a67b25b70
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2021-08-09 10:33:15 +00:00
Mohammed Shekha 01c460f37a [IMP] mail: support many2many_avatar in kanban and list view
Purpose
The aim of the current task is to adapt the design of this new widget to the
list and kanban views.

SPECIFICATION

Kanban
when there is only one record set in the m2m field, display it like a
many2one_avatar widget when there are two or three records set in the m2m
field, display the avatars next to each other when there are more than three
records set in the m2m field, display the first two avatars, then a grey circle
with +X in it (where X is the number of records beyond the first two), when
hovering the +X avatar, open a tooltip with the list of the remaining records
the display order of the records is the same as the order in the m2m field
the avatars behave like in the other avatar widgets (i.e. darkens on hover and
clicking on it opens the chat) except the +X avatar that does not darken or has
a cursor:pointer; on hover and is not clickable

List
same specs as for the kanban view, with the difference that the widget displays
up to five records instead of three when the widget is editable display it like
the current formview version of the many2many_avatar_user widget (i.e. tags
with avatars)

task-2563591

closes odoo/odoo#72166

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-08-06 09:12:08 +00:00
Csaba Tóth a96757e19c [FIX] Fix journal dashboard late counter
Problem: The journal dashboard show wrong values for the late invoices.
Background details: The filter for the "Late" invoices is not in sync with the sql query in the dashboard python code. The filter searchs for the invoice_date_due field while the sql searchs for the date field.

closes odoo/odoo#73992

X-original-commit: f1e9e756b8806aca92fda4d528fd0b23842e967a
Signed-off-by: William André (wan) <wan@odoo.com>
2021-08-09 08:30:31 +00:00
Andrea Grazioso (agr-odoo)andMathieu Duckerts-Antoine 38bff3d7f5 [FIX] web: flip axis does not mess up groupbys
A traceback occurs after the following operations:

1. Go to Accounting-> Reporting-> Invoice Analysis
2. Open Pivot view
    (the pivot view is grouped by ["invoice_date"] (for rows) and by ["product_categ_id"] (for columns))
3. Click on "Flip Axis"
4. Select filter "Invoices"
5. Close row header "Total"

This happens because at some point `this.data.rowGroupBys` and `this.data.colGroupBys`
happen to point to the same object (they are both equal to the action group_by):

At step 2, rowGroupBys is set to be the action group_by (loading the model).
At step 3, colGroupBys is set to be rowGroupBys (and thus the action group_by).
At step 4, rowGroupBys is set to be the action group_by (reloading the model).

So that the step 5, just before the traceback, removes the group by "product_categ_id"
from `this.data.rowGroupBys` and thus `this.data.colGroupBys`.
This causes a problem when generating the pivot table.

The fix to that problem (and to some similar problems) consists
to never equalize `this.data.rowGroupBys` with some other fixed groupby
(action group_by here).

opw-2511057

closes odoo/odoo#74792

X-original-commit: 1e66fd9e9888e75d8952d8812458d806f05dcf8b
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
Co-authored-by: Andrea Grazioso <agr@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2021-08-06 15:04:50 +00:00
Samuel Degueldre 2d3dbe9217 [IMP] tests: allow browser_js ready code to be a promise and await it
closes odoo/odoo#74789

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-08-06 12:33:54 +00:00
Romeo Fragomeli c07f693550 [FIX] web: Hide "View Bookmark" button on PDF.js
The "View Bookmark" button is used to set URL parameter to be able
to jump to bookmark by copy pasting the generated link.

As there is no way to copy this, this feature is useless in our case.

closes odoo/odoo#74833

X-original-commit: 652461aed59aa97e48f0a8934316cdb846afd769
Related: odoo/enterprise#20131
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2021-08-06 16:29:10 +00:00
Nicolas (vin) 9ff1d2df72 [FIX] account: Block archival of journals with auto post entries
At the moment, it is possible to archive a journal for which some
entries are still waiting to be auto-posted in the future.
Add a constrains to avoid make sure that it is no longer possible,
since it shouldn't.

Task id #2585454

closes odoo/odoo#74690

X-original-commit: 850eb5100d6405d3a7293e06910a1c5355fdb8d8
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
2021-08-04 10:29:24 +00:00
Martin Trigaux 45e743a3ef [I18N] {google,mrp}_account: remove old pot file
No need to keep it, it's useless and can confuse translators

closes odoo/odoo#74782

closes odoo/odoo#74832

X-original-commit: 40c74e686f23c10e35000be583716d0c093ce3b3
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-06 15:44:45 +00:00
Guenael Labois 04daf0b1e7 [IMP] l10n_ec, base: Moved EC states to base, with a proper code
closes odoo/odoo#74066

Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-08-06 15:19:29 +00:00
Guillaume (guva) ba8b8dcb46 [FIX] l10n_de_skr04 : add missing tag to taxes
Steps to reproduce

- On a DB with german localization and SKR04 chart
- Accounting > Configuration > taxes
- Select Steuerfreie Ausfuhr (§4 Nr. 1a UStG) or
  Steuerfreie innergem. Lieferung (§4 Abs. 1b UStG)

Issue

The tag l10n_de.tag_de_intracom_community_delivery doesn't appear

opw-2545462

closes odoo/odoo#74828

X-original-commit: 21d02671fce48ef0a7ac1c70602613852819b50c
Signed-off-by: William André (wan) <wan@odoo.com>
2021-08-06 15:01:51 +00:00
Younn Olivier 5fe16aa346 [FIX] web_editor: fix image transforms linter issues
This fixes linter issues introduced in
https://github.com/odoo/odoo/pull/71847

task-2554608

closes odoo/odoo#74823

X-original-commit: 5a990248c647d7303ffc578e6fc9dbc1ee4670dc
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-06 14:24:32 +00:00
Romain Derie f253018002 [FIX] website_forum: add missing ID which lead to broken JS
That ID was removed with c8c8eb3d56, but the JS code is expecting to find
this ID inside the DOM to increment the flag counter.

Courtesy of @dwa-odoo
Spotted while working on task-2167561

closes odoo/odoo#74819

X-original-commit: 2e3f78569e2bb2e0cd2ad9271b1877a43a8c4abb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-08-06 14:01:34 +00:00
Adrien Widart fdd4af3e2a [FIX] purchase: use Product Price precision in bills
When the Product Price precision is greater than the currency precision,
it can lead to incorrect data

To reproduce the error:
(Enable debug mode)
1. Settings > Technical > Database Structure > Decimal Accuracy, edit
Product Price:
    - Digits: 3
2. Create a PO
    - Add a product:
        - Quantity: 12
        - Unit Price: 0.001
3. Save, Confirm, Edit the PO:
    - Qty Received: 12
    - (Note that the total is $0.01)
4. Create a bill:
    - Add the PO to the field "Auto-Complete"

Error: The unit price is $0.000 and so does the total

The rounding of the unit price should be based on the Product Price
precision, not the currency precision.

OPW-2601867

closes odoo/odoo#74813

X-original-commit: 1123856c77cce4b69059b63c2bcbb382c7f0719e
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-08-06 13:00:24 +00:00
Susana d9ca0a00b3 [FIX] l10n_latam_invoice_document: Allow to change the l10n_latam_document_number manually when the invoice is in draft status
closes odoo/odoo#74807

X-original-commit: cf2ef8373905888bae61e111d2f1ce58792cad56
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-08-06 11:21:00 +00:00
Aaron Bohy f6c57577fd [FIX] web: correctly put load_views rpc result in cache
In the "view" service, there is a cache s.t. we don't do the
load_views rpc each time we enter an act_window action. However,
before this commit, we never did cache hits because we modified
(in place) the "views" key inside the action, which is used to
generate the cache key.

closes odoo/odoo#74783

Signed-off-by: Bruno Boi <brboi@users.noreply.github.com>
2021-08-06 11:48:10 +00:00
Fabrice Henrion 034430bdb6 [FIX] account: change selection label
Grammar police

closes odoo/odoo#74777

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-06 12:11:34 +00:00
Fabrice Henrion 0e30b8b828 [FIX] partner_autocomplete: correct typo
closes odoo/odoo#73524

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-06 12:13:23 +00:00
Fabrice Henrion 3d58bdacde [IMP] sale_quotation_builder: rephrase help message
closes odoo/odoo#73476

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-06 12:31:20 +00:00
Fabrice Henrion f35e53aca7 [IMP] point_of_sale: rephrase
closes odoo/odoo#72232

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-06 12:32:48 +00:00
Fabrice Henrion 82c2f3a27f [IMP] mail: rephrase
closes odoo/odoo#71075

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-06 12:33:48 +00:00
SilvioC2C a12c912291 [IMP] sale_product_configurator: Add context to _rpc call
Added context to _rpc call in _onTemplateChange function for improved inheritability and easing customizations

closes odoo/odoo#74806

X-original-commit: c6467305c88fb3ba3c832a4cca525220f977ba53
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-08-06 11:18:36 +00:00
Nicolas (vin) b1fbf77236 [IMP] account: remove search when opening journal entries of a bank statement
Remove an unnecessary default search when opening the journal entries
of a bank statement.

closes odoo/odoo#74802

X-original-commit: e9f6bbb9093a4c2bf6e728d2882f6dab65658c01
Signed-off-by: William André (wan) <wan@odoo.com>
2021-08-06 10:58:07 +00:00
Benjamin Frantzen (bfr) 94262d7712 [FIX] l10n_it_edi_sdicoop: do no copy transaction ID and attachment ID when duplicating invoice
When duplicating an invoice, a new edi should be generated, therefore l10n_it_edi_transaction and l10n_it_edi_attachment_id should by copy=False.

closes odoo/odoo#74799

X-original-commit: 7ea86c2662369aa8d09e6bafaf2fe024e8f57f40
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-08-06 10:33:17 +00:00
Samuel Degueldre 37aca4a38e [FIX] im_livechat: add missing dependencies to manifest
The dependencies of the public_root module were recently updated, but
the manifest of im_livechat was not, causing it to fail to load. This
commit adds those missing dependencies to the manifest.

This commit also adds a test that checks that all modules are properly
loaded on the support page, since this has been broken on multiple
occasions while changing the dependencies or the path of some of the
modules this page needs to work.

closes odoo/odoo#74756

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-08-06 10:15:23 +00:00
Samuel Degueldre 64fc704527 [IMP] web: log module loading issues even when they throw a real error
Previously, when an Error was thrown inside an async module, that error
would not cause boot.js to log information about missing, failed or
rejected modules. This is because we were only using guardedCatch to
mark modules returning a rejected promise with something other than an
error as rejected, but the case where a real error was thrown was not
handled, which left the job to be forever pending.

This commit fixes that by catching real errors after the previous
processing, and treats it like an error in a synchronous module.
2021-08-06 10:15:23 +00:00
Daniel Blanco c874bff3de [FIX] l10n_cl: modifications to report invoice to show tax included in boletas
[ADD] l10n_cl: add method to invoice report to format the vat dotted

closes odoo/odoo#73869

X-original-commit: 2b500c12c2540e593f3a243bf80de28bd335b7be
Related: odoo/enterprise#19705
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-07-16 12:30:16 +00:00