Commit Graph
127534 Commits
Author SHA1 Message Date
Arnold Moyaux 5f7648bb9a [FIX] mrp: failing test multi mrp step
It's due to MRP refactoring that confirm raw moves before finished
moves. It implies that in _assign picking, SFP with final product
will search a picking but the stock.move do not have a created_production_id
and it will be merged inside the intermediate SFP (it works before
because it was the intermediate SFP that was merged in the finished SFP).

_key_assign_picking is also added if multiple moves are confirmed w/
and w/h created_production_id, we won't merge them in the same picking.

closes odoo/odoo#36335

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-02 13:00:00 +00:00
Christophe Simonis 641358892f [FIX] mail: adapt mobile test to new version
Oversight of previous forward-port.
2019-09-02 13:36:19 +02:00
Christophe Simonis 545e6d2034 [MERGE] forward port branch 12.0 up to 52f6e38cea 2019-08-30 17:20:28 +02:00
Julien Castiaux 513545cdbd [FIX] sale_coupon: use partner lang in description
Fine tuning of odoo/enterprise@f433384, not only the promotion must be translated

opw-2034094

X-port/Cherry-pick of odoo/enterprise@6dd77cc049
2019-08-30 17:18:06 +02:00
Olivier Colson 978af5c87e [FIX] account: lines onchange on account.move: remove the base tag when removing a tax from a move line
Before that, when removing a tax previously set on an account.move.line in tax_ids, the onchange event did not remove the corresponding tags from the base line, causing possible errors in tax report.

closes odoo/odoo#36283

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-30 12:51:16 +00:00
Christophe Simonis 52f6e38cea [FIX] account: change back reconciliation test
Reconciliation credit is expressed in company currency
since odoo/odoo@7b636f3342.

See odoo/odoo#36181 for more context about the issue.

closes odoo/odoo#36260

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-30 08:34:03 +00:00
Hardik Prajapati 8d7d2aeef3 [IMP] l10n_ch: treat BVR number as structured communication
Now, Swiss users can auto populate BVR number generated for invoice in it's 'Payment Ref.' field
by simply configure it in 'Communication Standard' of invoice's journal.

task: 1999530

closes odoo/odoo#36253

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-08-30 05:10:14 +00:00
Christophe Simonis 8bd6a93c74 [MERGE] forward port branch saas-11.3 up to ede253f1b2 2019-08-29 16:45:15 +02:00
Christophe Simonis ede253f1b2 [MERGE] forward port branch 11.0 up to d61873ac4a 2019-08-29 15:22:51 +02:00
Christophe Simonis d61873ac4a [MERGE] forward port branch saas-15 up to 10d88083a0 2019-08-29 13:37:39 +02:00
Christophe Simonis 10d88083a0 [MERGE] forward port branch saas-14 up to ca34ae4329 2019-08-29 12:16:44 +02:00
Christophe Simonis ca34ae4329 [MERGE] forward port branch 10.0 up to 7c99310b23 2019-08-29 12:14:47 +02:00
Christophe Simonis c40236eb16 [FIX] account: adapt test to new version
Oversight of previous forward-port.

closes odoo/odoo#36181

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-29 10:04:28 +00:00
Florimond Husquinet (fhu) 55d1c66c8e [FIX] mail: parse message with invalid html as content
Before this commit, when a message contains invalid HTML, it crashed
with error such as: "TypeError: Cannot read property 'childNodes' of
null".

This commit fixes the issue by wrapping the content of messages with
invalid HTML in a `<pre>` tag.

OPW-2048140

closes odoo/odoo#36196

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-08-29 08:19:57 +00:00
Juhil Somaiya d1ee54450a [FIX] web: dashboard_graph disappearing issue on kanban record reload
When we try to change the color of kanban, the kanban record is re-renders,
kanban record is replaced with kanban-box and subWidgets are re-rendered,
reset of all subWidgets are called which will re-render widget but it is not
rendered in DOM as DOM element is destroyed and hence  dashboard_graph widget
can not computed proper height of the canvas element and disappear

Call on_attach_callback after widget reset is called on kanban record, as widget
element is removed from DOM and new element is added in DOM so
on_attach_callback should be called again.

task-2036256

closes odoo/odoo#35254

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-08-28 12:04:59 +00:00
Lucas Perais (lpe) e9837fcc09 [FIX] purchase_stock: typo tax in anglosaxon
Have a product valued in real time
make a PO to a vendor with that product, with a tax
validate

Before this commit, it crashed because of a typo

After this commit, the invoice is validated

OPW 2061472

closes odoo/odoo#36216

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-29 09:05:27 +00:00
Christophe Simonis 838b3f2d82 [MERGE] forward port branch 11.0 up to 1385b60004 2019-08-27 16:06:01 +02:00
Christophe Simonis 1385b60004 [MERGE] forward port branch saas-15 up to ea821b991a 2019-08-27 14:53:45 +02:00
Christophe Simonis ea821b991a [MERGE] forward port branch saas-14 up to e4428e0c9b 2019-08-27 12:44:24 +02:00
Christophe Simonis e4428e0c9b [MERGE] forward port branch 10.0 up to da474d0e87 2019-08-27 12:43:51 +02:00
Jorge Pinna Puissant 61ad8a9ea7 [FIX] website_event_sale: event discount
Fine-tuning 180866fe1e

- Go to Sales > Configuration > Settings
- Enable "Multiple Sales Prices per Product" and select option "Prices
computed from formulas (discounts, margins, roundings)"
- Go to Sales > Catalog / Pricelists
- Select "Public Pricelist" and set "Discount Policy: Show public price
& discount to the customer"
- Add a discount to an event (20 % to "Open Days in Los Angeles" for
example)
- Go to the eCommerce, buy a ticket to "Open Days in Los Angeles" which
as a 20 % discount

Since 180866fe1e the discount is applied
two times.

opw-2058709

closes odoo/odoo#36106

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-27 08:33:30 +00:00
Nans Lefebvre 3d6e917899 [FIX] stock: error at application re-install
Fine-tuning of 1da058f8ed, for the same use-case.
The _valid_barcode method is here to bypass the barcode_company_uniq constraint.
The constraint is put on barcode/company couples;
however if checked without a given 'company_id' in the values,
which ends up as False, then the check is actually not the correct one:
the company_id is going to be filled later by the default_get.

Instead we use the value given by the default_get, consistently with the create.

The same error could affect _create_missing_locations,
since it gives an explicit value to company_id that was not passed in values.
We give it to make sure that the company is consistent there to.

opw 2058888

closes odoo/odoo#36102

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-08-27 06:42:43 +00:00
Lucas Perais (lpe) 21ae503cf4 [FIX] product: name search on dynamic product template
Have a product template, assign a dynamic attribute to
(the corresponding variant will be created when used in a SO)

Try to name_search for it
e.g.: in the product configurator modal, type some letters to catch it in theory

Before this commit, the product template was not found by the name search
this is because the template doesn't have any variant yet

After this commit, it is found by the name search

OPW 2060603

closes odoo/odoo#36215

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-29 10:19:47 +00:00
Lucas Perais (lpe) 3950702c86 [FIX] account: reconciliation widget: parent name targets partner without parent
Create a partner with a child *WITH THE SAME NAME*
Create an invoice for the child

Create bank statement and line, with the field partner_name equals
to the child's name (and to its parent)

Open the reconciliation wigdet for that statement

Before this commit, the widget searched lines for the child partner
because partner_name matches the child in priority
Hence the invoice just created was not present
This is because when validating an invoice or a payment
the journal entry's partner will be the commercial_partner_id of the child
By definition the commercial partner_id doesn't have a parent_id set

After this commit, the invoice is visible in the widget

OPW 2039768

closes odoo/odoo#36184

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-28 12:14:27 +00:00
qsm-odoo 412117c2a7 [FIX] website: restore background sizing of fixed parallax backgrounds
Fixed backgrounds are disabled when using a mobile/tablet device,
which is not a big deal but, on some of them (iOS...), defining the
background as fixed breaks the background-size/position props.
So we enable this only for >= XL devices.

We may want to find a better alternative for future versions.

opw-2055073

closes odoo/odoo#36187

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-28 12:39:38 +00:00
Alexandre Díaz 5bb4314740 [FIX] website_sale_stock: change '_get_combination_info' signature
This commit changes the '_get_combination_info' signature according to main
method signature to avoid inheritance problems.

closes odoo/odoo#36125

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-27 16:45:24 +00:00
Thibault Delavallée b36b000f5c [FIX] website_sale: fix access right issue when paying
PURPOSE

Test frontend and UI tools of eLearning.

SPECIFICATIONS

Commit fe518f1fea introduced a search on sale order model in checkout
process. However this may fail as access rights are not always granted

* portal users can see orders linked to their company;
* salesman and a lot of specific groups (accounting, ...) can see their own
orders, all orders, or depending on some condition;
* BUT standard users (employee only for example) cannot see any sale order.

Indeed they do not even have right to read, meaning a search fail. Let us
sudo the search as this is contained in a sub method used to fetch some
data.

LINKS

Task ID 1937768

closes odoo/odoo#36166

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-28 08:51:15 +00:00
Florimond Husquinet (fhu) 324919bcf0 [FIX] website_blog:redirection 301 instead of 302 to new blog
-Create a second blog
-Move one post to this second blog
-Access the post with the url from the first blog

Before this commit:
You will get redirected to the new url with a code 302 (temporary).

After this commit:
You will get redirected to the new url with the code to 301 (permanent).

OPW-2059194

closes odoo/odoo#36161

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-28 08:02:26 +00:00
Florent de Labarre 71570e49ab [FIX] doc: add parent_of operator
closes odoo/odoo#32558

Signed-off-by: vfe <Feyensv@users.noreply.github.com>
2019-08-28 08:46:15 +00:00
Fanny He 48ee127a00 [FIX] stock: better consistency check in _action_done
When validating a picking from location A to B, location A's quant.quantity
may be updated to a quantity != 0 with _update_available_quantity.
This is because the quant value is written as quantity - float_round(quantity).

As a result, the consistency check would find two existing quants, and raise.
Therefore the picking cannot be validated.

opw 2040091

closes odoo/odoo#35913

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-08-28 07:27:45 +00:00
Alexandre Kühn 75e8342e81 [FIX] mail: composer in mass_mailing channel (mobile)
Before this commit, a channel in mobile with option "Send messages
by email" had no composer when opening in mobile.

This issue happened because channel views in mobile are in fact chat
windows. Chat windows with such channels do no display any composer,
which is intended in desktop.

This commit fixes the issue by enabling the extended composer for
chat windows with email channels, just for mobile.

opw-2059468

closes odoo/odoo#36120

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-08-27 14:51:28 +00:00
Nicolas Lempereur decd9968d3 [FIX] web_editor: bg-transparent filter=>no opaque
The color picker in snippet options has two way to set a color: have a
data-color attribute => it is used, or have a o_custom_color class and
the background-color is set directly on that color.

In the case where we select no background color (transparent), it would
work in preview, but when applied the opaque color of the transparent
button (since opacity is not copied) is set which is wrong and
unexpected.

opw-2053636
closes #36131

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-08-27 13:12:10 +00:00
Lucas Perais (lpe) a20b84d05a [FIX] account: reconcile invoice, refund in foreign; payment and writeoff in domestic
This reverts 0164c9dfcb

Have exchange rates:
Domestic - Domestic: 1.0
Domestic - Foreign : 1.113900

Make an invoice: 480 Foreign
Make a credit note: 140 Foreign
Make a payment: 287.20 Domestic

Reconcile all this with a writeoff: 18.04 Domestic

Before this commit, the first invoice was not fully paid
this was due to wrong summing of the partial lines that applies to it
account.partial.reconcile are made between only 2 move lines at a time
Whatever the amounts they hold, it has been computed at creation
and it makes no sense to aggregate their rounding error when computing
their impact on a move line (because, the information is already lost)

After this commit, the use case works, all invoices and payments are fully consumed and reconciled
Note that this is a simple use case, no dates or exchange rates involved

OPW 2057845

closes odoo/odoo#36087

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-26 13:41:21 +00:00
Romain Derie 0ff1933ba1 [FIX] website: restore sitemap lastmod and priority
Commit 54d30d5194 introduced `lastmod` and `priority` on sitemap locs.

This was broken with 4ecbacaf59 which introduced `website.page` model as it
removed the `PageConverter`.

Before website.page:
1. PageConverter returned records with `__lastmod`
2. `enumerate_pages` loop on converters would remove the prefixed `__`

After website.page:
1. code to remove `__` was still there but the pages would be found and looped
on after that code, making it useless.

With this commit:
1. The code to remove the `__` is moved after searching the pages.

Following #36090
Related to #35464

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-26 14:43:39 +00:00
Jorge Pinna Puissant 832dc67678 [FIX] point_of_sale: automatic selection of customer pricelist when using barcode
Backport from 12.0 to 11.0

When using barcode to change the customer to a customer with a different
pricelist than the pos default, the customer pricelist was not
automatically selected.

This is a fine-tuning on 5603b778f6

opw-2047070

closes odoo/odoo#36050

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-26 07:16:05 +00:00
Varun RavalandMohammed Shekha 18f52a8ffa [FIX] mail: show attachment "uploading..." in chat window
When uploading an attachment from a chat window, the label
"Uploading..." was not visible. This comes from attachment preview
being too small, thus cutting entirely the filename and the upload
progress bar.

This commit fixes the issue by increasing the size of attachment
previews in chat window, so that it takes 50% width. It also provides
more space for labels on attachment preview while uploading, by
removing the right padding for the animated "unlink" feature that
works only for uploaded attachments anyway.

Note that this commit does not entirely solve the issue: half the
width of a chat window being enough to display the icon, the file
extension, and sometimes the label "Uploading..." completely. The
width of the icon and text extension combined is always the same,
but the label "Uploading..." changes with the locale. The extra space
from the padding removal makes this label fully visible in English,
but not necessarily in other languages. The proper fix requires
re-designing the style of attachment preview, which will be done in
master.

Task-Id: 1978640

closes odoo/odoo#33638

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>


Co-authored-by: Mohammed Shekha <msh@odoo.com>
2019-08-23 15:09:54 +00:00
Nicolas Martinelli 5d088e6a90 [FIX] account_tax_python: product is a template
- Create a new tax, using the 'Python Code' tax computation
- In 'Applicable Code' field, use a field only available on the
`product.product` model (e.g. `product.code`)
- Attach this new tax to a product that is available in the eCommerce
- Access the eCommerce, search for the product if not displayed.

The template `website_sale.products_item` crashes at rendering because
`code` is not available on a `product.template`.

`product` is supposed to be a `product.product` recordset. However, the
method `_get_combination_info` of `sale` is made in such a way that we
can fetch the information of a template, not a product. Utlimately,
methods `compute_all` and `_compute_amount` are called with the wrong
object.

We fall back on the first variant in this case.

opw-2056722

closes odoo/odoo#36134

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-27 13:30:41 +00:00
qsm-odoo db9a0a9fe1 [FIX] point_of_sale: restore customer_facing_display scss
When converting all LESS to SCSS, that file was not properly converted
(it was not tested properly as it is not part of an asset).

Also, commit https://github.com/odoo/odoo/commit/de61fc0c998acdfa29103b40ddc9424e66602158
modified the CSS without changing the corresponding SCSS...

closes odoo/odoo#36133

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-27 13:25:03 +00:00
Nicolas Lempereur c346e7af33 [FIX] l10n_*: translate COA on load without install
When a COA is installed being loaded for current company, the
translations of taxes, account name, ... (in l10n_be, l10n_ca, l10n_ch,
l10n_sa) are copied from the templates to the accounting records.

This is done in `post_init_hook` which is correct since then
translations are available to be copied.

But when an accounting localization is already installed and we set it
to a company, the translations are not copied.

eg. install l10n_be for company1: accounts name are translated in
french and dutch, set company2 to belgian accounting: only original
language is available.

With this changeset, the translation copy is also performed when an
accounting localization is loaded for a company after it has been
installed.

note: if we install language for first times after setting accounting
localizations, chart of account are translated in that language.

opw-2047013
closes #35985

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-08-27 11:19:10 +00:00
Arnold MoyauxandAndrea Grazioso 40487aca5c [FIX] stock, mrp: merge SFP for 2 different MO
usecase to reproduce:
- Set the warehouse with manufacturing 3 steps
- Create a BoM with a Components that use a Sub BoM
- Set Both product MTO + Manufacture
- Create a MO

You have only 2 picking for the first MO with the SFP
that contains both the finished product and the intermediate
component. However they are created and moved at two different times
since you could not create the finished product withtout the
component, so there is no meaning to put them both in the same picking.

It happens because the _assign_picking will merge moves with the same
procurement group. In our case, it's the wanted behavior to have the
2 differents SFP linked to the same MO. So the solution would be to
add a condition to _assign_picking and don't merge moves if they come
from different MO, at this point the field created_production_id would
fit. However this solution is not robust if a customer creates a
new rule that add a 4th steps to the production process.

opw-2055688

closes odoo/odoo#35915

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>


Co-authored-by: Andrea Grazioso (agr-odoo) <agr@odoo.com>
2019-08-27 11:32:54 +00:00
Aaron Bohy 906480093a [FIX] web: 'create' in context and non inline subviews
Let's assume an action with 'create': 0 in the context, and a non
inline subview in the form view. Before this rev., the 'create': 0
was applied to both the form view and the subview.

This rev. applies the same logic as what the server does for inline
subviews: the rule is applied to the subview iff its model is the
same as the one of the form view (with key 'base_model_name' set
in the context).

Task 2035653

closes odoo/odoo#36109

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-08-27 10:21:00 +00:00
Jorge Pinna Puissant 2899a9d1ed [FIX] stock_picking: wrong location in move_line
- In stock, create a new transfer (stock.picking);
- Enter a source location ('A'), a destination location ('B') and an
operation type;
- Add product (whit out packaging);
- Change the source ('C') and the destination ('D') location;
- Hit save.

Before this commit, when opening the details of the move, the source and
destination location where setted as 'A' and 'B', the locations that
were setted before adding the product.

Now, the source and destination location of the move line are 'C' and
'D', the current location at the time we save the picking.

opw-2058240

closes odoo/odoo#36089

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-26 13:55:51 +00:00
Lucas Perais (lpe) 90ab752c5f [FIX] base, web, website: force phone number in ltr
Display your website in Right To Left
Go see the phone number of the company
Make that number in the form
```
123[space]456[space]789
```

Before this commit, the blocks of that number were inverted
(intra-group order did not change)
Leaving us with
```
789[space]456[space]123
```

After this commit, we introduce a little class to force Left To Right
display

OPW 2059917

closes odoo/odoo#36115

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-27 10:02:27 +00:00
Nicolas Martinelli 0aaf7307de [FIX] stock_account: price_unit after edit
- Product category: FIFO (real_time) / Automatic
- Product: storable, nvoicing based on delivered quantity, FIFO category
- Receive 3 units @ 30
- Create and confirm a SO for 1 unit
- Deliver requested qty to customer
- Unlock the picking, update the qty done to 3, lock.
- Invoice delivered qty

In the journal entry of the customer invoice, the COGS entry is 180
instead of 90.

The root cause of this is the incorrect price unit on the modified stock
move, which equals to -60 instead of -30.

The price unit should compute the weigthed average of the already
delivered quantity with the extra quantity.

opw-2047719

closes odoo/odoo#36065

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-26 13:12:48 +00:00
Romain Derie cfbaba81c2 [FIX] website: correctly close dropdown menu on scroll
Before this commit, the code that was supposed to close the dropdown in the
navbar when scrolling was not working anymore.

Indeed, it would removes the `show` class from the `nav-item dropdown`
(dropdown menu entry) but not from the `dropdown-menu` (dropdown content).

Fixes #35320

closes odoo/odoo#36069

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-26 10:37:30 +00:00
Thomas Binsfeld 389bd53a0b [IMP] sale: split invoicing method for cleaner overrides
closes odoo/odoo#31529

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-08-26 08:59:46 +00:00
Odoo Translation Bot 5a18c8e71b [I18N] Update translation terms from Transifex 2019-08-25 01:16:15 +02:00
Nicolas Martinelli fb0d84b24a [FIX] portal: VAT modification
The route `/my/account` doesn't implement any restriction for the VAT
modification. This allows users to modify the VAT number although they
shouldn't.

We make the restriction consistent with the backend:

https://github.com/odoo/odoo/blob/e0c7a368580dfeac9af8dc3cb3a10fc33bf4b521/odoo/addons/base/res/res_partner_view.xml#L247

opw-2056727

closes odoo/odoo#36031

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-23 14:16:46 +00:00
Odoo Translation Bot 1dd73aa822 [I18N] Update translation terms from Transifex 2019-08-25 03:08:28 +02:00
Antoine Guenet 0ff1d5cd40 [FIX] web_editor: properly paste unwrapped text
When pasting from clipboard, the editor filters the nodes to paste.
Among other things, it removes `meta`, `style` and `script` nodes. It
did so using `jQuery`'s `not` method but that method has a side effect:
it removes text and comment nodes as well if you pass it a `jQuery`
selector. As a result, unwrapped text nodes could not be pasted. This
commit fixes that by using `each` to remove the targeted nodes instead
of using `not`.

closes odoo/odoo#36012

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2019-08-23 09:35:57 +00:00