Commit Graph
141473 Commits
Author SHA1 Message Date
Rachid Al Assir bc67b1ab7b [IMP] survey: order survey user inputs by last attempts
Purpose is notably to display last survey attempt as "Date of certification"
instead of first one. We therefore set an _order on survey.user_input model
(user participation to a survey) as create_date desc. When several attempts
are made the last one will be considered when doing a search with limit=1.

Closes #61362

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-25 08:04:40 +00:00
Rachid Al Assir 39996a598a [CLA] signature for RachidAlassir 2020-11-25 07:58:07 +00:00
Nicolas (vin) b94b52ff7e [IMP] account: Prevent inconsistent amounts and currencies on vendor bills.
when a Vendor bill in an inactive currency is created (via an an EDI or the OCR,
or when the user create the invoice in an active foreign currency, then desactivate it)
it should not be possible to validate it.

Task ID: #2289537

closes odoo/odoo#54096

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-11-17 07:50:22 +00:00
Benoit Socias af017d9557 [FIX] portal: detect attachment selection even when same as previous
Before this commit selecting the same attachment was not detected, which
was a problem when the attachment had been mistakenly removed

After this commit when the same attachment is selected several times in
a row it still triggers the upload and gets attached

https://github.com/odoo/odoo/issues/42364

closes odoo/odoo#62278

X-original-commit: e9b1bca1d48afff8313d106266b02793cf77ab79
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-24 18:47:44 +00:00
Nicolas Martinelli 4dcbb1e62f [FIX] web: grouped export
- Create a product with:
  Cost: 60.80
  Quantity On Hand: 999.0
- Go to Inventory / Reporting / Inventory Report
- Export as XLS

The header values have too many decimals: 60739.2000000007

The root cause is `convert_to_cache` returns this value:

https://github.com/odoo/odoo/blob/042298f8c949fba470eda6ad90f94c95ca291030/odoo/fields.py#L1333

In this case, `currency.round()` keeps the extra digits. Since the field
is not stored, the useless digits are kept.

A simple solution is to use `float_repr` on the non-stored float fields
to make sure that doesn't happen. Another solution could be to not
convert the floats to strings, but that doesn't seem intended.

opw-2378895

closes odoo/odoo#62265

X-original-commit: 2ebcbb16f113dee1416097b7a52f8068a40a34cf
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-24 16:02:46 +00:00
wan d4892f26ea [FIX] account: copy journal entry without partner
The partner is not visible in the form so copying can lead to unwanted
behaviours.

Task 2389917
opw-2388430

closes odoo/odoo#62276

X-original-commit: ef1b3332a523f0afdb954f8eb2abb8f442bdca58
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-11-24 18:18:23 +00:00
Christophe Monniez f92b5b738f [FIX] web: skip adyen account menu entry
The `Adyen Account` menu entry leads to an external page.
This cannot be tested by the click_all test.

closes odoo/odoo#62269

X-original-commit: bcbbe3dd80bfe50bf897ce620da0bd7ddb3c3094
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-11-24 16:46:14 +00:00
Nasreddin (bon)andAurélien Warnon e598e74648 [IMP] mass_mailing(_sms): support calendar view and ease scheduling
PURPOSE

To ease the scheduling process, we introduce a new calendar view on mailings
that allows to easily schedule your communications. In addition, mailings and
sms views are improved to ease global usability especially about scheduling
configuration.

SPECIFICATIONSS

- add a calendar view to allow marketeers to either schedule or overview their
  ongoing mailings/sms;
  Side note: inspired by what has been done with Social Posts

- improve the scheduling flow by allowing to configure it directly in the form
  view using fields rather than action buttons that open an extra window. This
  implied removing the schedule wizard as everything is now configured directly
  from the mailing form view;

- add a constraint on 'schedule_date' to make sure it's not scheduled in the
  past;

- compute a calendar_date to be used by calendar view. It is either sent
date (if sent), next departure of cron (if in queue) or schedule date (if
scheduled).

- update mass_mailing_sms to match scheduling flow of emails and adjust the
  'sms_force_send' display to ease understanding ;

LINKS

Task ID-2202759
COM PR odoo/odoo#57000
ENT PR odoo/enterprise#12920
UPG PR odoo/upgrade#1736

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Aurélien Warnon <awa@odoo.com>
2020-11-24 15:25:50 +00:00
Robin Heinz 7f8aecb21d [FIX] point_of_sale: allow to enter 0 in the cash popup
It was impossible to validate the cash control popup if the value was 0.
Now it's possible to validate any amount, including 0.

closes odoo/odoo#62256

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-11-24 14:58:22 +00:00
Julien Giannone 01b5bf1442 [FIX] mail: fix text selection in composer using SHIFT and arrow keys
This commit corrects the faulty SHIFT + ArrowKey selection behavior.

task-2388650

closes odoo/odoo#62251

X-original-commit: d498f899aa2ef81acbcd035896b9fcc912e4d52b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-24 14:24:48 +00:00
Adrian TorresandRaphael Collet 64b95a01d0 [FIX] base: do not prefetch fields to be uninstalled
During the uninstall step of the registry, we perform a commit right
after the uninstallation of all module data, this commit is performed
right before the creation of a new registry, this means that said commit
will call `flush_env` and thus `recompute` on an environment that is
based on a stale Registry (memory and database are unsynchronized).

This means that during this specific moment, there's a chance that the
recompute function may have to fetch some fields it depends on to
perform its computations if said fields are not in cache, this in turn
means that it will try to prefetch fields that are potentially no longer
in the database, making the registry crash and preventing the uninstall.

This is what happened with multiple if not all `payment_*` modules, the
main module `payment` depends on a `ir.module.module` record, most
notably the `color` field of the `payment.acquirer` model which depends
on the `state` field which in turn depends on the
`ir.module.module.state` field.

This meant that uninstalling a module such as `payment_paypal` triggered
a recompute of `payment.acquirer.color` during uninstall, and to perform
that computation we need several `payment.acquirer` fields to be fetched
from cache or the database. If in cache, the uninstall would go through
without a hitch, if not in cache, we would fetch the required fields
from the database but we'd also attempt to prefetch the fields
introduced by `payment_paypal` that had just been deleted from the
database!

To avoid this, the `_module_uninstall_data` method of `ir.model.data`
will henceforth guarantee that `ir.model.fields` that are to-be-deleted
will have their prefetch set to False, meaning only existing fields will
be fetched from the database during the uninstall of extending modules.

Fixes #60424
opw-2372598

closes odoo/odoo#62247

X-original-commit: 7bffd2df0d5d7eff841cdf7ba7cb6ea84a5c5c49
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2020-11-24 13:42:25 +00:00
Raphael Collet 1398b6b44c [IMP] tests: deprecate SavepointCase
closes odoo/odoo#62031

Related: odoo/enterprise#14872
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-11-24 13:23:32 +00:00
Raphael Collet 84aabd001e [FIX] test_translation_import: side effect between test methods
One test method was setting `env.context` instead of creating a new
environment.
2020-11-24 13:23:32 +00:00
Raphael Collet cf0bf4737f [FIX] test_mail: test that needs to commit the cursor
As the test explicitly commits the cursor (this is necessary to release
database locks), the teardown phase needs a valid savepoint.
2020-11-24 13:23:32 +00:00
Raphael Collet c1279cd52a [FIX] test_impex: cursor cache in tests
As the same cursor is used by all tests, make sure to clear its `cache`
upon setup.
2020-11-24 13:23:32 +00:00
Raphael Collet 6319e0c0ce [IMP] base: speed up tests on translations
Simply load translations in `setUpClass` instead of `setUp`.
2020-11-24 13:23:32 +00:00
Raphael Collet 3e77accdc3 [FIX] base: tests on test cursor 2020-11-24 13:23:32 +00:00
Raphael Collet b580f74502 [FIX] base, test_new_api: tests on custom fields 2020-11-24 13:23:32 +00:00
Raphael Collet a40511cd29 [FIX] core: env.clear() also invalidates lazy properties
In unit tests, this avoids side effects from one test to another.  In
particular, a test modifying the user's company can make other tests
fail because `env.company` defaults to the user's company when nothing
else is available in the context.
2020-11-24 13:23:32 +00:00
Raphael Collet 7f2e168c02 [IMP] tests: merge TransactionCase and SavepointCase
The now unique class behaves as the former class `SavepointCase`.  It is
now up to the developer to use `setUp` or `setUpClass` for preparing the
tests.
2020-11-24 13:23:32 +00:00
Goffin Simon 3671259eac [FIX] l10n_de_skr03: Partner VAT Intra
Steps to reproduce the bug:

- Let's consider the current company C in Germany with a VAT number
- Let's consider a partner P in Belgium with a VAT number and fiscal position Geschäftspartner EU (mit USt-ID)
- Let's consider a product PR with weight and a 19% tax
- Make a cutomer invoice CI to P with PR
- The 19% tax will be replaced by Steuerfreie innergem. Lieferung (§4 Abs. 1b UStG)
- Post CI
- Go to the Intrastat report

Bug:

PR didn't appear in the report

As wrtote here: https://github.com/odoo/enterprise/blob/13.0/l10n_de_reports/models/partner_vat_intra.py#L21
The taxes considered in the intrastat report must be with as least one of these tags:

- l10n_de.tag_de_intracom_community_delivery
- l10n_de.tag_de_intracom_community_supplies
- l10n_de.tag_de_intracom_ABC

But Steuerfreie innergem. Lieferung (§4 Abs. 1b UStG) didn't have one of these tags
Same for Steuerfreie Ausfuhr (§4 Nr. 1a UStG)

opw:2379263

closes odoo/odoo#62245

X-original-commit: e72b3fc9b899f93b515c6c4bb8287e21133a5946
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-11-24 13:07:12 +00:00
Sébastien Theys 5ab794cf30 [FIX] mail: avoid adding non-members on mention in channels
task-2392010

closes odoo/odoo#62242

X-original-commit: 0a3fe0a513abbde8f74d59de522a216035cdcd98
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-24 12:52:37 +00:00
Benoit Socias 49f9a8aa84 [IMP] base: avoid generating blank lines
The way QWeb handles text nodes and node tails makes it generate
white spaces copied from the XML indentation even before the first
useful character

Before this commit blank lines appeared at the beginning of generated
documents as well as inside the document content

After this commit no blank lines appear at the beginning of generated
documents and blank lines inside document are removed

task-2366756
https://github.com/odoo/odoo/pull/60850

closes odoo/odoo#60850

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-29 13:25:52 +00:00
Benoit Socias bde8abcfeb [IMP] web_editor: support 5 dynamic colors for illustrations
Before this commit only the first default palette color was configurable
on illustrations

After this commit all 5 default palette colors are configurable on
illustrations

task-2368585

closes odoo/odoo#60503

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-20 13:13:15 +00:00
Laurent Smet f5c1e09772 [FIX] account: mark invoice as paid when paying all in foreign currency
Activate multicurrency:
* EUR with rate 1.0
* USD with rate 100.0
Have a company in currency USD
Create an invoice (in USD)
* invoice line of 12.15, no tax
Save, post and register payment
In the payment widget change currency to EUR.
The amount will be automatically converted in 0.12
Register payment

Invoice will be still marked to paid as the amount paid is 12.0.
This occur because the system does not check if the amount to be paid,
expressed in payment currency, is what has been paid.

opw-2376336

closes odoo/odoo#62238

X-original-commit: 967a2ab323e273c853aee0edd5ce404f4d14e6ab
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-11-24 11:56:10 +00:00
Christophe Monniez 3a918898e8 [FIX] stock: limit access to replenishment menu
The replenishment menu is available even for users that are not allowed
to use it. This causes the click_all test to fail with a warning.

closes odoo/odoo#62232

X-original-commit: d22daa8baa78fdcc9202657ab94e849f5690187f
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-11-24 10:14:20 +00:00
Tiffany Chang (tic) e61e5b5110 [IMP] mrp: add MO note when unbuilt
This commit makes it so a note is logged when an unbuild order is linked
to a manufacturing order is completed.

closes odoo/odoo#62012

Task: 2378831
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-11-19 11:07:36 +00:00
Jeremy Kersten 5c6111a14a [FIX] website_blog: more tolerant with cover property
resize_class can be missing from the properties

opw-2379828

closes odoo/odoo#62092

X-original-commit: e07757b1e941c33fd76f79aaafe8398f611721d2
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-20 12:46:23 +00:00
Swapnesh Shah cf3184b728 [FIX] account: mandatory field account in payment
Before this commit, `destination_account_id` field was not required on model/view, Creating record without `destination_account_id` is not allowed since it is required on `account.move`.

Now field is required.

closes odoo/odoo#62218

X-original-commit: daac5e3c720b42b062445e72d70a834d591f953f
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-11-24 07:03:31 +00:00
Achraf (abz) a07fc355aa [FIX] purchase: Display the right logo in portal with multicompany
What are the steps to reproduce your issue ?

    1. Create two companies on a multi-company database without Website installed.
        For this use case, install Purchase
    2. Configure two distinct logos per company
    3. Create a Purchase Order with the second company.
    4. Send PO from second company over as email.
    5. Check recipient email (or mailhog for Runbot) for the email
    6. Find that while the PDF report reflects second company's logo,
        the header navigation bar in the client email when clicking "View Request
        for Quotation" reflects company_id=1's logo.

What is currently happening ?

    The displayed logo is not the correct one.

What are you expecting to happen ?

    Display the right logo.

Why is this happening ?

    Because when rendering the view. The value of 'res_company' declared in the context has as value the id of the default company of the user

How to fix the bug ?

    Specify the current company.

opw-2380274

closes odoo/odoo#62066

X-original-commit: 044bca5e64451d86c6f7c9dbb919c0c319a37bd5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2020-11-20 09:19:58 +00:00
alt-odoo 57ad950178 [FIX] base_import: allow import of dates in German format
The German date format is the following: DD.MM.YYYY but when importing
such value, it is wrongly considered as a float value due to the '.'
being confused with the thousands separator in the regexp of method
_remove_currency_symbol.

We should check both date/time and float/monetary formats, so it will
correctly identify the German date format as well as float values.

closes odoo/odoo#62205

X-original-commit: 1bdd0cc247d36c869ffdee7d501cb65d36be47a6
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2020-11-23 16:46:24 +00:00
Ivan Yelizariev cbde29fa82 [REF] sale_timesheet: allow extending list of employees
WHY: this is needed for project_timesheet_forecast_sale, which adds employees
from planning.slot records

---

opw-2378102

closes odoo/odoo#62193

X-original-commit: ed8f7009ee89f162d8c752efa5335b885a27c389
Related: odoo/enterprise#14919
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-11-23 14:58:35 +00:00
Sébastien Geelen (sge) 5df12c183e [IMP] web_editor: update Jabberwock library to commit 4b2c903b
Changelog:
[FIX] DomLayout: Make sure falsy attribute values are not transformed into null

closes odoo/odoo#61875

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-11-23 16:03:53 +00:00
Thibault Delavallée 473b07e34c [FIX] crm_livechat: do not set public user partner as lead customer usign /lead command
When chatting with visitors, operator may use /lead command to directly create
a lead from discussion. That way commercial discussion can follow visitors
inquiries.

Anonymous (public) users may be part of channels, notably since f5fe11cf1e.
In that case we don't want new leads to be associated with those users. Indeed

  * they are not real users, just technical users for website / frontend;
  * merge processes may think all leads having public users as customer are
    duplicates and should be merged, which means loosing information and
    leads;

We therefore set the following heuristics

  * if a public user is member of a channel -> consider this is a livechat
    with an anonymous and set customer_id to False;
  * otherwise try to find a share partner in channel members and link the lead
    to that partner;

Task ID-2389564

closes odoo/odoo#62192

X-original-commit: 7fbeda3f7d92fa501c2752c873be2255697f5d97
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-23 14:58:06 +00:00
Priyanka Kakadiya f285907c7d [FIX] mail: added test for no suggested recipient in lognote
LINKS

Task - 2371744
PR - https://github.com/odoo/odoo/pull/61388

closes odoo/odoo#62180

X-original-commit: 9cfb82dd4a9f3bef94960abd40c648373eff4ea9
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-23 13:18:59 +00:00
Priyanka Kakadiya 8b525d01a8 [FIX] mail: focus should be on composer after post message
PURPOSE

When sending a message by clicking on the "send" button manually, the focus
should stay on the text input (and the mobile keyboard should stay open), so
that it is possible to quickly send another message afterward without having to
re-click manually on the text input

SPECIFICATION

the focus should be set to composer automatically after sending a message

LINKS

closes odoo/odoo#62179

Taskid: 2372546
Pr: https://github.com/odoo/odoo/pull/61226
X-original-commit: 6cc5d4ae9ed2d7dbbad51ae720365730c8a416ac
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-23 13:18:32 +00:00
Anh Thao Pham (pta) adf087f203 [FIX] website_sale: restrict types for displayable extra fields
- Install eCommerce
- Enable debug mode
- Go to Website > Configuration > Websites
- Configure Website by adding a Selection field in "Product Page Extra Fields" (i.e. Product Type)
- Go to Website and from Shop, open a Product
- In Customize menu, enable "Show Extra Fields" options
A KeyError is raised with "selection" key.

By using "selection" widget, the value is processed by SelectionConverter, which tries
to retrieve the text linked to the value by accessing missing "selection" dict in options.

As the feature was originally designed to support "char" and "binary" types, the selection
of extra fields displayable on eCommerce Product page will be restricted to these 2 types.

opw-2378753

closes odoo/odoo#62151

X-original-commit: 87ea687169c9a0047b41b11ab143544142c82aae
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-11-23 09:55:10 +00:00
Kevin Baptiste 4f4c643a0b [FIX] project: don't send rating email when disabled on project
The rating emails were still sent even if the rating feature was
disabled on the specific project.

This commit ensures the emails are only sent to project with the feature
enabled.

closes odoo/odoo#62181

Taskid: 2390802
X-original-commit: 3fe5416f07e76ccca6c0bb05a6fa12d8e2ca0e6c
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2020-11-23 13:19:27 +00:00
Aurélien Warnon 431ac269a2 [FIX] web_tour: prevent kanban quick create closing when tooltip is clicked
Currently, when the user is using the quick create card of the kanban view, the
card will automatically close itself if the user clicks on a tooltip element
from a tour.

This can lead to bad user experience since the tour tip can be visually
*within* the quick create card, and the user will not understand why the card
is closing.

More importantly, the tooltip element "zone" is bigger that what it visually
looks like and you may click on an element (a field, ...) that seems to be
perfectly within the quick create card but is in fact part of the tooltip.

This commit fixes that behavior by preventing the click event propagation in
the tip widget handler.

The fix is made in version 14.0 because this is especially problematic for the
tour of the "CRM" app, that heavily uses the quick create card in combination
with tour tips.

Task 2388450

closes odoo/odoo#62175

X-original-commit: 48d30e1375cc25fd430cdcb53e9b849be295ac26
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2020-11-23 12:29:51 +00:00
Thibault Delavallée 34ca7817ec [IMP] base: remove leftover fax in contact widget
Fax field was removed somewhere between Odoo10 and 11. However there is still
some leftover about fax in contact widget. As there is no fax field anymore
and as it is easy to add it through inheritance let us remove it.

Closes #62105

closes odoo/odoo#62182

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-23 07:53:31 +00:00
Adrien Widart 20289fbd1a [FIX] portal: if no user photo, display placeholder
If the website header template uses the user's photo, and if this one does not exist, a 500-error is returned.

To reproduce the error:
(Need website)
1. Go to the website
2. Edit
3. Change the header template
	- Select one that uses the user's photo
4. Save
5. Go to Settings > Users & Companies > Users
6. Select your account
7. Edit
8. Remove your photo, Save
9. Go back to the website

=> 500 error

When the user doesn't have any photo, the template uses the placeholder image.

OPW-2378269

closes odoo/odoo#62174

X-original-commit: ae0acf83cee73f6617200387bb923bf875e1830b
Signed-off-by: adwid <adwid@users.noreply.github.com>
2020-11-23 12:29:25 +00:00
Sébastien Theys 5f42a13bfa [FIX] mail: prevent crash when initializing many failures
The test highlighting the current issue has been posted in PR
https://github.com/odoo/odoo/pull/62076

But it is not included as part of the current PR because it is too slow to
execute, while it is unlikely we will break this fix as it is not influenced by
anything else in the code.

The reason why we need this change is because on some database, including ours,
we have users who have more than 1000 failures still unresolved and they are
all returned at init.

closes odoo/odoo#62173

X-original-commit: 32ed8125aeb356e568d3c49ef7a04c0ff9e36169
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-23 12:28:54 +00:00
Sébastien Theys 385a776a1f [FIX] mail: avoid empty seen indicator
`MessageSeenIndicator` sub-component should not be rendered if the thread does
not support seen indicators.

The issue is manifesting because the otherwise empty indicator has a margin,
which is adding more space than expected before the following element.

closes odoo/odoo#62172

X-original-commit: 4e0e8a415ae2175cd68e514cff33b2bffeb99db7
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-23 12:28:26 +00:00
Julien Giannone 225ae4d53e [FIX] mail: Sidebar channel find shows all channels
When searching for a channel in Discuss, the search results include
all matching channels even those user is already member of

task-2347837

closes odoo/odoo#62161

X-original-commit: 884bebb0f549dc4385cec9542f74e0bba64ccb08
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-23 11:39:50 +00:00
Christophe Monniez c6190a1b31 [FIX] web: ignore menu add bank account in click all
Since odoo/enterprise@93ac6e5116 a the `Add Bank Account` menu is using
an new proxy server. As it's an external service, it's not desirable to
click on this menu during the test.

closes odoo/odoo#62157

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2020-11-23 10:31:59 +00:00
Nicolas Martinelli 1db656da06 [FIX] purchase_stock: fix price difference
1. Create a storable product
2. Set the category: Costing
   - Method: First In First Out (FIFO)
   - Inventory Valuation: Automated
   - Price Difference Account: Price different accounts.
3. Create a vendor bill with the product and the quantity set as 0, and set a tax
4. Post the vendor Bill

A ZeroDivision error is raised.

opw-2375464

closes odoo/odoo#62120

X-original-commit: beeb83ca53c52dc189faaff4d76711bbcf24a08c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-20 16:57:20 +00:00
jev-odoo 12b612d798 [FIX] core: incomplete traceback
XML loading always raises a ParseError, however when an XML loading error is triggered from an HTTP request (e.g. a button) the final ParseError logged & shown to the user would not be properly chained to its ancestor, leading the original cause to be lost and issues being much harder to diagnose.

This cause is lost in _handle_exception where we duplicate the exception in order to chain it correctly, the __cause__ of the source exception was not properly copied over, and would thus break the chain.

The fix also requires explicitly chaining the ParseError to its cause, this should not be necessary but the cause is also lost if this is missing, it is not clear why.

opw-2381776

closes odoo/odoo#62117

X-original-commit: 650476812ee7d57f1d954be5557a3856448ffe5e
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-11-20 16:55:41 +00:00
Antoine Guenet 155307d781 [FIX] website, website_sale: properly save filter id of dynamic snippets
closes odoo/odoo#62114

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-11-20 16:39:52 +00:00
Didier (did) 831a83f273 [IMP] mail: implement read only field
Fields can now be marqued as read only.
```
stringifiedDomain: attr({
    default: '[]',
    readonly: true,
}),
```

closes odoo/odoo#60086

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-23 09:17:40 +00:00
Ivan Yelizariev 6851e20027 [FIX] base: add sudo on reading ir.ui.view
STEPS:

1/ Fresh copy of base runbot 14.0
2/ Change country on the company to 'Mexico'
3/ Install apps Sales and Contacts
4/ Login as 'Demo' and try to access Contacts

BEFORE: Access Error

AFTER: No errors

WHY:
* since Odoo 14 only admin can read ir.ui.view: https://github.com/odoo/odoo/commit/ccc98e01691b88c2da9c484c0e6de235b9d18548
* https://github.com/odoo/odoo/pull/60329

---

opw-2378336

closes odoo/odoo#62110

X-original-commit: 7ae0e00738a0bcedb4b36049ce4364f46c7d899e
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-11-20 16:07:42 +00:00