Commit Graph
122816 Commits
Author SHA1 Message Date
Christophe Monniez 03a8819652 [FIX] tests: avoid check document.readyState of about:blank
In an HttpCase test, when the browser_js method is used, an optional
javascript code can be used to check that the page is ready to execute
the test.

When no 'ready' code is given it defaults to check the
'document.readyState' status.

In some rare cases (discovered by @Xavier-Do) this status is checked on
the 'about:blank' page. As the page seems ready, the test code is
evaluated and fails.

With this commit, when no specific ready code is provided, the test will
wait for a chrome devtools event that ensure the page is fully loaded
before starting the test.

closes odoo/odoo#30584
2019-01-26 15:09:37 +00:00
Robot Odoo 529069996c [FIX] base ir.actions.report order pdfs when attachment_use option selected
Description of the issue/feature this PR addresses:
Order of merged pdf reports when attachment_use = True

Current behaviour before PR:
When in a report the "Reload from Attachment" option was selected
(attachment_use = True), and multiple pdfs were printed, the singular pdfs
were stored in a dictionary and appended to a list and thus merged in a random order.

Desired behaviour after PR is merged:
By mapping the pdf with their source record, and sorting the list with the table _order of
the source records of the pdfs, we seek to have an ordered output pdf.

opw 1915685

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#30402
2019-01-28 10:15:48 +01:00
sbbaro c4d2c2cf13 [FIX] base ir.actions.report order pdfs when attachment_use option selected
A couple of small changes:
- only run the search if streams is not empty
- change streams for stream_list in the if for the final merging
2019-01-23 14:20:33 +01:00
sbbaro 6db1b8343b [FIX] base ir.actions.report order pdfs when save_in_attachment option selected
When in a report the "Reload from Attachment" option was selected
(attachment_use = True), and multiple pdfs were printed, the singular pdfs
were stored in a dictionary and thus merged in a random order.

Now, we make a list before merging them and sort it with the table _order of
the source records of the pdfs to have an ordered output.

opw 1915685
2019-01-21 11:07:03 +01:00
Nicolas Martinelli 0fa969a4a7 [FIX] sale: attachment name
- Create a SO, keep it as draft
- Click on 'Send by Email'

The name of the attached PDF file contains `_draft`.

This doesn't really make sense anymore, since the SO will be set to
'Sent' right after sending. Therefore, if sending a second time,
`_draft` won't be added to the filename.

opw-1930282

closes odoo/odoo#30367
2019-01-18 15:35:08 +00:00
Nicolas Martinelli c15551a3f2 [FIX] crm: default CRM team
Keep the default value for the default CRM team (False) since leads are
not activated by default.

opw-1929489

closes odoo/odoo#30360
2019-01-18 14:08:22 +00:00
Christophe Simonis d657d6457f [FIX] website: update *all* views, not only website ones
closes odoo/odoo#30369
2019-01-18 16:34:08 +00:00
Nicolas Martinelli 5291b8c1a4 [FIX] account: Journal Items link
- Activate debug mode
- Go to the Accounting Dashboard
- In Vendor Bills, click on 'Journal Items'

A crash occurs because of the concatenation of a `bool` and `str`.

In this case, the `action['help']` is `False`.

closes odoo/odoo#30351
2019-01-18 12:02:28 +00:00
Lucas Perais (lpe) 897834f406 [FIX] base: res_users form message partner active correct condition
Before this commit, the condition and the field on which it applied were wrong
That is, when both the user and the partner were inactive, the message saying that
the partner was still active displayed anyway

After this commit, we show the message only when the user is inactive but its
directly related partner is still active

OPW 1928247

closes odoo/odoo#30337
2019-01-18 10:07:26 +00:00
XavierDo 76e085cbb7 [FIX] base: avoid to escape image when src contains @
The content id of an attachement can contains a @, therefore
image contained in emails where sometimes escaped by html_sanitize
as if they were emails adresses.

Task: 1915251

closes odoo/odoo#30326
2019-01-17 16:21:08 +00:00
Nicolas Martinelli 8781e2e4f8 [FIX] payment: multiple companies
- Activate multi-company
- Create 2 S2S payment methods (Payment Flow: Payment from Odoo), one
  for each company
- Connect as a regular user to `/my/payment_method`

The user has access to both payment methods, while he should only have
access to the method of his company.

opw-1920483

closes odoo/odoo#30558
2019-01-25 13:34:32 +00:00
Nicolas MartinelliandNicolas Lempereur b2266fae87 [FIX] website_sale: terms & conditions
- Install website_sale and website_sale_delivery
- Activate 'Terms & Condition' on the payment page
- Process a shopping cart

On the payment page, the 'Terms & Condition' checkbox is unchecked, but
the 'Payment' button is enabled.

Both `$checkbox.change` and `_onCarrierUpdateAnswer` set the `disabled`
property, and conflict.

We keep on the HTML node an object with the list of disabled reasons.

opw-1923459

Co-authored-by: Nicolas Lempereur <nle@odoo.com>

closes odoo/odoo#30504
2019-01-25 10:19:12 +00:00
Odoo Translation Bot fe36bff420 [I18N] Update translation terms from Transifex 2019-01-27 01:37:55 +01:00
Nicolas Lempereur c7a281d880 [FIX] website: affix menu no close frontend mobile menu
On mobile the frontend menu navbar is an hamburger menu that open on
click.

If the option "Customize > Main layout | Affix Top Menu" is
enabled, there is two menu:

- one at the full top of the page
- one affixed to the top of the viewport (only shown if we are at least
  scrolling 300px away from the top of the page)

But there is a side effect: when scrolling if the menu at the top of the
page is opened, it will be automatically closed => this makes sense to
avoid having two menu shown on the same page but is an odd behavior.

With this commit, the behavior is changed and when the menu is opened in
the top, the affixed menu is not shown (it only works if the top page
menu has no opened dropdown).

opw-1920310
closes #30564
2019-01-25 15:56:15 +00:00
Yenthe666 146e0692e5 [FIX] l10n_nl: don't set VAT accounts on grouped tax + follow official Dutch tag names
closes odoo/odoo#30539
2019-01-25 09:34:53 +00:00
qdp-odoo 19ece69850 [FIX] account: manual reconciliation from journal items
use cases fixed:
  1) go in the journal items, filter on unreconciled lines, pick just one and click on 'Action > reconcile', the manual reconciliation widget opens but you directly get the rainbowman and you can't do anything. It's not possible to reconcile the selected entry with a writeoff (to clear a customer account, for example).
  2) go in the journal items, select 2 receivable lines for the same amount but that don't have any partner set then click on 'Action > reconcile', the rainbowman directly shows without processing the reconciliation.

    To fix those issues, we now clearly bypass the regular methods in case we have active_ids and active_model == 'account.move.line', since they weren't adapted anyway.

    also implement real error message when selected lines don't have the same company or account (currently it's displaying a rainbowman): see error messages in 'reconcile()' in account_move.py

  OPW #1919727 and #1930957

  Co-authored by wan-odoo

closes odoo/odoo#29771
2019-01-25 12:21:16 +00:00
Christophe Simonis c8ace043e5 [MERGE] forward port branch saas-11.3 up to 387d5cff90
closes odoo/odoo#30566
2019-01-25 17:29:34 +00:00
Christophe Simonis 387d5cff90 [MERGE] forward port branch 11.0 up to 8f47b028ed 2019-01-24 17:01:40 +01:00
Robot Odoo 8f47b028ed [IMP] l10n_be_hr_payroll_fleet, fleet: Adapt CO2 Tax up to 2019
Specification
=============

- Adapt the formula used in the code with the current legal value.
- Add the LPG fuel type in standard fleet module.
- Adapt the atn formula in the code with the current legal value.

Documentation:
https://finances.belgium.be/sites/default/files/downloads/121-faq-voitures-de-societe-2019-version17.pdf
https://www.socialsecurity.be/employer/instructions/dmfa/fr/latest/instructions/special_contributions/companycar.html

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#30484
2019-01-24 14:22:24 +01:00
sed-odoo dad59a62c3 [IMP] l10n_be_hr_payroll_fleet, fleet: Adapt CO2 Tax up to 2019
Specification
=============

- Adapt the formula used in the code with the current legal value.
- Add the LPG fuel type in standard fleet module.
- Adapt the atn formula in the code with the current legal value.

Documentation:
https://finances.belgium.be/sites/default/files/downloads/121-faq-voitures-de-societe-2019-version17.pdf
https://www.socialsecurity.be/employer/instructions/dmfa/fr/latest/instructions/special_contributions/companycar.html
2019-01-24 12:24:04 +01:00
Lucas Perais (lpe) e8803e91e2 [FIX] account: register payment multi invoices
In the invoice list view, select one or more invoices
click on the action > register payment

In the wizard, put an amount inferior to the sum of invoices amount
Do a write off

Before this commit, the write off was ignored and the invoices not marked as paid

After this commit, the write is written, and the invoices marked as paid

OPW 1920839

closes odoo/odoo#30465
2019-01-24 08:49:23 +00:00
Martin Trigaux 15e2857cf3 [FIX] portal: match title and purpose
Was saying previous while it was actually next

closes odoo/odoo#30543
2019-01-25 10:18:13 +00:00
Nans Lefebvre 8275b6eff8 [FIX] sale, sale_expense, sale_stock: make the False expense_policy selection behaves as 'no'
The sale.order model has an expense_policy selection field, with values in 'no',
'cost', 'sales_price'.
However that value can also be set to False.

The code that handles that field expected the value to always be set to a value.
We explicitly treat False as if it was 'no' (the default value for that field).

opw 1915508

closes odoo/odoo#30336
2019-01-24 07:12:33 +00:00
Nans Lefebvre cb9466cf9c [FIX] rating: add search method on non-stored rating attribute
Commit f727e9d9b6 made the rating field
of mail.message non-stored for performance reasons.
When the rating is activated on the website, it adds the possibility to filter
product reviews by rating (1 to 5 stars).
It does so by searching the messages that have a given rating value.
However the osv complains that you can't search on a non-stored field.
As a result, instead of displaying messages filtered by ratings,
it would always display all of them.

We add a search='_search_rating_value' on the field to allow that field to be
searched anyway.

opw 1931038

closes odoo/odoo#30499
2019-01-24 07:09:00 +00:00
Tejas ShahuandMohammed Shekha a63a953a2d [FIX] web: translation issue fixed
Before this commit:
Editing a translatable field -> clicking on a translation
warning ->
come back through breadcrumb do not preserve translation
warning.

After this commit:
Editing a translatable field -> clicking on a translation
warning ->
come back through breadcrumb preserves translation warning.
Technical note: alertFields is now an object and an attribute
of the form renderer
that stores translation alerts per record. The translation
alerts
created for a given record are maintained unless
they are closed manually or the renderer is destroyed.

Issue-ID: 1877480

Co-authored-by: Mohammed Shekha <msh@openerp.com>

closes odoo/odoo#29377
2019-01-24 11:14:55 +00:00
Christophe Simonis fab415acab [MERGE] forward port branch 11.0 up to 984a99611e 2019-01-23 18:15:18 +01:00
Christophe Simonis 984a99611e [FIX] l10n_be_intrastat_2019: Python3 compatibility
Oversight of previous forward-port
2019-01-23 16:40:41 +01:00
Christophe Simonis 51a76880f2 [MERGE] forward port branch saas-15 up to 3cba1862d4 2019-01-23 16:05:02 +01:00
Christophe Simonis 3cba1862d4 [MERGE] forward port branch saas-14 up to 81c9e28eab 2019-01-23 15:23:00 +01:00
Christophe Simonis 81c9e28eab [MERGE] forward port branch 10.0 up to f3de712d76 2019-01-23 15:21:30 +01:00
Christophe Simonis d870fd555e [MERGE] forward port branch 10.0 up to 90c1af1151 2019-01-23 14:08:50 +01:00
Nicolas Seinlet 3f4d1e1fbe [IMP] mrp,stock_account: faster computation
Use read_group is faster than the python equivalent,
and then don't push ids in ORM cache, which makes
the ORM faster later in the process.
Also unlink in batch.
2019-01-23 10:30:49 +01:00
Waleed Mohsen 4c5de1c37c [CLA] signature for MohsenWaleed
closes odoo/odoo#30441
2019-01-23 08:23:38 +00:00
Nicolas Lempereur 90c1af1151 [FIX] web: no chrome autocompete on many2one widget
For editing many2one fields (and partially many2many) most widget show
an autocompleting list of targeted records.

They thus have `autocomplete="off"` to prevent browser completion.

But chromium has an history of breaking `autocomplete="off"`, see:

- https://caniuse.com/#search=autocomplete
- https://crbug.com/468153
- https://crbug.com/587466
- https://crbug.com/914451
- https://crbug.com/923895

It seems that since chromium 71, the heuristic to ignore
`autocomplete="off"` has become more aggressive and for example if there
is at least 3 fields like an address in a page, chromium will ignore
`autocomplete="off"` for the fields like an address.

So for example the eidting the many2One field with placeholder "Country"
in a contact page now has a browser autocomplete menu that is:

- hidding the many2one autocomplete
- going to save empty country it appeared visually filled if the
  autocomplete result was selected.

With this changeset, the placeholder in the many2one instance is
interspersed with U+FEFF charcters (ZERO WIDTH NO-BREAK SPACE) so the
browser does enable the autocomplete feature by force.

This should thus remove the issue (until it is fixed by chromium) in the
case of field named "Country" or matching other regexes in this file:

https://github.com/chromium/chromium/blob/cdb1b2073f12/components/autofill/core/common/autofill_regex_constants.cc

U+FEFF has been chosen instead of more recommended characters because
other have been shown erroneous for printing in some windows
configuration (see cb2a3afa7).

10.0 version of #30439
opw-1930588
closes #30439
closes #30449
2019-01-23 01:09:22 +00:00
Florent de Labarre d3affc5798 [FIX] sale: don't send duplicate email
closes odoo/odoo#30455
2019-01-23 07:31:50 +00:00
Nicolas Martinelli b95affa3ee [FIX] sale: taxes and untaxed amount
- Create a SO, do not set a partner
- Add a product with a tax

The untaxes amount as well as the taxes remain 0.0.

This is because there is no pricelist, therefore no currency.

There is actually no need of rounding explicitly since these are
monetary fields which will be rounded automatically.

opw-1931796

closes odoo/odoo#30450
2019-01-22 16:34:31 +00:00
Christophe Simonis 4aa153e65c [MERGE] forward port branch 11.0 up to 19558129f0 2019-01-17 20:49:36 +01:00
Christophe Simonis 19558129f0 [MERGE] forward port branch saas-15 up to c0471dd857 2019-01-17 19:07:34 +01:00
Christophe Simonis c0471dd857 [MERGE] forward port branch saas-14 up to 17adccd95c 2019-01-17 18:07:26 +01:00
Christophe Simonis 17adccd95c [MERGE] forward port branch 10.0 up to 50bae1c0c5 2019-01-17 17:08:39 +01:00
Julien (juc) Castiaux 71c4c13996 [FIX] web_editor: save less file
Modifying less files and saving them using the web editor can raise
and error. The error is due to the way odoo save the modified file.

It extends the view containing the URL of the file by filtering views
related to the xml bundle id and keeping those that have the said URL
in their content.

This lookup fails to give just one result in case there are multiple
file containing the said URL. This fix change the filter from a
bare `if url in view.arch` to a correct xpath lookup.

The "/web/static/src/variables.less" less file was one of the
problematic files.

opw-1889794

closes odoo/odoo#30186
2019-01-17 15:19:54 +00:00
Nans Lefebvre ba41c3c1cc [FIX] base: disable prefetching during module uninstall #2
Create any module that inherit 'res.lang'.
Define any new field that is added with that inheritance.
Install that module. Then try to uninstall it. Traceback ensues.

When trying to write 'state': 'uninstalled' on the module,
the prefetching tries to read a column that has been deleted
by the _module_data_uninstall.

opw 1917369

closes odoo/odoo#30176
2019-01-17 15:08:31 +00:00
Nans Lefebvre 5607620623 [FIX] web: make the progress bar handle False as selection value
Fine-tuning of commit 92b4e2e866,
itself a performance fine-tuning of commit b7e2d47596
which added progress bar support for selection fields.
However it assumed that every record had a value in the selection,
whereas False is (nearly) always a possible value.

opw 1916472

closes odoo/odoo#30322
2019-01-17 14:52:25 +00:00
Nans Lefebvre 4ff88dac2e [FIX] mail: allow the followers list to be scrolled
The follower's list has an ancestor (the o_chatter_topbar) that has a 33px size.
Thus it has not been given any max-height, so that it can overflow
that 33px limit.
But it also means that it can overflow the screen, without any scrollbar,
so long lists are unreadable and unusable.

We set the max-height to a reasonable value, allowing for scrollbars.

opw 1922062

closes odoo/odoo#30211
2019-01-18 12:24:23 +00:00
Christophe Simonis 6e5ac01160 [FIX] web: correct forward-port of 187c32c2c7 2019-01-18 15:27:22 +01:00
Christophe Simonis f854e01a98 [MERGE] forward port branch saas-11.3 up to 4aa153e65c 2019-01-18 10:58:41 +01:00
Jorge Pinna Puissant e6b5a0e2eb [FIX] payment: Acquired deployed in production
Before this commit, in the config bar (Sales or Invoicing) when you configure a payment
acquirer,  it was deployed in test mode, and not in production mode. Note that, the config
bar wizard asks for the production credentials.

Now, when you configure a payment acquirer, from the config bar, the acquirer is deployed
directly in production mode.

opw-1918412

closes odoo/odoo#30319
2019-01-17 14:25:25 +00:00
Denis Ledoux 8865d63134 [FIX] res_partner: a partner is portal if he has no employee users
Currently, a partner is considered a portal
if he has no users
or
if at least one of his users is portal.

This causes problems if an employee has two users,
one portal, one employee
and gets notified in a thread (e.g. @ Marc demo):
The email sent won't contain the action buttons (e.g. view opportunity)
because the employee is considered as portal.

A partner of an employee can have multiple users
linked if at some point two partners were merged,
and the partners had each a user, one a portal
and the other an employee.

This revision changes this behavior,
to consider a user as not portal (employee)
if one of its users is not a portal (an employee).

This is uniform with to the behavior of the
`share` field of `res.users`,
which is `True` when the user is part of the group employee.
```
user.share = not user.has_group('base.group_user')
```

opw-1914103

closes odoo/odoo#30314
2019-01-17 13:08:35 +00:00
Nicolas Martinelli 4da161244d [FIX] stock_account: ctx after group by
- Set valuation to FIFO
- Make a PO for a product
- Validate the picking
- Execute the Inventory Valuation report
- Apply group by Category
- Click on the 'Valuation' info button

A traceback occurs because of the usual `group_by` context key which is
kept.

opw-1918915

closes odoo/odoo#30313
2019-01-17 13:00:47 +00:00
Lucas Perais (lpe) 0dd38282c3 [FIX] crm: test lead from email needs second company
Because of a742813c36fc8cdf4e41c72e00944b6901be6017.
Apparently when crm is installed alone, there is only one company

closes odoo/odoo#30312
2019-01-17 12:53:08 +00:00