Commit Graph
136840 Commits
Author SHA1 Message Date
Raphael Collet ee46de8b14 [FIX] test_new_api: make test work in post-install
closes odoo/odoo#54004

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-07-02 13:17:25 +00:00
Nicolas Martinelli 1c3e8d4077 [FIX] point_of_sale: do not block if no COA
In case the COA is imported in the system, the `chart_template_id` of
the company remains empty while the accounting is usable. However, in
this case it's impossible to open a POS session.

We leave the warning in the POS config but avoid blocking the user.

opw-2286640

closes odoo/odoo#53999

X-original-commit: c73b241c5e8c269e1ebc4f517cc270d90b2e44ca
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-02 14:18:11 +00:00
Nicolas Martinelli 59ea838ecf [FIX] sale: long product description
- Create a product with a very long product description
- Add in a SO and print the quotation

The description overlaps with the table header on the second page.

This is a known issue of wkhtmltopdf (see issues 1770 and 1524 for
example), and there is no known workaround. It can be avoided by
preventing the repetition of the header.

closes odoo/odoo#53990

X-original-commit: f54c73f9a42476e1f0d2de1904644f317ee1dffb
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-02 13:34:14 +00:00
Andrea Grazioso (agr-odoo) a100c4c336 [FIX] l10n_cl: Correct document type domain
Create an invoice, fill document type
"(61) Nota de Crédito Electrònica". Save.
Action will be blocked by a warning: document type is invalid.

Some options in the document type should not be shown as they can not be
used in the customer invoices and customer credit note.

opw-2286623

closes odoo/odoo#53987

X-original-commit: 3b9738a394c4944b0c859f68f561e50d14b92942
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-02 13:03:08 +00:00
Antoine Prieels 2761a2a127 [FIX] hw_drivers: Error on distant_display refresh
Trying to call display_refresh or update_url when no screen was
connected to the IoT Box and the default distant_display was created
resulted in an error.

closes odoo/odoo#53975

X-original-commit: 77768b93bc64d47abdbd4abd48c386acb293815e
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-07-02 11:52:36 +00:00
Laurent Smet 2cb73e920b [FIX] account_check_printing: Fix traceback when printing check
'payment_state'='sent' has been replaced by the 'is_move_sent' field.

closes odoo/odoo#53964

X-original-commit: 948be4230650858a9fc08ae22e32ff82bfadfd3e
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-07-02 10:11:45 +00:00
lejeune quentin b9fad2c315 [FIX] point_of_sale: Change build version of IoT Box
Update the version for the new build of IoT Box

closes odoo/odoo#53957

X-original-commit: b75e961c383cfa211508d5e53b6a5a544259719a
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-07-02 09:04:38 +00:00
oco-odoo f45131b995 [FIX] l10n_ch: fix tests
closes odoo/odoo#53809

X-original-commit: 157ffe55acd077d7c62007e35c1b145411734a2c
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-06-29 13:30:19 +00:00
Laurent Smet 350e0ff6e6 [FIX] account: Allow to unreconcile with 'Billing' access rights.
- Make sure to have 'Billing' access rights
- Create an invoice
- Fully paid this invoice
- Try to unreconcile the newly created payment
=> You should have the access rights to do that

closes odoo/odoo#53785

X-original-commit: 5b2f9bac2a430b77637c28f4ee54ae66789ea116
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-06-29 08:50:20 +00:00
Antoine Prieels 17e198db3a [FIX] hw_drivers: Synchronize time before starting Odoo
Some features need the time to be synchronized before starting:
- A certificate might be considered valid and therefore not renewed if
the time is not synced.
- If the time is not correct when the pairing code is retrieved, it
will disappear as soon as the time is synced because more than 5
minutes will have "passed" since the code was retrieved.

We then make sure that the time is synced, or that the box is not
connected to the internet (because in this case the time will never be
synced and those features cannot work with a connection anyway).

closes odoo/odoo#53953

X-original-commit: b9b02dba67cd0a91b8c49a5f57fb2f7eb4bdd690
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-07-02 08:21:47 +00:00
svs-odoo a86e90af53 [FIX] purchase: readonly on PO line state
As the `purchase.order.line` `state` field is invisible but editable in
the RFQ form, when the user will create a new line, this new line's
state will be save with an empty value instead of taking the RFQ state.

closes odoo/odoo#53952

X-original-commit: bd2172e2a0f2b1e0e4de48f25381677f5ac24820
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-07-02 08:21:23 +00:00
jev 19a504b627 [FIX] product: deterministic seller selection
Before this fix, the search on the supplierinfo had
an undeterministic result.

When testing odoo/addons/purchase_stock/tests/test_reordering_rule.py:66
`def test_procure_not_default_partner`, it may fail at line 120.
It sets 2 suppliers:
- Firstly, the `default_vendor` (let's assume id=120)
- Then, the `secondary_vendor` (let's assume id=121)

It then runs a procurement without setting the supplier and assert
that the partner of the resulting PO line should be `default_vendor`.

The return of
odoo/addons/product/models/product.py:574
`def _prepare_sellers` depends on Postgres when the supplierinfo
sequence, min_qty and price are the same for multiple records.

By adding the `id` to the `.sorted`, the result will order correctly in that
case.

opws-2272627
    -2282081
    -2287079
And PS-BE via CSC reported more cases without opw.

closes odoo/odoo#53951

X-original-commit: a733feb8e022084148685599840fe542ee9dafd1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-02 08:11:07 +00:00
Jorge Pinna Puissant 4b8d716188 [FIX] website_sale: avoid archiving loyalty program products
A product can't be archived if it's used in a pos loyalty program.

opw-2276745

closes odoo/odoo#53948

X-original-commit: 3af9b65638a9725fbeb6597b77328d8f6be5b2ec
Related: odoo/enterprise#11590
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-07-02 07:52:21 +00:00
Benjamin Vray df50a215f4 [FIX] website: fix preview of header vs table of content navbar in edit
Part of #52708
task-2269822

closes odoo/odoo#53932

X-original-commit: b7800eea785c6aa945947de12fffd83ef35e7a61
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-02 07:47:45 +00:00
Benjamin Vray 745db8c69e [FIX] website: adapt table of content snippet to new color system
Part of #52708
task-2269822

X-original-commit: 6e23649970110f6c08bd8654bc6d1f588579017c
2020-07-02 07:47:41 +00:00
Laurent Smet b30b26de6b [FIX] purchase: Fix "ProgrammingError: can't adapt type 'res.company'"
An id should be passed instead of a record.

closes odoo/odoo#53859

X-original-commit: 061fbd2c1b790d4e87e1f099eb36ab1313fc8ae5
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-06-30 10:36:04 +00:00
Victor Feyens 07e4b9e02e [IMP] base: better translation of view validation messages
* Use of new _ signature (and placeholders)
* Ensure all error messages are translated
* No translation for warning logs
* Improved/fixed validation messages

closes odoo/odoo#53804

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-07-02 09:14:33 +00:00
Jorge Pinna Puissant efe51fa56a [FIX] account: negative credit note product qty in invoice report
- Create an invoice with a Product X and Post it;
- Generate a Credit Note from the invoice;
- Reporting > Invoices;
- use Pivot Table View;
- Enable 'Product Quantity' in Measures;
- Filter by 'Invoice #';
- Expand Pivot Table by 'Product'.

Before this commit, the products in the credit note had a positive sign,
contrary to the untax total that has a negative sign. The issue with
this, is when the quantities of the credit notes is added with the
quantities of the invoices the total is not coherent with the actual
sell products.

Now, the product quantity that comes from a credit note has a negative
sign. This was already the behaviour in version 11 and 12.

opw-2283833

closes odoo/odoo#53931

X-original-commit: 917b2076b77ba3f682b342989c41b7f7d0670ca2
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-07-01 17:24:19 +00:00
Simon Lejeune 058698e104 [FIX] stock: move line: write
Write is overridden on reserved move lines to make sure the quants are
correctly updated. It is divided in two parts: if you update the reserved
quantity and if you update a characteristic. If somehow both are updated
in the same call (which doesn't happen in the standard interface), then
the quants are unreserved two times, which is wrong.

This issue showcased by [0] and on databases where the reserved
quantities are made editable by customization.

We grouped the two update in one, such as the TODO indicated us since a
long, long time.
We removed `result_packaged_id` from the trigger because it should not
impact the reservation whatsoever.
We needed to remove a tricky logic in the stock move's backordering part
but it was fishy anyway.

[0] eac8c06e2233

closes odoo/odoo#53928

X-original-commit: 507101434f9221f2cfa6de66e1952676fff322fd
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-07-01 16:09:31 +00:00
qdp-odoo 476028c14a [IMP] account, usability: added group_id in the account tree view
as per requested on #52948

closes odoo/odoo#53941

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-07-02 07:00:04 +00:00
Samuel Degueldre 2387699233 [FIX] website_mass_mailing: fix input disappearing when duplicating
Previously, duplicating a block inside of the newsletter popup would
cause the subscribe input and button to disappear. Actually, it
disappears when you use most options of the left panel, because
selecting an option refreshes the public widgets, which destroys them
and starts them again, but for some reason, the subscribe widget's
destroy method makes it d-none, but only removes that class if the
subscribe input is not inside of a modal.

This commit fixes that by not using d-none on the subscribe input group
at all. We keep the d-none removals for databases which may have the
button saved in a disabled state.

task-2244780

closes odoo/odoo#53927

X-original-commit: 5562e7dbf5205c9b3ea0ef2d5283f3ccc5fbc30e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-01 16:09:07 +00:00
Julien Mougenot 9a1e1e6c3b [IMP] doc: added doc for static templates inheritance
closes odoo/odoo#53923

X-original-commit: b22e71097c0382f5153825792c5283380f22a821
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-07-01 15:39:26 +00:00
Mathieu Duckerts-Antoine 913b926b7b [REF] doc: remove link to js API
The page with the documentation on all js docstrings is regularly
broken. We remove here the link referencing it.

closes odoo/odoo#53911

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-07-01 14:43:30 +00:00
Odoo's Mergebot 429765a3c3 [IMP] *: Uniformize barcode screens UI on mobile
The main goal of this task is to apply the same style used by
event_barcode.
A new button "tap to scan" is now available in some barcode
screens to use the phone camera.

Task ID: 2210396

closes odoo/odoo#50118

Related: odoo/enterprise#9616
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-07-01 13:49:53 +02:00
Romain Estievenart bd09d2acfb [IMP] hr_attendance, barcodes: extract barcode.png to barcodes
It's now possible to use this image in all modules that depend on
barcodes.

Task ID: 2210396
2020-07-01 09:28:45 +00:00
Romain Estievenart ccc243823e [IMP] pos_hr: uniformize barcode screen UI
The main goal of this commit is to apply the same style used by
event_barcode

Task ID: 2210396
2020-07-01 09:28:39 +00:00
Romain Estievenart 80bdbfda62 [IMP] hr_attendance: uniformize barcode screen UI
The main goal of this commit is to apply the same style used by
event_barcode.

Task ID: 2210396
2020-07-01 09:28:37 +00:00
Xavier Morel 3e39dcba52 [REM] sale_crm: long-dead code
odoo/odoo#42015 removed code supporting the sales/CRM dashboards which
hadn't been a thing for two years at that point.

This is doubly dead code as it's an override for the dead code which
has already been removed for a feature which hasn't existed since
2017.

Issue 2285940

closes odoo/odoo#53891

X-original-commit: 1d73a1a7c52fcc3a3ab29446b9ca3b6e4d95b451
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-07-01 07:02:59 +00:00
Goffin Simon 7fd7422647 [FIX] hr_attendance: All internal can modifiy hr.attendance
Steps to reproduce:

- Let's consider a user U with no access to hr.attendance
- Let's consider that U has made some check in and check out
- Log with U
- Go to your profile and on Last month

Bug:

U can modifiy manually his attendances.

opw:2279682

closes odoo/odoo#53878

X-original-commit: 53a4a95270622f3aa08136470fb627d51ed4b365
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-06-30 14:24:35 +00:00
Anh Thao Pham (pta) 359202aa18 [FIX] point_of_sale: fix closing with multiple taxes and fiscal position
- Install Accounting, Point of Sale
- Go to Accounting > Configuration > Taxes
- Create 2 taxes (e.g. Tax 15% and Tax 21%)
- Go to Accounting > Configuration > Fiscal Positions
- Create a new Fiscal Postion with the following line for Tax Mapping:
  * Tax on Product: Tax 21%
  * Tax to Apply: Tax 15%
- Go to Point of Sale > Products > Products
- Create a new Product (e.g. Test Product) with "Tax 15%" and "Tax 21%" in Customer Taxes
(Make sure that the Tax 15% is the same than the one for the "Tax to Apply" in the Fiscal Position)
- Go to Point of Sale and configure a POS:
  * Activate "Fiscal Position per Order" and choose the created Fiscal Position
  * Add Bank as Payment Method
- Start a POS session
- Search "Test Product" and add it
- Click on Tax button and select the created Fiscal Position
- Proceed to payment
- Choose Bank and validate
- Exit the POS session
- Click on "CLOSE" and "VALIDATE CLOSING & POST ENTRIES"
An error message appeared with the following message: "Cannot create unbalanced journal entry"

When closing and posting entries, an account move and account move lines are created from the session orders.
For each order lines, taxes are computed from taxes on product and fiscal position of the order.
In this case, the product has 2 taxes applied (Tax 15% and Tax 21%).
Due to the chosen Fiscal Position, the Tax 15% is applied instead of Tax 21%.
For the order line, Tax 15% is applied 2 times.
But during the account move lines generation, the original Tax 15% and the converted Tax 15% are merged together,
because they represent the same tax (same model id).
So the Tax 15% is only applied once, which results on unbalanced amounts during reconciliation.

In Sales, for the same case, the tax is only applied once.
To stay consistent with Sales behavior, the tax will also be applied once in Point of Sale.

opw-2278826

closes odoo/odoo#53880

X-original-commit: 17a9feff69ec772bf3427dda886ae122fd6c7c2c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-30 14:48:05 +00:00
Benjamin Vray 0f2cab4aeb [IMP] website: add a z-index on the header for shadow option
We need a z-index on the header to make the shadow option work properly
We also needed to increase the z-index of the popup snippet so that it
goes above the header when it is displayed.

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

closes odoo/odoo#49142

Related: odoo/design-themes#238
Related: odoo/upgrade#1432
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-30 14:19:17 +00:00
Benjamin Vrayandqsm-odoo 58179cebf1 [IMP] web, *: replace the bootstrap backdrop element with a bg on modals
*: web_editor

Do not display the backdrop element added by bootstrap in the body and
add a background on the modal to keep the same effect. The bootstrap
backdrop was probably useful for compatibility with <IE9 but is no
longer needed. This also avoids z-index issues because modals could be
opened in an element (e.g. the website #wrapwrap) whose stacking context
is different of the body one (where the backdrop is opened). This would
make the backdrop appears on top of the modal.

Part of https://github.com/odoo/odoo/pull/49142
Related to task-2229551

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-30 14:19:17 +00:00
qsm-odoo 4341a4d795 [IMP] web: better test modal backdrop behaviors
Part of https://github.com/odoo/odoo/pull/49142
task-2229551
2020-06-30 14:19:17 +00:00
Benjamin Vray 257de793ca [IMP] website_sale: add an option to always show cart
Before this commit the cart was hidden when it was empty. Now we have
added a new option to display it any time.

Part of https://github.com/odoo/odoo/pull/49142
task-2229551
2020-06-30 14:19:17 +00:00
Benjamin Vrayandqsm-odoo 82cc411fc5 [IMP] website: review the labels of header/footer options
Note: the reordering will be done in upcoming days.

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-30 14:19:17 +00:00
Benjamin Vray 79ce38fc3f [IMP] website, *: add the possibility to hide the copyright section
*: web

Part of https://github.com/odoo/odoo/pull/49142
task-2229551
2020-06-30 14:19:17 +00:00
Benjamin Vray 94835eb779 [IMP] website: add the possibility to add a header main button
Part of https://github.com/odoo/odoo/pull/49142
task-2229551
2020-06-30 14:19:16 +00:00
Benjamin Vrayandqsm-odoo b43546c091 [IMP] website, *: add the possibility to hide the footer, per page
*: web

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-30 14:19:16 +00:00
Benjamin Vrayandqsm-odoo db951aafbe [IMP] website, *: add the possibility to hide the header
*: web_editor

General website option + page option

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-30 14:19:16 +00:00
Benjamin Vray 7827da3e7a [IMP] website: add the possibility to hide the logo
Part of https://github.com/odoo/odoo/pull/49142
task-2229551
2020-06-30 14:19:16 +00:00
Benjamin Vray 904fea38a2 [IMP] website, *: add minor improvements on header / footer design
*: web

+ Ease edition

Part of https://github.com/odoo/odoo/pull/49142
task-2229551
2020-06-30 14:19:16 +00:00
Benjamin Vrayandqsm-odoo 5879e40445 [IMP] website, *: add new footer effect options
*: web

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-30 14:19:16 +00:00
Martin Trigaux 400cc4f14e [FIX] *: correct all or improve code translation lookup
This commit fixes all issues detected by the new pylint
gettext-variable test.
It converts some calls to the new syntax
  _("Foo %s", bar)

to progressively migrate the code to the new syntax.

A few calls were not technically incorrect but still detected by the
linter.

  _("Foo" +
    "Bar")

has been converted to

  _("Foo"
    "Bar")

as it has the same effect and make sure the argument is of type
asteroid.Const instead of BinOp).

closes odoo/odoo#53683

Related: odoo/enterprise#11467
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-06-30 10:19:59 +00:00
Martin Trigaux 241f06d868 [ADD] test_lint: add test to detect bad usages of _
More often than it should, translations calls are made using
  _("Foo %s" % bar)

instead of
  _("Foo %s") % bar

or the even better (but more recent)
  _("Foo %s", bar)

The issue of using the first writing is that the translation lookup
won't work at the execution (looking for ir.translation for src "Foo
Alice", "Foo Bob",... instead of "Foo %s").

Add a pylint test to ensure this won't happen anymore
2020-06-30 10:19:59 +00:00
Martin Trigaux 110263df56 [IMP] tools: use same syntax for _lt than _
A new gettext syntax was added at odoo/odoo#52155 but only for _, not
for _lt
Allow to have the same syntax
2020-06-30 10:19:50 +00:00
Martin Trigaux d12813f7ee [IMP] tools: fallback on empty translation
Avoid returning False if, for any reason, the return is falsy (False,
None,...)

Following the discussion in odoo/odoo#53254, the root cause was a call in the form
  _(foo)

where foo was equal False

While nothing else than a string should be the argument of _, it's
still technically possible to pass something else and get a bad return
value.
Fallback on empty string to be consistent.
2020-06-30 08:53:29 +00:00
Didier (did) 8add388db6 [IMP] Full Story Misc Usability improvements
Hide sections "Account Properties" & "Account Stock Properties" if the inventory
valuation (property_valuation) is set to manual.

task-2232026

closes odoo/odoo#52351

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-29 11:21:26 +00:00
Sébastien Geelen (sge) 6d93c72564 [IMP] base : improve messages text in access_error pop-ups
* Improve layout of access error messages from group restriction
 * Improve layout of access error messages from security records rules
 * Use the error title in the js crash manager when possible
 * adapt unit tests

closes odoo/odoo#50369

Taskid: 2206787
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-30 13:59:23 +00:00
Vishnu Thuletiya d24758db56 [IMP] sale: Change the label in SO mail while transaction is pending
Currently, when the payment is done by the wire transfer or by sepa
then the transaction is going to be in the 'pending' state and due
to that confirmation mail will display the button as
'Sign and Pay Quotation' but is should be the 'view quotation'.

So in this commit we check for the last transaction and if transaction
status is 'pending' then display the 'View Quatation' instead of
'Sign and Pay Quatation'.

We have not modified method has_to_be_paid because it's used to display
the button on portal so still it will display the 'Sign and Pay' on portal.

closes odoo/odoo#49389

Taskid: 2210990
Closes: #49389
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-15 08:46:04 +00:00
Andrea Grazioso (agr-odoo) 4ca452aacf [FIX] mrp: fix BoM Structure & Cost Report print
Create some attributes with "create dynamically" set
Create a product template using these attributes (=> product variants
should not be created)
Set this product as manufactured, and create an associated BOM with some
components
Try to print the BOM

User will face a traceback due to the product_id being non existant

opw-2283649

closes odoo/odoo#53872

X-original-commit: 4d77ada68fb4d8113a5fbf95f20ccb49d0611fc5
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-30 12:51:08 +00:00