Commit Graph
124755 Commits
Author SHA1 Message Date
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
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
Laurent Smet 7b9720930a [FIX] account: Fix matching regex case insensitive in matching rules
The other filters are case insensitive, why not this one?

closes odoo/odoo#35899

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-21 09:28:56 +00:00
David Tran 569a29ecee [CLA] Update tvtmarine-automation.md
closes odoo/odoo#35747

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-22 08:56:59 +00:00
ARXI 2815485dc1 [CLA] Corporate signature for Arxilead
closes odoo/odoo#35687

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-22 07:57:09 +00:00
Christophe Simonis 46d3d06f04 [MERGE] forward port branch saas-11.3 up to 4833aeb960 2019-08-22 11:22:31 +02:00
Christophe Simonis 4833aeb960 [MERGE] forward port branch 11.0 up to ab8c564f44 2019-08-22 11:21:23 +02:00
Nans Lefebvre ab8c564f44 [FIX] account: fix default_get of account move lines
Obvious typo of 67d82b875c.

opw 2046137

closes odoo/odoo#35939

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-08-22 07:07:27 +00:00
Christophe Simonis 12e9613f96 [MERGE] forward port branch saas-11.3 up to 668c360e32 2019-08-21 18:26:18 +02:00
Christophe Simonis 668c360e32 [MERGE] forward port branch 11.0 up to 1b234b1be7 2019-08-21 16:58:16 +02:00
Lucas Perais (lpe) cf42d86549 [FIX] crm_reveal: bad import of a file variable
Before this commit, crm_reveal always pushed a stocky warning to the
bus on rule creation, even if GeoIP was rightly set
(i.e. python package AND the database in /usr/share/GeoIP)

This was because the file imported the variable from another one
that copy was not updated with the initialization of the session

After this commit, we call the variable at runtime rather than import it
at init time
There is no more sticky message

OPW 2052995

closes odoo/odoo#35906

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-21 11:38:06 +00:00
Christophe Simonis 121034f79a [MERGE] forward port branch 11.0 up to 1e4de19cd4 2019-08-19 14:43:31 +02:00
Christophe Simonis 1e4de19cd4 [MERGE] forward port branch saas-15 up to c43de33643 2019-08-19 13:54:40 +02:00
Christophe Simonis c43de33643 [MERGE] forward port branch saas-14 up to fa26279014 2019-08-19 12:51:26 +02:00
Christophe Simonis fa26279014 [MERGE] forward port branch 10.0 up to 59c59cd8a0 2019-08-19 12:47:56 +02:00
Julien CastiauxandHugo Adan 855447fc77 [FIX] ir_rule: invalid user context propagation
Create two models, `object` and `category`. The object have a Many2One
to the category. Override the `search` on the category so it returns a
subset of the records if a context key is present. Create an IR Rule on
object with the following pseudo-domain: `categ_id in category.search([])`.
Search on object with the context key present. Even if the context
should only be applied to category, it is applied to object too thus
there are some object missing.

When evaluating the domain of IR Rules, the current user is propagated
with the current environment context. API calls triggered by the domain
are called with the given context, possibly populating the cache with
different records than it would normally does without the context (i.e.
at `addons/point_of_sale/models/account_journal.py#L19-L23`). Following
requests do use that invalid cache thus return invalid results.

Forcing an empty context on the user used during the evaluation of the
context ensures the IR Rules are working as they should and is
future-proof (cf `load_company` v13 context key)

opw-2041667

closes #35123
closes #35125

closes odoo/odoo#35667

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>


Co-authored-by: Hugo Adan <hugo@vauxoo.com>
2019-08-19 09:04:09 +00:00
Christophe Simonis b6deb72747 [MERGE] forward port branch 10.0 up to 2fc46a064d 2019-08-19 10:24:42 +02:00
Odoo Translation Bot 0458337bc3 [I18N] Update translation terms from Transifex 2019-08-18 03:08:13 +02:00
Nans Lefebvre 6a1e272ccd [FIX] stock: do not raise if writing the same value
Rewrite the product associated to a serial number.
There is a check to forbid this if some move lines already exist.
This check does not actually care what value is written,
so it can raise uselessly (and forbid a legitimate write).

opw 2049717

closes odoo/odoo#35736

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-08-14 15:24:06 +00:00
Sébastien Theys c2271c8740 [IMP] doc: add t-name t-extend to QWeb JS
task-2040835

closes odoo/odoo#35116

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-14 12:49:56 +00:00
Abridbus 2fc46a064d [FIX] mail: removing whitespace on message_id from incoming mail
Because of a whitespace character present at the beginning of the message_id of some mails,
they were fetched twice.

From the SQL side, we see that Outlook is formatting the header following the RFC822
by allowing the header to look like:

Header:<CRLF>
<whitespace><hash_of_msg_id>

From RFC822:
"Each header field can be viewed as a single, logical line of ASCII characters.
For convenience, the field-body portion of this conceptual entity can be split
into a multiple-line representation" (abr.)

It was also possible to find out by checking the logs.
One or two whitespace(s) can be seen before the hash of the msg_id.

The following commit is making sure we use and save the message_id without the whitespace
by stripping them off on the coming mail.

OPW-2006806

Applying CHS solution to avoid crash on empty header.

closes odoo/odoo#35682

Signed-off-by: bve-odoo <Abridbus@users.noreply.github.com>
2019-08-14 07:47:04 +00:00
Patrick Tombez a2b98e94be [FIX] website_sale_comparison: Fix category order
Use category sequence to order them instead of their order of appearance in
the list of sequence ordered attributes

closes odoo/odoo#35610

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-13 11:31:10 +00:00
Nans Lefebvre 119ca24d60 [FIX] account: fix invoice line default taxes at account onchange
If there is no product on an invoice line, there is an onchange to ease tax
input that prefills the line with the account default taxes.
Because this is a relational field (a many2many), field = recordset
is as valid as field = recordset.ids, but the semantics is different.
In the second case, the id list is added with 4 commands, not a 6.
So the default taxes are only added, and none are ever removed.
Note that the ORM behaviour changed; this .ids was historical,
but before (v10) it did remove other taxes.

opw 2046112

closes odoo/odoo#35657

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-08-12 13:49:08 +00:00
Christophe Simonis 76a52bdbfb [MERGE] forward port branch 11.0 up to b59369d1e6 2019-08-12 15:00:28 +02:00
Raphael Collet 59c59cd8a0 [FIX] field: compute transitive dependencies over non-stored fields
In other words, when a field F depends on a non-stored field G, it also depends
on G's dependencies.  This guarantees that whenever a dependency of G is
modified, F will be invalidated and marked to recompute (if necessary).

The transitive closure of dependencies is not computed over stored fields.
Anyway stored fields already trigger the recomputation of their dependent
fields during their recomputation.  The performance impact on the loading of a
registry is negligible (less than 1%), and the increase of recomputation
triggers is small (less than 10%).

(cherry picked from commit 3fbd86bcbe)

opw-2033493

closes odoo/odoo#35636

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-08-12 09:18:31 +00:00
Odoo Translation Bot b59369d1e6 [I18N] Update translation terms from Transifex 2019-08-11 03:07:39 +02:00
qsm-odoo f7e83b69c6 [FIX] website_event: clean local events snippet before save
The local events snippets is an empty HTMLElement which is filled by
JavaScript on page loading. Before this commit, the filled content was
saved in database. This does not create a real problem as the content
is reloaded as soon as the page loads but you can see old events
flickering before the new events are actually loaded.

Now the snippet is cleaned before saving. This also allows to add
default content with a custo so that it is shown during the events
loading (as we are currently doing on odoo.com...).

closes odoo/odoo#35597

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-09 11:34:21 +00:00
Christophe Simonis 7321c8e260 [MERGE] forward port branch 11.0 up to dff2e242a5 2019-08-08 15:00:43 +02:00
Nicolas Martinelli dff2e242a5 [FIX] document: PDF indexing
Backport from 12.0, commit : 1b753b0d53
note: there was also report of PDF content blocking that when indexed
blocked an instance worker indefinitely

Since PyPDF2 gives bad results for PDF indexing, stop using it since it
raises more issues than it helps users.

opw-2044679

closes odoo/odoo#35310

closes odoo/odoo#35525

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-08-07 11:30:51 +00:00
Shreya Modi 1b234b1be7 [IMP] l10n_uk: updated website link
-website link now redirects to accounting page of odoo.com portal

task-2040072
Closes #35513

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-07 05:59:52 +00:00