Commit Graph
131608 Commits
Author SHA1 Message Date
Jorge Pinna Puissant 6d2d30d6f5 [FIX] payment_*: multiwebsite base_url
Fine-tunning of 937b5c076e7175bec664ed0cf4b77505e342f1e2

Have a multiwebsite setup
have a payment installed for one of the two websites

Make an order on that website and try to pay

Before this commit, the transaction doesn't come back to odoo's
payment success controller
This was because the return url was set to the web base url ICP

After this commit, the payment success page is opened as we took
the request's url as the return url

opw-2080352

closes odoo/odoo#39643

X-original-commit: a9fb15b33fd041ee420581a5ba450017db06e0c7
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-10-31 12:33:56 +00:00
Lucas Perais (lpe) c40e06fd39 [FIX] web: dropdowns can't be in a relative-positioned element
Before this commit, when a dropdown overflew its container
i.e. in the case of a long filter menu in modal
The scrolling of that dropdown to get to Add custom Filter
was impossible

This was because dropdowns react pretty bad when contained in a
relative positioned container

https://github.com/twbs/bootstrap/issues/26512
https://github.com/twbs/bootstrap/issues/28513 !!

After this commit, the btn-group that adds the relative positioning
is forced into the default value

This commit corrects what was initially
corrected at https://github.com/odoo/odoo/pull/37594
in v12.0.
The incriminating commit that retriggers the issue
is irrelevant because it is the refactoring of action manager
but here it is: 40dd121938

closes odoo/odoo#39541

closes odoo/odoo#39636

Original-signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
X-original-commit: 7f72b837473f68a1dcd6a303ac1bf355dddcc2b1
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-31 11:07:12 +00:00
Lucas Perais (lpe) 18765dde73 [FIX] web: dropdown in modal in RTL mode
Be in Right to left

Open a m2o search more, to get onto the list modal
toggle the filters menu

Before this commit, the filters dropdown was almost invisble
and too much on the right anyway

This was because the RTL was not taken into account

After this commit, we anchor the dropdown on the right
(both as in good and as in side) side of its trigger button

Also, when modifying the dropdown, by developping the Custom Filter
we force the repositioning of the dropdown, to take those new elements
into account

It is expected though that after this commit, in RTL, the
dropdown in a modal that has a scrollbar (which is on the left)
will be slightly pushed to the right. It is usable and visible though
Some kind of plumbing using $el.data('offset', fn) from popper.js
is possible, but has been deemed not robust enough

Docs
https://getbootstrap.com/docs/4.0/components/dropdowns/#methods

OPW 2088934

X-original-commit: 105b4affd65ea23e1aa65b53f4595c174c9984ef
2019-10-31 11:07:12 +00:00
Andrea Grazioso (agr-odoo) d11ba1454a [FIX] http: disable cache-control header (debug) for wkhtmltopdf
Activate developer mode, generate a report (print an invoice)

The report will have missing pieces, like the footer or some part of the
header. This is probably caused by wkhtmltopdf not loading properly some
resources

Wkhtmtopdf generate the same warning message for every problematic resource:
"Warning: Received createRequest signal on a disposed ResourceObject's
NetworkAccessManager. This might be an indication of an iframe taking
too long to load."

Related issue on wkhtmltopdf project page:
wkhtmltopdf/wkhtmltopdf#1865
wkhtmltopdf/wkhtmltopdf#3933
wkhtmltopdf/wkhtmltopdf#2565

The problem is located in the response that wkhtmltopdf receive:
in debug mode the header of the response contains
'Cache-Control: no-cache' which probably create a race condition during
the rendering while a second request is attempted to verify the
resources.

Adding a raw user agent check to not include this header directive
fix the problem

Notes from odony:

We've considered some alternative solutions to preserve the purpose of the
DisableCacheMiddleware without having to explicitly test for wkhtmltopdf.

* 'Cache-Control: no-cache' (current behavior) breaks wkhtmltopdf rendering
* 'Cache-Control: no-store' breaks wkhtmltopdf rendering too
* 'Cache-Control: max-age=0' breaks wkhtmltopdf rendering too. It works
when increasing the delay to a few seconds, but no magic value will work
for very long documents, or it will stop serving its purpose, so it's not a
viable option.
* 'Cache-Control: must-revalidate' does not break wkhtmltopdf rendering (no
duplicate requests at all), but it is not clear from the RFC
(https://tools.ietf.org/html/rfc7234#section-5.2.2.1) that it
will have the intended effect for our middlewar

opw-2086708

Closes #38394

closes odoo/odoo#39634

X-original-commit: 8cac60be37133cabef46dab016a5692876da9e5e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-31 11:06:31 +00:00
Lucas Perais (lpe) 9d2e3fcd61 [FIX] web: list: optional field dropdown expands toward the list
Be in RTL mode, on a list view
Click on the button to set up optional fields

Before this commit, the dropdown expanded to the right, and was partly invisible

After this commit, we dynamically set to which direction the dropdown should expand
depending on RTL/LTR
Consequently the dropdown is fully visible in either mode, and expands to the list
rather than away from it

closes #39402

closes odoo/odoo#39628

X-original-commit: fb914d176de5a4711f11de32945ebaec0164f62e
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-31 10:17:57 +00:00
Romain Derie 5e3d6c0032 [IMP] web_editor: stay on editor on snippet install
In the editor, the snippets from uninstalled module are shown with the
possibility to install the module to get snippet.

Before this commit:
When clicking on it, it will redirect to the module page, in the backend from
where you can install the module.

Now:
A popup will be shown to save current changes and install the module.
The installation will be done without changing page, in the editor. Once done,
the page will reload in editor enabled mode.

task-2089285

closes odoo/odoo#39138

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-31 10:02:09 +00:00
Nans Lefebvre 0ce6eea5bd [FIX] ir_fields: import many2one_reference fields
Since a many2one_reference is simply an int, we can defer
_str_to_many2one_reference to _str_to_integer.

Note that to really validate the integer, we need the model_field of the
field, which should be stored in the record's values.
To get this information, _extract_records would have to be modified.

For the reported use-case, it does not matter as the create of the
message record checks for the existence of the related record,
so the validation works as expected.

Better support for this type of fields would be to allow for
import/export of xml_ids, which would avoid the need for the model.

opw 2087353

closes odoo/odoo#39601

X-original-commit: 77f616e9359272b2598d414672cffbc06cee2a33
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-10-30 15:50:18 +00:00
qsm-odoo 768655c0d3 [FIX] website: remove breaking z-index of parallax elements
Commit https://github.com/odoo/odoo/commit/c3c98e937e575853fe0b25fa6cb3c916e73fc591
introduced a z-index on parallax element to restrict the z-index -1 of
the s_parallax_bg in the snippets... this was however a bad idea as it
also restricts other positioned elements in there (like dropdown menus)
making them go under other elements in the page.

Fortunately, this z-index is in fact not needed at all since the
z-index -1 mentioned above has been removed with another commit:
https://github.com/odoo/odoo/commit/22745668cf66d802899dac526d810eba64b28c4b

However, the z-index -1 was necessary to force the s_parallax_bg under
static elements that go after it... and this was solved in 12.0 by
making those relative elements. See snippet refactoring in 12.0 with
https://github.com/odoo/odoo/commit/4dce6cc98b2b95a00249ac29245305e08f288e6c#diff-a50ffff96791f36c6dbe5c9273135e5aR783

closes odoo/odoo#39617

X-original-commit: 3ddc722f390c85166dab9bd9fe762d908161fbb8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-30 19:52:04 +00:00
Raphael Collet 0c392f118e [FIX] base: avoid triggering recomputations based on deleted fields
After deleting records from model 'ir.model.fields', make sure to not
trigger recomputations based on those fields, as they have been removed
from the database schema.

Also shorten the deletion of 'ir.model.fields.selection' records: as
they are deleted after 'ir.model.fields', most of them have already been
deleted on cascade.

closes odoo/odoo#39607

X-original-commit: 6b048a8b86bb32955c165dfb31736e9df5828f7a
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2019-10-30 17:56:44 +00:00
mreficent d9945494be [DOC] render_html -> _get_report_values
closes odoo/odoo#39616

X-original-commit: 9beebf2b54959727407f3959e26cd1ee874c3307
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-30 19:46:15 +00:00
Victor Feyens 12f69f9465 [FIX] sale_crm: use lead company when creating a quotation.
Fixes #39546

closes odoo/odoo#39612

X-original-commit: b69dcf7143e8ec74d211d1cf90bbaf1e2796e414
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-30 18:39:38 +00:00
Carlos Lopez 1a2c9f5b17 [FIX] l10n_ar: avoid to read all records with a limit 1
closes odoo/odoo#39268

X-original-commit: c4f5007537bb6d6a0d0d4d3d719d79a972728243
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-10-30 16:51:36 +00:00
Xavier Morel 355e360973 [IMP] core: mark a few osutil functions as deprecated
* walksymlinks is useless, os.walk got followlinks in 2.6
* tempdir is redundant with tempfile.TemporaryDirectory added in 3.2
* listdir(recursive=False) is just os.listdir (I guess recursive=True
  is somewhat useful)
* zip_dir is *not* redundant with shutil.make_archive:
  - zip_dir handles the archived root differently
  - zip_dir sorts files, make_archive sorts directories
  - make_archive explicitly adds entries for directories (including
    empty), sorts directories, doesn't sort files; zip_dir sorts
    files (including with a custom key function) but ignores directories
  - zip_dir filters out a bunch of trash files

closes odoo/odoo#39573

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-10-30 11:02:41 +00:00
Nikunj Ladava 8ef1be2e42 [FIX] payment: prevent rpc fail event
before this commit it shows error dialog when rpc fail

after this commit, error dialog will not be shown to user,
instead we have already shown error in payment form

task- 2045189

closes odoo/odoo#39571

X-original-commit: e3644c6b59271c521abc151d3c533331836fdc90
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-10-30 12:06:20 +00:00
Xavier-Do 6456434382 [IMP] tests: manage console.log(object)
Before this commit, console.error were catched by browser_js
in order to log them but only value was used on received object,
which is correct only when the received object is text.

With owl arrival, error object may be logged. This
commit add the ability to manage logged object, fallbacking on
a complete representation of object if object is not an error or
description is empty.

closes odoo/odoo#39592

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-10-30 15:12:10 +00:00
fw-bot f11cb858be [FIX] core: remove broken time consuming checks
The two method valid valid_alternative_icon_text and valid_title_icon
represent ~13% of an install all. Rewriting them in master
with in #36373 is the main reason of the performance improvement.

Those two method logic were broken, because
`xpath += '[not(//*[' + valid_attrs_xpath + '])]'`
will actually search for valid_attrs_xpath from view root,
not from fa- node.

-since this check will only log a warning and so only impact
 bugfix, no impact on user editing views,
-since a new check is added in master with the corresponding fix in views,
-since this check doesn't really test what it is suppose to check,
-since fa accessibility is great, but not critical

->removing those check will slightly speed up build without major impact
on views quality

closes odoo/odoo#39566

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-10-30 13:36:43 +00:00
Christophe Monniez 8d5da6e4be [IMP] tests: log a warning when HttpCase test in at_install
When loading a page on an existing starting database, registry is not
fully loaded causing potential error when trying to access model
existing in database (views, menitem, ...) since model added in last
loaded module does not exist in registry.

Thus, executing browser js test may lead to errors when executed during
an update on a database with other modules installed.

HTTPCase should be executed post_install to ensure that registry is
fully loaded to avoid this problem.

Since HTTPCase are slower than other test, it is also a good idea to
execute them at the end, in order to prioritize fast fail.

With this commit, a warning is isued if such a test class is tagged to
run at install time.

While at it, remove deprecated at_install and post_install helpers and
remove the deprecated phantom_js alias.

closes odoo/odoo#39462

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-10-30 12:35:23 +00:00
Christophe Monniez b6ed34e134 [FIX] ir_http: declare class attributes _routing_map and _rewrite_len
Actually, the two class attributes are only set when calling the
routing_map method. As a consequence, when the url_for function in the
http_routing module tries to access the _rewrite_len attribute, it
may crashe.

This problem arrise in the TestQwebProcessAtt from the website module
when the test is run alone.

It was hidden on the runbot because some missconfigured HttpCase tests were run
at_install before TestQwebProcessAtt. In that particular case, the
routing_map method is called and sets the attribute.

With this commit, the _routing_map and _rewrite_len class attributes are
set on the class at class declaration time.
2019-10-30 12:35:23 +00:00
Nicolas Martinelli 855b29b6d0 [FIX] point_of_sale: cash balance
- Go to POS application
- Click on the 3 dots of the session to open configuration
- Remove the "Cash" payment method and just keep "Bank"
- Open the session, proceed to a sell and close it.
- Try to open the session either clicking on "Close" on the kanban card

`CacheMiss` error.

opw-2116470

closes odoo/odoo#39570

X-original-commit: 62cb92644de3cfa6e7864583d1efcaf5821f05e4
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-30 12:06:01 +00:00
jvm-odoo a7bf579008 [FIX] sale: fix down payment missing tax and product UoM
In the sales modules, set a down payment product with a different UoM
than the default one.

If you create an invoice, select the down payment option, click on
create and view.

Before this commit:

    - The down payment tax & UoM are not on the invoice line

After this commit:

    - They are on the invoice line, like in V12

OPW-2086146

closes odoo/odoo#39569

X-original-commit: 06db4135d4aabaa7cb2a0d593be2dff11f8c4617
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-30 12:05:31 +00:00
Nicolas Martinelli 19cc72e5ab [FIX] point_of_sale: split check
- Install `pos_restaurant`
- Make an order, choose 'Split'

At validation, an error is raised because the field `mp_dirty` doesn't
exist.

We filter out the non-existing fields sent by the server.

opw-2116461

closes odoo/odoo#39568

X-original-commit: 0c4c5199efca6bc89c6f5d901b921d5af2f95b26
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-30 12:05:10 +00:00
Victor Feyens 79ef674649 [FIX] website_sale: pricelist multi-company
Allow to see a pricelist if its company is in the current companies,
even if not the website company or the user company.

closes odoo/odoo#39560

X-original-commit: 7b3d87b905dff1212f88cc381a125590f5cb0bfe
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-30 09:56:01 +00:00
Katherine Zaoral ebdbdde5a6 [ADD] l10n_ar: activate purhcase suffered perceptions
This ones were inactive by default, we think that need to be active in
order to be able to be added to vendor bills.

Also change the amount from 0.0 to 1.0 of all the perception tax
templates to make it appears in the manual taxes widget when they are
addes to the invoice/bills lines.

closes odoo/odoo#39400

X-original-commit: ff70835db4f6354de62a00dc717682c2835a105c
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-10-25 22:30:14 +00:00
fw-bot 436876c680 [FIX] l10n_mx: add new changes on COA according with the SAT
These changes were announced in the new Annex 24 RFM 2019 [1] and define
the new code for  accounts for the northern border zone. This change affects a
part of the CoA because these accounts were changed from the middile to the
end of the group.

[1] https://www.sat.gob.mx/cs/Satellite?blobcol=urldata&blobkey=id&blobtable=MungoBlobs&blobwhere=1461173776384&ssbinary=true

closes odoo/odoo#39556

X-original-commit: cb163992ff5aea0d5e0dff7d31c38fc50ec52ab6
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-30 09:03:34 +00:00
fw-bot 72febff707 [FIX] tests: ensure that previous user is logged off in authenticate
In some case, a browser_js test with login "None" following a browser_js
test with a defined login could result in the second test being executed
with the previous user.

This was caused by a race condition, a request response comming back
to chrome just after browser clear, restoring the old cookie.
(All odoo request have the set_cookie flag set in order to refresh
cookie timeout)

The solution here is to check one more time for cookie in authenticate,
but also to remove HTTPCase session from session_store. This will
only be effective when calling browser_js without login in the same
HTTPCase .

closes odoo/odoo#39525

X-original-commit: 218db53b9da1573dc18610678de3b7f763531c60
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-10-29 15:57:39 +00:00
ryv-odooandMichaël Mattiello 4ed2bd4abf [FIX] survey : random question count not editable
We can't edit the random question count field from the survey form (in
list widget). Change the function which compute the colspan
of a field (during edition).

TASK_ID : 2075216

closes odoo/odoo#39549

X-original-commit: 61d61348d3e5abf852edb692bb412f177ae5e167
Signed-off-by: ryv-odoo <ryv-odoo@users.noreply.github.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
2019-10-30 06:35:07 +00:00
Nicolas Martinelli 5074430bfb [FIX] stock_account: valuation zero quantity
Do not attempt to create a valuation layer if the quantity is zero,
otherwise this will crash:

https://github.com/odoo/odoo/blob/8777f525ced87890242e1c73cac55c70444de351/addons/stock_account/models/product.py#L291

opw-2115764

closes odoo/odoo#39526

X-original-commit: 1225d029b6a915280ce83f2ff555e0d8692c3e12
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-29 15:57:58 +00:00
Jeremy Kersten 931e62fa91 [FIX] website: switch page_id from menu on cow
Before this commit, if you had a page_id set on a menu, and that you
fork this page, the page_id from the menu was always pointing to the
previous one, so you see old page, but edit new page.

> Reproduce:
>     Fork Contactus (Page_id on menu become wrong)
>     Refresh contact us (done on save btw)
>     You see old content
>     Edit with Html Editor, you sill see that forked view exists!

Bug was hidden before that we set page_id on menu, but it is needed if
we want to support the groups visibility on the menu item.

closes odoo/odoo#39472

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-29 16:41:57 +00:00
Jeremy Kersten e239934abe [FIX] website: allow to modify the visibility of a page
Now, you can define a Visibility mode between:
    Public (All poeple)
    Connected (Portal or Employee)
    Restricted Group (Has this group or is Employee)
    With Password (Know password or is Employee)
    Internal Users (Is Employee)

It is a 'fair' feature, but without really warranty that the content is
really unreadable via others methods, ...

It is more for frontend display, that real secret. Dont use this like
a keychain ;)

We only catch the visibility on the main view and not the t-call inside.

Even if it should work on controller too, it is only display now on the
page property menu. (Or on the view directly in backend)

task-2091365
2019-10-29 16:04:47 +00:00
fw-bot fd06a7fe14 [FIX] profiler: be more pesimistic
The profiler was too optimistic. If the local variable self was not a
cursor, it assumed it was automatically an Odoo model.
Instead, only do the custom tracer methods when self is an instance of
BaseModel.

Full scenario to reproduce explained at odoo/odoo#39237

In case a method like the default_get of utm.mixing was profiled, the
tracer crashed when evaluating `__bool__(request)`.
The tracer considered self as an Odoo model while it was a werkzeug
instance with its custom __getattr__ that crashed while trying to
retrieve the content of `_name`.

Fixes odoo/odoo#39237

closes odoo/odoo#39524

X-original-commit: c8fa8fb067dcfb15330acde35d66ac41a255f669
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-29 15:57:20 +00:00
Lucas Perais (lpe) 0562940f2c [FIX] mail: dicuss can save favorite filters
In discuss, make a search with some stuff, and try to save
that filter as favorite

Before this commit, there was a crash, because the Discuss action
did not implement what the controllers do to save favorites.

After this commit, it is possible to save a filter as favorite

OPW 2087258

closes odoo/odoo#39519

X-original-commit: 5514a414324675bf5c2cc0360e429a7d2548b16f
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-29 15:16:17 +00:00
Hardik Prajapati 72fa7d7015 [FIX] account: added separator in res.partner search view
after this commit :
added a separator at the end of the inherited view

task - 2082289

closes odoo/odoo#39506

X-original-commit: 8777f525ced87890242e1c73cac55c70444de351
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-10-29 11:51:07 +00:00
jvm-odoo c22b5a7f4d [FIX] website_sale: fix ecommerce product variant image
On the e-commerce app, you can add product variants.
Those variants can have extra-image.

Before this commit:

    - The variants extra image are displayed on every product of the
      same type and they are duplicated on the product variant.

After this commit:

    - They are displayed only on the concerned product variant,
      without duplication.

OPW-2088261

closes odoo/odoo#39502

X-original-commit: 8efaa086db271cde792da77bca7a95a0d593df4d
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-10-29 10:55:17 +00:00
Florian Gilbert 5210929b37 [FIX] account: Adapt the tour for invoicing and accounting.
The reason of this fix is that we reference some account accountant menu
in the invoicing menu and if you are not in enterprise version with
accounting installed, the tours don't work.

The tours are adapted for each versions.

closes odoo/odoo#39104

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-10-29 10:58:47 +00:00
Goffin Simon 3ba8231733 [FIX] purchase: Purchase report wrong qty_to_be_billed
Steps to reproduce the bug:
- Let's consider product P with purchase_method = 'purchase'
- Create a purchase order PO and puchase 20 units of P to a vendor
- Confirm PO and create a vendor bill VB the 20 units of P
- Validate VB
- The invoiced quantity on PO is 20
- Go to the Purchase report and analyse the qty_to_be_billed

Bug:

The qty_to_be_billed was still equal to 20 instead of 0

opw:2091264

closes odoo/odoo#39493

X-original-commit: b00febedef7826f593bb07c7896595ecce8cae32
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-10-29 10:08:49 +00:00
Pierre Masereel 5ce1b759ca [IMP] delivery: archive delivery carrier
Since the field active hase been removed from the form view of carrier
we were not able to archive it from there anymore.

So we've added back the 'active' field in invisible on the form view,
and also added a ribbon on archived records.

closes odoo/odoo#39498

Task-id: 2115880
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-10-29 09:58:07 +00:00
Nicolas Martinelli 2bdb85c59c [FIX] point_of_sale, stock: do not crash if no email set
- Create a POS user for which the corresponding partner has no email
  address.
- Connect to the POS with the created user
- Sell a product which creates a picking (e.g. Customizable Desk)

The picking is created in draft and not validated.

This is due to:

https://github.com/odoo/odoo/blob/6435b27c35faeafca452d26fa7fd50a7fe964029/addons/mail/models/mail_thread.py#L2199

We disable tracking and post the message as `sudo()`.

opw-2091808

closes odoo/odoo#39490

X-original-commit: 972b4bad55e76500847a525459865b81d6ad2ee0
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-29 09:23:09 +00:00
Nicolas Martinelli baa243bb46 [FIX] stock_account: value extra move MTO
- Create 2 products A & B in MTO, B with 'Buy' route + supplier
- Create a BOM for A: 1 Unit of B
- Create a MO for 1 Unit of A
- In the PO created, change the quantity from 1 to 2, receive the
  products
- In the MO, produce the unit and use 2 units of B

The extra move of B is not valued.

This is because the list of move to value is created before calling
`super()`. Indeed, the extra move is created in `super()`, and
moreover since this extra move is MTS (not MTO), the move line is
properly linked to the right move (unlike in #39121).

We add the extra move to the list of moves to value.

opw-2087592

closes odoo/odoo#39484

X-original-commit: 00737ffeb8604f1713b559fbd3061b572435b413
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-29 08:15:42 +00:00
oco-odoo 54d846ab1c [FIX] account: tax report lines: use new syntax env.company instead of env.user.company_id to get the default country of a tax report line
closes odoo/odoo#39471

X-original-commit: d62d4e198368a14dff50fd16f391f18c9ceec422
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-10-28 17:21:26 +00:00
Joseph Caburnay 46a897dead [IMP] delivery: clean the shipping methods config
The shipping method configuration (with carrier) is a bit messy,
with a lot of fields which have been added => reorganize the fields
and the view to add coherence (on each carrier + between the different
carriers) and improve ease of use.

closes odoo/odoo#38052

Task-id: 2046300
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-10-17 10:24:44 +00:00
Xavier Morel a480398bf3 [FIX] SSF: modifier based on m2m value
m2ms are internally represented as "6" commands, however in domains
it's possible to compare an m2m value to a list of ids (to
investigate: whether this is an artifact of internal webclient repr or
part of the real contract).

Add a workaround in SSF modifier computation to convert the m2m
command storage to a simple ids list.

A better fix would probably have been to represent the m2m as a list
of ids internally (and only convert on load / save) however it not
completely trivial as it has to be done recursively in order to
properly handle an m2m inside an o2m. So it's a complete change of the
internal data model (which should probably go alongide more
fundamental changes e.g. properly handling parent refs, etc...)

Also add very minor support for widgets (mostly so it's possible to
set widget=many2many on an o2m field).

closes odoo/odoo#39467

X-original-commit: 927979beff9e5d4f6c88078862779eaa88f4e07d
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-10-28 16:03:39 +00:00
Victor Feyens 7720bb21ed [FIX] purchase: sections and notes.
https://github.com/odoo/odoo/pull/34737 didn't go in enough depth to
ensure sections and notes don't break purchase flows.

closes odoo/odoo#39474

X-original-commit: 1e8ea4f5628878dbc667c27d4e76ab42d3f140ea
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-10-28 18:04:23 +00:00
Swapnesh Shah 198f0df814 [FIX] sale: Set default value for sales_count
Fixes https://github.com/odoo/odoo/issues/39431
Assigning default value for non-stored compute fields is required in 13.0

closes odoo/odoo#39468

X-original-commit: b00c9b982241d83f07e03b10851cc55884e3c2fc
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-28 16:35:11 +00:00
Victor Feyens fe83659dbf [FIX] stock: lot default company.
closes odoo/odoo#39464

X-original-commit: d0cd57c90bcfdcf98698a68acabdc72001406d13
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-28 15:48:20 +00:00
Christophe Simonis 7aa813d023 [FIX] sale_timesheet: force empty context in defined action
Helps module upgrade.

closes odoo/odoo#39461

X-original-commit: d6a69c1ddf1fd8219057bf8f47f271ea5ac95b23
Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-10-28 14:58:57 +00:00
Lucas Perais (lpe) 1d40e94011 [FIX] web: calendar: fetch records in right timezone
Before this commit, the calendar searched records on the wrong time ranges
which did not take into account the timezone of the user
It obviously resulted in some records not being there

After this commit, all the relevant records are fetched according to the right
time range in UTC, corresponding to start/end of the week/month/day of the calendar

OPW 2076114

closes odoo/odoo#39466

X-original-commit: 0f10927efe490bd82e7c23e0fc646dd6c8de2d27
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-28 15:49:14 +00:00
fw-bot b973577803 [FIX] payment_stripe_sca: include payment reference in dashboard
Makes it easier for users to match Odoo payments with information
from the Stripe dashboard.

closes odoo/odoo#39465

X-original-commit: 0a55cb29542da20bb9d0543e2b30d125124f861b
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-10-28 15:48:55 +00:00
Damien Bouvy b87a0ba88f [FIX] payment_stripe: correct tests
Adapt the API changes in Stripe. Use correct test data existing in
Stripe dashboard for our test account.

closes odoo/odoo#39455

X-original-commit: 4dab64285ab410f239935437b273a0c97951e902
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-10-28 14:16:50 +00:00
Joseph Caburnay 4d91d008c2 [FIX] point_of_sale: pricelist_id in available_pricelist_ids
When Pricelist is activated in the General Settings, pricelist_id field
is now available in the form view even if the use_pricelist is False.
This means that pricelist_id field should be independent from
available_pricelist_ids when use_pricelist is False. The value of
available_pricelist_ids becomes a restriction to pricelist_id when
use_pricelist if True.

closes odoo/odoo#39454

X-original-commit: 98b778de85668d87f2cd2dfc687c2b4c28474b0a
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-10-28 14:16:15 +00:00
Robin Heinz 8e3be15025 [IMP] point_of_sale: Add langage for cutstomer details in pos.
Now we can change the language of the customer inside the POS front end.

closes odoo/odoo#37195

Task-id: 1917704
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-10-28 13:34:20 +00:00