Commit Graph
123867 Commits
Author SHA1 Message Date
Nicolas Martinelli 033a7fab4d [FIX] account_cancel: In Payment
Allow the cancellation of invoices 'In Payment', since there is no good
reason to not be able to do it.

opw-1981682

closes odoo/odoo#33093

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-02 06:36:40 +00:00
Goffin Simon ff83914752 [FIX] portal: Hide messages when unpublished for portal
Steps to reproduce the bug:
- Create a SO and go to my/account
- Share the SO with a portal user P
- Go to on the website
- Write a message in the chatter and unpublish it
- Log as P and go to the SO

Bug:

The unpublished message was displayed.

Same logic as: https://github.com/odoo/odoo/commit/d79678fdd5faccffff65a439653fa5d639a3d3c4

opw:1969524

closes odoo/odoo#33053

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-05-02 08:24:08 +00:00
Julien Castiaux 81877310bc [FIX] web: ignore field message_attachment_count in debug menu
Open a record with a chatter (ie an opw task), add an attachment, enable
debug mode and click on "Set Defaults" in the debug tools, traceback.

The `message_attachment_count` field is a special view added by the
chatter on the form view. This field exists on the view but is absent on
the list of field listed by the XML file. Setting a default value on
that special field is not supported.

opw-1972372

closes odoo/odoo#33044

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-05-02 07:25:13 +00:00
Pierre Masereel 49fdd155f7 [FIX] website_sale: handle free SO
When a sale order is free, no transaction are created but you are
redirected to the page '/shop/confirmation' that display a transaction
and lead to bad displaying because there are no transaction.

To fix this behaviour, we redirect to the portal view of this sale order.

We've also added the 'href=#' on the button link to have it written in
white.

closes odoo/odoo#33019

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-05-02 09:47:38 +00:00
Graeme Gellatly 8e0610f609 [FIX] account: Correctly Filter Product Taxes in Multicompany Case
Steps to reproduce:
- Create a product as user for Company A.
- Set a tax on it for Company A.
- As a user in company B, set a default tax for the account associated with the product and/or company.
- As a multicompany user of Company A and B, in company B, create an invoice with the product.

When the onchange is triggered - no tax.

https://github.com/odoo/odoo/blob/11c950ef23faefb5b826c7fb6eb0dccb8e345ca0/addons/account/models/account_invoice.py#L1644-L1654

Its because first we evaluate product taxes for all companies, if none then the account, if none again then the company.
Then they are filtered by company, but in reality the only taxes that need filtering are product taxes (as account
taxes and company taxes should already belong)

fixes #27696

opw:1963881

closes odoo/odoo#33013

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-04-29 12:55:45 +00:00
Nicolas Martinelli c9d98ec511 [FIX] payment_authorize: missing fields
- Activate Invoice Online Payment
- Set Authorize to pay through Odoo (S2S)
- Create a new customer (do not give portal access)
- Create invoice -> send to them
- Open invoice in incognito mode
- Try to pay invoice online with Authorize

An error is raised:

The transaction cannot be processed because some contact details are
missing or invalid: City, Country. Please sign in to complete your
profile.If you don't have any account, please ask your salesperson to
update your profile.

The error is quite confusing, and the user is missing the main point: he
needs to sign in.

There is no reason to display the fact that contact details are missing
for a public user, so this part is now shown only if the user is logged
in.

opw-1981003

closes odoo/odoo#33116

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-02 13:23:35 +00:00
Christophe Simonis 4a380414a7 [FIX] mrp: reset lines when quantity change in produce wizard
Error revealed by c6d718f211
2019-05-02 15:36:35 +02:00
Christophe Simonis 1fac2e8c05 [FIX] stock: use correct group xmlid
Oversight of previous forward-port.
2019-05-02 13:37:30 +02:00
Christophe Simonis 3ca58705c9 [MERGE] forward port branch saas-11.3 up to 2c68df0ab4 2019-05-02 13:16:27 +02:00
Christophe Simonis 2c68df0ab4 [MERGE] forward port branch 11.0 up to 82c901c937 2019-05-02 10:59:21 +02:00
Christophe Simonis 82c901c937 [MERGE] forward port branch saas-15 up to d5a1ad566b 2019-05-02 09:39:20 +02:00
Christophe Simonis d5a1ad566b [MERGE] forward port branch saas-14 up to 5728e39181 2019-05-02 09:31:13 +02:00
Christophe Simonis 5728e39181 [MERGE] forward port branch 10.0 up to 903fec011d 2019-05-02 08:48:46 +02:00
Nicolas Martinelli 848a1b970b [FIX] account: multi-click in reconciliation
- Open the bank reconciliation widget
- Throttle the connection
- Click multiple times on the same move line in order to select it

The line is added multiple times to the statement line.

We mitigate the behavior thanks to a `debounce`.

Fixes #33000
opw-1978551

closes odoo/odoo#33020

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-02 06:22:22 +00:00
Swapnesh Shah 8fdfd4a77c [FIX] project: Fill date_last_stage_update when needed
Before this commit, the date_last_stage_update field in fill everytime at task creation. This does not make sense if ther is no project linked to the task or if there is no stages associated to the project/task.

This commit populates the date_last_stage_update field only when needed. So, we can now have newly created task without date_last_stage_update filled.

closes odoo/odoo#31999

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-05-01 19:07:50 +00:00
Cas Vissers 3f8a5e466d [FIX] sale_timesheet: extract the check on write in a function
On write, a check is done that raises
'You can not modify already invoiced timesheets …'.
We put that check in a function so that this behaviour can be extended.
(restricted by an override, or relaxed by not calling the super)

opw 1974968
closes #33057

closes odoo/odoo#33092

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-05-02 06:13:00 +00:00
Odoo Translation Bot 903fec011d [I18N] Update translation terms from Transifex 2019-05-01 02:43:48 +02:00
Goffin Simon 2efcefb504 [FIX] l10n_ch: Error when saving a email template
Steps to reproduce the bug:
- Configured bank account for CHF with all the ISR related informations
- Click on "Send & Print" on a customer invoice with that bank account
- Save the email template

Bug:

An error was raised because the key 'attachments' didn't exist in the variable
rslt.

opw:1970005

closes odoo/odoo#33042

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-04-30 09:27:13 +00:00
Julien Castiaux 27e4d3bb1c [FIX] models.py: invalid write order in inherits
Create a model and extend this model using an inherits. Define a
constraint in the inherited model that uses a field of the parent model.
Create a valid element using the inherited model then write an invalid
value. This pass the constraint although it should raise an exception.

The problem resides in the `write` function of `models.py`. It first
write values on the inherited model then write values on the parent
model. The order is wrong, it should write on the parent model first
then on the child model.

The solution is to change the order fields are written: first we update
child references to their parents, then we update the parents, then we
update the child.

opw-1962705

closes #32919

closes odoo/odoo#33003

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-30 14:34:19 +00:00
qsm-odoo eb5e8d660a [FIX] web_editor: allow d&d of blocks between flex elements
When dragging a snippet in the editor, drop zones are created at the
correct locations (e.g. between columns when dragging a column). Some
code is in charge of "cleaning" the created drop zones to, for example,
remove multiples ones which are at the same position. This code is also
currently removing the drop zones which are between two "non-block"
elements. This is preventing to swap form rows thanks to the form
builder as rows are "non-block" elements as they are flex elements.

This commit solves the problem by changing the "is non-block" condition
to "is inline" condition which is what was intended.

Note 1: rows became flex elements with BS4, that is why this is fixed
        in 12.0.

Note 2: this could be back-ported in previous stable versions as this
        actually preventing to drop snippets between tables, list
        items, etc (all non-block elements) but this can be considered
        as a limitation unless a real breaking case presents itself.

See task-1874350 which discovered the bug.

closes odoo/odoo#33054

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-04-30 13:07:16 +00:00
Jorge Pinna Puissant 622af0b7cc [FIX] account: remove total from invoice lists
In the tree view for account.invoice, there are totals' in some columns.
There is no logic in adding the invoices values for these columns, the
invoices could be of different types, or the invoices could have
different currencies, which creates incoherents totals.

opw-1964348

closes odoo/odoo#33051

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-30 12:02:12 +00:00
Xavier Morel 2fc7657975 [FIX] core: reintroduce computation of parent_store in auto_init
When 80f1ac3599 removed deferral of
parent store computations (the MPTT at the time), it also errornously
removed the computation during auto_init.

As a result, when adding a `_parent_store = True` and `parent_path`
field to an existing model (e.g. in an override, or when updating the
database) the column will be created but the column will be
False-filled, and hierarchical queries break as odoo will attempt to
perform string operations on `False` (either `False + '%'` or
`False.split('/')`).

Fix the issue by reintroducing the parent_store computation.

Note: uses the same gating as the old commit, the computation is only
performed if this is the install/update where the parent_path column
gets created.

We could alternatively gate on just _parent_store, but even the RCTE
can be expensive when executed on millions of records (at least when
it has to set all the parent_path) and while it could allow inserting
a bunch of records when calling -u to generate their parent_paths, it
feels like the caller could and would do so manually as they might
have shuffled the tree and need to update more than just the records
for which parent_path is null.

closes odoo/odoo#33034

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-04-30 07:39:20 +00:00
Nicolas Martinelli d7d4ebb312 [FIX] sale: read-only order_id
Setting the `order_id` as read-only in the model prevents the import of
SO lines separately from the SO. We set it read-only in the view
instead.

opw-1978453

closes odoo/odoo#33021

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-29 15:25:26 +00:00
Goffin Simon bb38b83193 [FIX] sale_timesheet: Project(s) overview wrong with downpayment
Steps to reproduce the bug:
- Install Timesheet, Sales, Accounting
- Create a product P that creates a project when validated on a SO
- Create a SO with P and validate it
- Create an invoice with a downpayment of 10% and validate it
- On the SO, click on "Project(s) overview" smart button

Bug:

The invoiced amount  on the overview was not updated with the downpayment invoiced.
When the SO was completely invoiced, the amount of the downpayment was counted in
"Other cost" (because an analityc line is created for the downpayment SO line)

opw:1969143

closes odoo/odoo#32962

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-04-30 07:42:11 +00:00
qsm-odoo 695cb942b6 [FIX] website_sale: fix product description on mobile with list layout
Long product descriptions were overflowing on mobile when the list
layout was used. Indeed in all other cases (non mobile or grid layout),
a max-height is set to prevent this problem. This commit sets a
max-height for the mobile list layout use case.

Note: the layout is still to be reviewed to handle these cases the right
way. A task is actually being developed in master to do that.

opw-1974989

closes odoo/odoo#33023

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-04-29 16:07:28 +00:00
qsm-odoo 84bb01606a [FIX] website_blog: restore latest posts snippet's styles
When the snippet was moved from the theme repository to the community
repository, some scss mixins were badly refactored, making the theme
specific styles not work anymore.

This commit removes the bg color which was added to latest posts
snippet's post elements as it made no sense, appeared broken and was
not possible to remove. It also adds some padding to the snippet by
default.

This commit also reviews the snippet options which seemed to allow post
color edition while it is in fact not possible.

opw-1964485

closes odoo/odoo#33016

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-04-29 15:31:20 +00:00
Kishan Gajjar f670d4103b [FIX] website: adapt Facebook snippet to API changes
Facebook API does not accept float values for height and width
parameters anymore.

closes odoo/odoo#32970

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-04-29 10:15:05 +00:00
Lucas Perais (lpe) c7773f9f72 [FIX] sale, _management: portal sale order optional products
Forward Port 0c46c8a929 from v10.0
has dome flows, namely, the new feature of grouping the taxes by tax group was not supported

Now it is supported: when modifying an optional product's quantity, every field is updated with the new values

OPW 1974708

closes odoo/odoo#32980

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-29 07:46:39 +00:00
Julien Castiaux 9c4b52000f [FIX] calendar: browse record using IrRules
Install CRM (we need the "Hide Private Message" record rule defined by
that module), create a meeting as of today, set a reminder of one day,
invite another user (Demo) as attendee, save. Edit, go to the options,
change the "Show time as" to "free", save => access error due to the
said record rule.

Using a search instead of browse ensures record unavailable due to a
record rule are filtered.

Same as 54e970e

opw-1974599

closes odoo/odoo#32987

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-04-29 07:01:19 +00:00
Christophe Monniez a21db63375 [FIX] packaging: remove jinja2 from py2exe explicit include
Following the fix in 4c35983d0, it appears that the excludes and
packages options are conflicting. py2exe seems smart enough to include
jinja2 package without the explicit include via the 'package' options.

closes odoo/odoo#32991

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-04-26 15:53:53 +00:00
Xavier Morel 8371f08202 [FIX] website_hr_recruitment: don't prefetch website_description
Prefetching it triggers its translation, which quickly becomes most of
the overhead of /jobs despite the field not being displayed on that
page: an empty /jobs takes ~150ms, a /jobs with 99 jobs takes ~2000ms,
>70% of which are spent in html_translate and ultimately
translate.py:process (14600 calls, 60% of runtime, 40% own).

Removing prefetching lowers the runtime to ~700ms.

closes odoo/odoo#32985

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-04-26 12:16:24 +00:00
Nicolas Martinelli e3b25b402c [FIX] sale: date on portal
It is more logical to display the order date on the portal rather than
the create date. Indeed, all computations (e.g. currency conversion) are
performed with the order date, not the create date.

opw-1966040

closes odoo/odoo#32973

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-26 08:40:51 +00:00
Odoo Translation Bot 3ac23bef79 [I18N] Update translation terms from Transifex 2019-04-28 01:34:21 +02:00
Lucas Perais (lpe) c6f1921beb [FIX] account_asset: asset report shows only non archived assets
Make a PO then an invoice with a product that will create an asset
cancel the invoice
Open the Assets Analysis report

Before this commit, the asset lines corresponding to the invoice
are shown

After this commit, they are not shown (only non archived assets are by default)

OPW 1974344

closes odoo/odoo#32955

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-25 14:15:50 +00:00
Christophe Monniez 4c35983d08 [FIX] packaging: avoid jinja2 asyncsupport in py2exe
Since 78ba90d5, when building the windows package, py2exe fails to
compiles jinja2 asyncsupport module. Even tough jinja detects the
environement, py2exe tries to compile the async part. The problem comes
from the fact that async keyword was introduced in python 3 and we use
py2exe with python 2.7.

With this commit the async part of jinja is execluded from py2exe.

closes odoo/odoo#32913

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-04-25 08:46:50 +00:00
Lucas Perais (lpe) 7f6309c60c [FIX] account_check_printing: print checks action defaults
Because of c56b746221
server action "state" (what it should execute) defaults to
Update a record

This commit corrects the check printing action accordingly

OPW 1972938

closes #32928
2019-04-25 09:34:14 +02:00
Olivier Colson b1530265e4 [FIX] purchase: anglosaxon accounting: fix wrong computation of prod qty when multiple stock move
Have a PO with a product in automated valorization, and average as method of valorization
Validate and receive *partially* (create backorder)
invoice with a different price than the PO
Receive the backorder
Invoice the rest, also with a different price than the PO

Before this commit, wrong amounts were written in the account.move corresponding to the invoice.
In particular, the payable account's amount was erroneous because it is computed to balance the move
As a result, the bill showed an amount due different from its total, even though nothing was reconciled with it.

After this commit, the payable entry and hence the amount due on the invoice are correct

OPW 1967289

closes odoo/odoo#32920

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-24 13:17:22 +00:00
Denis Ledoux 6fd637e131 [MERGE] forward port branch 11.0 up to b71b78035b 2019-04-24 14:31:10 +02:00
Damien Bouvy 90af6254ba [FIX] mrp_byproduct: missing oldname
Impacts migrations

closes odoo/odoo#32900

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-04-24 08:53:29 +00:00
Denis Ledoux b71b78035b [MERGE] forward port branch saas-15 up to 0c46c8a929 2019-04-24 10:04:05 +02:00
Denis Ledoux 0c46c8a929 [MERGE] forward port branch saas-14 up to 6fd092e131 2019-04-24 09:31:49 +02:00
Denis Ledoux 6fd092e131 [MERGE] forward port branch 10.0 up to 4730a884b4 2019-04-23 17:16:26 +02:00
Martin Trigaux c9913152ec [FIX] base: use correct iso code for Filipino
Instead of fil - fil_PH, it should have been fil_PH - fil.

The iso_code is used in URLs

The "code" value can not be changed in stable but iso-code can.
The code value will be changed in master as requires a migration script

closes odoo/odoo#32867

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-23 09:46:24 +00:00
Nans Lefebvre b7f4ff4b54 [FIX] hr_expense: fix payment entry of expenses paid by company
Create an expense paid directly by the company, validate and post entries.
While the account move lines are correct, the payment is not: it is always null.

opw 1962500

closes odoo/odoo#32956

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-25 13:45:47 +00:00
Lucas Perais (lpe) 61f82c077d [FIX] stock: traceability report: direct children displayed
Configure a route to be in 3 steps
make a PO, validate all three pickings
Go on the final picking, the one that has the destination to the Stock
Click on the smart button to access the traceability report
unfold as many lines as you can

Before this commit, the first picking of the whole tree (Vendors to Input)
appeared as a direct child of the final picking,
as well as a child of the intermediary picking (as it should)

- Quality > Stock
	|
	- Input > Quality
	|	|
	|	-Vendors > Input
	- Vendors > Input

After this commit, the final picking contains only the intermediary
which in turn contains only the origin

- Quality > Stock
        |
        - Input > Quality
                |
                -Vendors > Input

OPW 1970286

closes odoo/odoo#32953

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-25 12:30:43 +00:00
Denis Ledoux 7228c10884 [MERGE] forward port branch saas-11.3 up to 6fd637e131 2019-04-25 15:47:09 +02:00
Jorge Pinna Puissant 101a28b8dc [FIX] sale: allow multi-record capacity to action_done
Fine-tuning : 6b7bb096e1

closes #32944

closes odoo/odoo#32947

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-25 09:44:36 +00:00
Nicolas Martinelli 9378552a89 [FIX] stock: print Traceability Report
The Traceability Report printing option is hidden since the report is
pretty much unusable.

opw-1973161

closes odoo/odoo#32939

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-25 08:09:28 +00:00
82c13975f1 [IMP] website_sale_comparison: add test tours
Pretty much the whole module is covered by the tests in this commit:
- standard comparison, from shop, from product page
- comparison with more complicated product configuration
- the comparison page itself
- the alternative products

task-1929151

closes odoo/odoo#32901

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>


Co-authored-by: Priyanka Kakadiya <pka@odoo.com>
Co-authored-by: Mohammed Shekha <msh@openerp.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
2019-04-24 14:54:35 +00:00
Goffin Simon 1da058f8ed [FIX] stock: Error when re-installing manufacturing application
Steps to reproduce the bug:
- Install MRP
- Uninstall MRP
- Install MRP

Bug:
An error was raised by sql constraint 'barcode_company_uniq' which ensures that
a barcode for a location is unique per company.
But when uninstalling MRP, some locations such as pbm_loc_id or sam_loc_id are set to
active = False and when re-installing MRP, the function _create_missing_locations tried
to re-create these locations and the sql constraint was raised.

opw:1967534

closes odoo/odoo#32882

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-04-23 13:37:18 +00:00