Commit Graph
132395 Commits
Author SHA1 Message Date
qsm-odoo d7f4289166 [FIX] web_editor: prevent setting values of non-activable methods
closes odoo/odoo#41404

X-original-commit: 6af602fa676db19260a828a3cfd0befe3ba1ef4e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-05 10:59:48 +00:00
qsm-odoo b62b686066 [FIX] web_editor: fix some design issues with editor left panel
- Some layout broken when a scrollbar appeared
- The edit icon of background disappeared when the filename was too long

X-original-commit: d3419fed27147c92e673fb367657db8865a0d538
2019-12-05 10:59:47 +00:00
wan 24db4805c6 [REV] web: unwanted logs and debugger
Some debugging lines were introduced in https://github.com/odoo/odoo/commit/30cf7bc798ddede8e610001146f4a76352aa582f
Those should be removed

closes odoo/odoo#41400

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-12-05 11:48:47 +00:00
lejeune quentin f0b445d24c [FIX] point_of_sale: Cleanup computer after build of IoT Box
We must delete the folder "MOUNT_POINT" before the "zerofree"

closes odoo/odoo#41399

X-original-commit: 4dffb76fab1a44eb79b2770100eef000ef23a9e5
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-12-04 14:20:02 +00:00
Nicolas Martinelli c593c468b1 [FIX] account: sequence of AML
When printing an invoice, the order of the lines not always match the
order in the interface.

It occurs because `account.move.line` contains a `sequence` field which
is taken into account in the UI but not used in the report. Note that
commit 0a5955bff6 explicitly removed from the `_order`.

opw-2145878
opw-2147922

closes odoo/odoo#41396

X-original-commit: f4571e2fe0f30d753172ce1fa1dc40d93b87e00a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-12-05 08:43:06 +00:00
Victor FeyensandIgor Ishchenko 1bff1987bb [FIX] sale: fix field to check if invoice is paid
The state field does not contain any information whether an invoice was
paid or not. This info is stored in the invoice_payment_state field.
This change fixes the field used in the customer-facing template to
display the payment status of the invoice.

closes odoo/odoo#41394

X-original-commit: d1d83ee53c8274c1cb44f1cd7440e73a9eba9bef
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Igor Ishchenko <igor@cruxlab.com>
2019-12-05 09:27:02 +00:00
qsm-odoo 8180b46563 [FIX] web, web_editor: improve browser support for JS lazy loading
opw-2125858

closes odoo/odoo#41371

X-original-commit: d19982b7a22b04ab76c787b9adfffd24552eb5c0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-04 16:40:03 +00:00
Alexandre Kühn 6245ed2bce [FIX] bus, mail: navigate from tests with mocked bus services
Before this commit, when navigating from test environment (e.g.
page reload), it crashed with following error:

`TypeError: Cannot convert undefined or null to object`

This error comes from mocked bus services in tests: even when they
have been destroyed, they handle the window event 'unload'. They
no longer have a parented parent, so `this.call()` returns
`undefined`, hence the crash.

This commit prevents mocked bus services to listen on window 'unload'
event. Tests must always simulate this window event by explicitly
calling the handler.

closes odoo/odoo#41378

X-original-commit: fd08d04f0a24fea52e7b668b90aec48b33d349a3
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-12-04 14:46:28 +00:00
Daniel Blanco 46b1218094 [FIX] l10n_cl: taxpayer type and sequences of document type
Description:
- Add readonly attribute to partner view for l10n_cl_sii_taxpayer_type field for children res.partner records.
- Fix the tax payer type label to prevent usage of "label for.."
- Optimize document type order to put most used on top of file and in selection of document types during invoicing process

closes odoo/odoo#41372

X-original-commit: 4162b9b618ffe62548e9a1d5ae3c0fdd604a1395
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-12-04 17:21:15 +00:00
Nans Lefebvre 09908b736f [FIX] base: when saving settings, only reset environment if modules were installed/uninstalled
Execute the tests from ea574fe9ff644 and 9e9ac5ced80b30,
which are in a SavepointCase.
The second test fails on a cache_miss.
Whats happens is the following:
 - the second test starts with the environment from the beginning of the
   first test. However its envs has a reference to environments that
   were created during the first test.
 - when computing the field, the ORM finds the value in a zombie
   environment, so does not recompute it
 - when trying to get the value, the value is not in cache

The issue is that going through res.config.settings's execute resets the
envs.

One solution is to put:
    self.addCleanup(lambda: setattr(self.env.envs, 'envs', envs))
in SavepointCase's setup.

However in that case the reset is not needed at all:
it's necessary only if there were some modules to install.
Unfortunately to_install and to_uninstall are not symmetric:
to_uninstall contains only modules that should be uninstalled, whereas
to_install contains everything, and only filters later what actions
really need to be performed.

In this case, we can rely on the result of the installation process.

closes odoo/odoo#41126

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-12-04 14:09:56 +00:00
Nans Lefebvre ba5b77427d [TEST] account: remove group from all users when removing settings
Initial issue solved by 3eb06a27da
We keep the test since it ensures that settings can be saved properly.

X-original-commit: 2c1b92f626edaf89c93c3bd96d656aa77c580c69
2019-12-04 14:09:40 +00:00
Florian Gilbert ed26e9eafa [IMP] account: Various usability improvements
List of improvements:

Invoice/Bill
- Hide "untaxed amount" section when there is no tax.
- Remove tooltips for tax groups field.
- Remove invoice_partner_icon and set this icon in "Vendor" (in a list view)

Chart of Accounts
- Same views for config bar and regulare one
- By default don't show deprecated accounts and add filter to display them.
- Add some optional fields in list view (taxes, tags, ...)

Dashboard opening balance wizard
- The opening move entry date equals to the opening date - 1 day.

Bank Statements
- Set default order for the list view (by date desc and name desc)

Tax report configuration:
Add 3 new columns for the list view (country_id, code, tag_name)
Add 4 new searchs (name, tag_name, code, country_id)

Task ID: 2048225

closes odoo/odoo#38694

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-12-04 13:47:28 +00:00
Raphael Collet 51d020e5fa [FIX] models: query blowup when unlinking many records
The method `unlink` checks whether any of the records to delete is used
as the default value of a company-dependent field.  The query simply
blows up when deleting several millions of records.  The fix consists in
performing the check in batches.

closes odoo/odoo#41331

X-original-commit: 30e8b8f2554e5d16b19f16ea90e3503098dc98a0
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-12-04 08:46:08 +00:00
Patrick Tombez bf250a33f0 [FIX] payment: Keep session serializable
Fix error like "TypeError: {4} is not JSON serializable" when
serializing the session object (e.g. for external storage)

closes odoo/odoo#41360

X-original-commit: e91e38fa4bd12ba9d2027e7778a10252e08b9a86
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-12-04 09:04:29 +00:00
Nicolas Seinlet 7fc372a048 [FIX] stock: always prefix fields of sql views
If a module add a state field on another table used by this report,
PostgreSQL will report a:

```psycopg2.ProgrammingError: column reference "state" is ambiguous```

closes odoo/odoo#41350

X-original-commit: 16ae8aed10c72586a3a3e8b7484099263b0d7804
Signed-off-by: Nicolas Seinlet (nse) <nse@odoo.com>
2019-12-04 12:35:47 +00:00
Simon Lejeune 0e4e21a1e7 [REF] stock: remove quantity_available_locations_domain context key
- we would have to set this domain on every actions directing to
products
-we can't set a proper depends_context since the new orm doesn't support
it

closes odoo/odoo#41322

Related: odoo/enterprise#7033
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-12-04 12:49:25 +00:00
Simon Lejeune 447cc7b88c [REF] stock: remove company_owned context key
This context key was used to get the valued quantities. We now have a
`quantity_svl` computed field that does this job. The test is removed,
it was showing that intercompany quants are visible thanks to a context
key but with the introduction of the on_hand filter, it is now useless
(just remove the filter)
2019-12-04 12:34:40 +00:00
Jigar Vaghela 616864e968 [FIX] l10n_in: Fix tax grouping key
tax grouping key from base and tax line that will be used as a key to group taxes together
so both functions must have the same dictionary key. (you can check comment here https://github.com/odoo/odoo/blob/13.0/addons/account/models/account_move.py#L412)

here we have three key (product_id,product_uom_id,quantity) in _get_tax_grouping_key_from_base_line
and only one key (product_id) in _get_tax_grouping_key_from_tax_line

so we get wrong tax calculation

now we remove that extra key(product_uom_id, quantity) because we don't need group by these key values.

closes odoo/odoo#41340

X-original-commit: a758e5eace55bad0c11f8a27ba83e8367d293487
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-12-04 10:41:06 +00:00
nje-odoo 087131fe54 [FIX] sale_timesheet, website_sale: fix UI and tooltip typos
task-2121584

closes odoo/odoo#41339

X-original-commit: 565f42cb0ac32185cfaed1454a0fda2a54b3bec2
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-12-04 10:36:19 +00:00
Sébastien Theys 61e66efbbe [FIX] utm: correctly set scss url as absolute
closes odoo/odoo#41320

X-original-commit: b25922f77279eaf09800486954fe79b246ea105b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-12-03 17:38:26 +00:00
wan fefe7b7507 [IMP] l10n_id: translate in english
Task 2148441
The main language is now english, translated in indonesian.

closes odoo/odoo#41266

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-12-04 08:52:37 +00:00
Lucas Perais (lpe) 1d98547c08 [IMP] web: static inheritance: primary root node is the master node
Before this commit, when doing a primary inheritance
the root node of the resulting template was the one of the inherited template

after this commit, the root node of the resulting template is the one defined
on the inheriting template

closes odoo/odoo#39452

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-12-04 13:06:56 +00:00
Lucas Perais (lpe) e237ba26f7 [IMP]: web, tools: static inheritance do not disclose t-inherit* directives
Before this commit, when a template was inheriting from another
the template mentionned its t-inherit

This has been deemed overkill as the information is irrelevant to the caller
i.e. the caller just wants the template and doesn't care how they've been computed

After this commit, only t-name and attributes not related with inheritance
are disclosed

[FIX]: base: static inheritance propagates other attributes

When doing a inherit in primary mode, the original attributes on the root node of
the inheriting template were not propagated

After this commit they are
2019-12-04 13:06:54 +00:00
Lucas Perais (lpe) 96ab29c987 [IMP] web: template inheritance respects XPATH specs
At the conception of this feature it has been intentionally thought that
the behavior for static templates should resemble
what is done for ir.ui.view
While keeping the general previous behavior (and this is important)

A little bit of context for ir.ui.view
They are defined as XML's, but end up as python objects
Their meta-data (id, name, inheritance specs...) are thus
present in their XML definition, but end up as part of python objects members
Hence, the final, business, usable arch is free of those meta-data
and is left only with business-relevant dom nodes

The static inheritance feature was backed with those ideas
but inherently encountered the issue that, for them,
the meta-data also end up in the business dom, since
they are at no point considered as plain objects.

Decision has been made, back then, to exclude the root node
that holds the metadata, to be at all targeted by any XPATH

This decision is now challenged as the specs of XPATH should be respected

This commit consequently introduces the root node as any other
It can be replaced, and will be targeted by
`expr="."` or `expr="//NODE_TAG"`

The few attributes that are necessary to define them are kept across
inheritance cycles though.
2019-12-04 13:06:52 +00:00
Simon Lejeune 1ae66862d5 [REF] stock: products on hand action
Instead of hardcoding a domain in the action, we add a field that will
be used to apply the domain. The goal is to be able to define a static
domain in the xml so we'll be able to default on the filter while still
being able to remove it.

Let's consider this usecase:

     Physical
    |        \
   WH    Subcontracting
    |         |
  Stock    5 units
    |
 10 units

With the hardcoded domain, we have two problems
- the right part of the tree isn't visible
- the user can add a quant in subcontracting but it will disappear at
  the creation since it isn't part of the hardcoded domain.

The complicated part of the domain is the `_get_domain_locations` call.
It will use multiple context keys, the current company and get the
hierarchy of internal locations below warehouses to see what it should
include or not.

To be able to remove a domain, it should be declared in the xml and not
hardcoded in the action. Since the domain is complex, we can't express
it. So we add a computed field "on_hand" and its search method is
overiden to call `_get_domain_locations`.

task-2061825

closes odoo/odoo#40403

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-12-04 10:59:59 +00:00
Simon Lejeune 53658052ae [REF] stock: forecast report and quants not below a warehouse
On a quotation, the forecast report is opened with a default filter on
the warehouse of the quotation. If you remove this filter, quantities
not below warehouses (eg in subcontracting or in a repair location) are
displayed. From the product form, it's not the case, you never see these
quantities. We now add a "warehouse is set" filter that is enabled by
default (so you have the same value in the stat button forecast and in
opening the report) but you can remove it to see all quantities.

task-2061825
2019-12-04 10:40:00 +00:00
Simon Lejeune 4afba9ee68 [REF] stock: quant: add available quantity field
available_quantity is the quantity without the reservation.

task-2061825
2019-12-04 10:40:00 +00:00
Robin Heinz 3ab841bd41 [FIX] account: Access cash rounding
In order to see the fields profit_account_id and loss_account_id, we had to be part of the group_account_user which is not available when the module accounting is not used.
Now, to be able to use it when invoicing, we change the group to the group_account_invoice.

closes odoo/odoo#41310

X-original-commit: 164f6ac809473b8c9f31913113249b26b3432fff
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-12-03 14:20:31 +00:00
Robin Heinz 42425996e3 [IMP] point_of_sale: Use the cash rounding in the pos
Because of the law of the 1st december 2019, we can't pay with 1 or 2 cents anymore.
We have to round the total price to the 0.05 unit.
If the customer pay without rounding values, it triggers an error.
Before the order is finalized, we add a line with a product rounding to round the total amount.

Task-id: 2035010
X-original-commit: 58477e5503a18cc98fe686f8857233063eb26f4c
2019-12-03 14:20:31 +00:00
Nicolas Martinelli aab5cab129 [FIX] website: do not translate robots.txt
opw-2148101

closes odoo/odoo#41306

X-original-commit: 486de449e3a9b1099f917bb345adcb3b628d581b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-12-04 07:01:55 +00:00
Nans Lefebvre 482338cb46 [TEST] account: add performance test
A simple test to easily check performance of the reconciliation.

opw 2121587

Co-authored by: François Honoré <francois.honore@acsone.eu>

closes odoo/odoo#41272

X-original-commit: 616c7d4252b30cee0a17ac776a17b626ee815c74
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-12-03 09:38:32 +00:00
wan 30cf7bc798 [IMP] account: add account.reconcile.model.line
Task 2046908
Instead of having all the fields duplicated with second_*, we have now a
o2m allowing us to
* have more than 2 lines
* reduce duplicated code
* fix bugs and add features at only one place

We also remove the computation of writeoff and suggestions from the
client side as some code was 4-upled before (twice in in client and
twice in server side). The logic is now only at one place.

closes odoo/odoo#38119

Related: odoo/enterprise#6324
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-12-04 08:37:19 +00:00
Nicolas Martinelli 363959784e [FIX] stock: duplicated lines
The only good solution is to set `show_reserved` to `True` to avoid any
kind of weirdness...

This reverts commit eed3171f2f057223c3fbedd95ce6bcde2124f46c.

closes odoo/odoo#41303

X-original-commit: de962efb8a531c69c098ae1706aa5c99d34a808a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-12-03 14:46:37 +00:00
Nicolas Lempereur 433cfe66e5 [FIX] account: liquidity-line currency journal ok
If we do a payment with:
- a currency different than the journal
- the journal currency the same as company currency

=> it fails, because of the constraint on account.move.line:

> The amount expressed in the secondary currency must be positive when
> account is debited and negative when account is credited.

with code:

```
CHECK(currency_id IS NULL OR company_currency_id IS NULL OR
((currency_id != company_currency_id) AND {conditions on balance}))
```

This happens because in this use case, a NON-NULL currency_id means that
the currency is different than the company currency, this was not taken
into account when creating a liquidity line.

opw-2150267
closes #41244

closes odoo/odoo#41278

X-original-commit: f9d75e3a5442162538c727eb7e4f111c9b792104
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-12-03 10:46:18 +00:00
shreya thakrar 4b73bd25a9 [IMP] doc: form view documentation improvement
Using studio odoo doesn't let user drop notebook in a group since it
generates issues with the notebook. (See https://github.com/odoo/enterprise/commit/ea5ccd548bb6781e5ccdf76cf11255c6fd6aa3cb )

For better understanding, a note for 'notebook' tag is added by this commit.

task -  2060330

closes odoo/odoo#41264

X-original-commit: a2d331af0df859fd29e84bfa30a9086c3d2e0fa8
Related: odoo/enterprise#7009
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-12-03 08:55:00 +00:00
shreya thakrar 780f9d1423 [FIX] payment: move notebook outside group
Usually in a form view, a notebook is not placed within group/s.

Also, using studio we don't let user drop notebook in a group since it
generates issues with the notebook.(See https://github.com/odoo/enterprise/commit/ea5ccd548bb6781e5ccdf76cf11255c6fd6aa3cb)

This commit fixes the issue by moving notebook out of the group and making
the 'payment.icon' form view structure consistent(and properly
editable with studio).

task - 2060330

X-original-commit: c4efe0173478be8b6a643d5fefef4244384ea6c2
2019-12-03 08:55:00 +00:00
wan f9a9c1a9f0 [FIX] account: multi-post in order
When we post multiple draft moves at the same time, the numbering should
be done by starting with the oldest one up to the newest.

closes odoo/odoo#41138

X-original-commit: 5b745eb61377e5b4532f2e370f9b1559a9b66c0a
Related: odoo/enterprise#6975
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-11-26 09:41:07 +00:00
Nicolas Lempereur 7c4628b1f4 [FIX] base: render with page-break => ok encoding
If we have eg. a report with a page break (eg. `Print On New Page`
enabled on a financial report section) the encoding is broken.

The reason is that lxml.html fragments_fromstring function accepts text
string (OK in unicode) or bytestring => the encoding will be guessed (by
chardet library) if guess_charset argument is set to true.

So since we do not pass guess_charset option, the encoding is not
recognized.

In this changeset, we give a text string to the fragments_fromstring
function since it seems that all our input should be in UTF-8.

note: lxml.html itself uses html5lib.HTMLParser parseFragment that takes
a charset argument, but there is no interface through
fragments_fromstring to specify the charset.

opw-2146715
closes #41255

closes odoo/odoo#41289

X-original-commit: 1d3d517aad08887970e4ba2d9290e260faacae2d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-12-03 12:41:39 +00:00
David Beguin 9830d924e9 [FIX] website: fix authentication of archived visitor
If a visitor logs in (and has a visitor_id in his cookie), the partner will be
linked to the visitor. If, after 1 week, the visitor tries to connect again
with a different session (or another visitor_id in cookies), the authenticate
will crash because

  * _cron_archive_visitors applies on visitor inactive since at least a week
  * there can be only one visitor per partner (sql constraint)
  * the visitor linked to the partner is not retrieved (because archived) and
  we try to link the partner to a new visitor.

Further than that, if the visitor is archived and the linked partner wants to
login again with a new visitor_id, we should

  * reactivate the previous visitor,
  * copy history from newest to previous one,
  * delete the newest one

Note that last two points were already done before this commit.

Task ID: 2120464
PR #40199
Fixes #40077
Fixes #40301

closes odoo/odoo#41273

Original-signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
X-original-commit: 53a6bed3b5c1ae09be490254ed09f18acbb970c4
Signed-off-by: David Beguin <dbeguin@users.noreply.github.com>
2019-12-03 08:34:32 +00:00
Victor Feyens e7fba2e8a1 [FIX] product: correctly pass pricelist arguments to recursive calls.
When computing the price of a product through a pricelist item, if the
item was based on anotherp pricelist, the dates and uom weren't given to
the subsequent method call.

As the majority of the calls to those pricelist methods put all their
arguments in the context, it wasn't noticed until now.

Functional example:
Pricelist A:
Rule A1 : 10% discount on Pricelist B, from day 3 to day 6.

Pricelist B:
Rule B1: 5% discount on Sales price, from day 3 to day 6,
Rule B2: 10% discount, from day 7 to day 9.

If today was day 8, the call to pricelist(A)._compute_price_rule(day=5)
would use rules A1 and B2, but should have used rules A1 and B1.

closes odoo/odoo#41295

X-original-commit: df9b113805ed28f274711bb4ba0dd9a2610e5035
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-12-03 14:28:53 +00:00
Josse Colpaert 5d70e17c17 [FIX] l10n_nz: adapt nz tax report to the multiple tax report model
closes odoo/odoo#41291

X-original-commit: 81eb531009ccc7acc11ef18791e5bb7f9fee16ae
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-12-02 12:08:18 +00:00
17c4f47b0a [FIX] base: allow custom model to use SQL (materialized) views instead of table
closes odoo/odoo#41267

X-original-commit: f17d389c4625e95f52c299c13a3f2983127c70bc
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Denis Ledoux <dle@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2019-12-03 07:45:25 +00:00
Nicolas Martinelli d17e6a6750 [FIX] stock_picking_batch: default company
Set a default company since it is mandatory and hidden in mono-company
mode.

opw-2129187

closes odoo/odoo#41259

X-original-commit: ffb6360e87ed8b6fbe5ae19a801230d1f89bc660
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-12-03 08:08:49 +00:00
Vincent Schippefilt 4bcad6d546 [FIX] web: fix incorrect test of py utils
Before this fix, a QUnit test was wrong (didn't parse)
After this fix, the test actually works and tests something.

closes odoo/odoo#41257

X-original-commit: 3818a7f0df754717a7379dc8341729b508a166be
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-12-03 09:38:16 +00:00
Xavier Morel ee15b8461d [REM] payment: dynamic domains
Make the domain stricter as well:

* no reason to have / match a token if the payment method is not
  electronic
* don't lose the capture mode
* don't remove the company filter though it's probably not useful (as
  the journal and payment should already be in the same company so the
  check on the token's acquirer's journal should be enough)

The domain used to select the default payment should not matter too much.

Task 2147923

closes odoo/odoo#40959

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-12-03 13:59:25 +00:00
Xavier Morel 4e4813aee6 [REM] l10n_latam_invoice_document: dynamic domains
Note: the original would only set the domain if
`l10n_latam_use_documents` was enabled but even if the fields are not
shown without that it doesn't make much sense to allow any document
type to be selected when latam docs are *not* being used.

In this revision, the document type is always filtered by available
types and that is only non-empty if we're using latam documents.

Task 2147923

closes odoo/odoo#40955

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-12-03 13:11:47 +00:00
Goffin Simon 144523217c [FIX] repair: No fiscal position from repair order
Steps to reproduce the bug:
- Let's consider a fiscal position FP with automatic detection for customer in your country
- Let's consider two taxes T1 and T2 where T1 is mapped by T2 in FP
- Let's consider a product P with T1 as customer taxe
- Let's consider a customer C in your country with no fiscal position
- Create a repair order for C
- Add P as an add line

Bug:

T1 was set as customer taxe for P instead of T2.
When manually creating an invoice for C with P, FP is automatically
detected and T2 is set.

With this fix, the automatic detection of FP is applied on repair order.

opw:2120595

closes odoo/odoo#40856

X-original-commit: 3810f9d96246fbc21297b71c34704e87288eb77a
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-12-03 10:36:53 +00:00
Aaron Bohy ef2d4f6640 [FIX] web: list: do not escape cell titles
Task 2046921

closes odoo/odoo#41251

X-original-commit: d81cadc1a133117b4d692d2a7019e0100d8e411c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-12-03 08:55:11 +00:00
Jason Van Malder bde09810c7 [FIX] l10n_ch: fix isr report crash with studio
Issue

    - Swiss company
    - Install Accounting & Studio
    - Journals > Customers Invoice
        - Communication standard: Switzerland
    - Journals > Bank
        - Swizz account with CHF ISR subscription number
    - Studio > Reports > ISR

    Traceback

Cause

    If the statement of the `l10n_ch_isr_optical_line` compute
    method is False, the value will be `None`.

    In the view, we do a foreach on the value which is `None` and
    it crashes.

Solution

    Set an empty string as default value for the
    `l10n_ch_isr_optical_line` field

OPW-2129122

closes odoo/odoo#41247

X-original-commit: a0dc556b0e04c9e89e7f6a8e4e9af045151614f7
Signed-off-by: Jason Van Malder <jasonvanmalder@users.noreply.github.com>
2019-12-03 07:55:32 +00:00
Laurent Smet 32b2718b3b [FIX] base: Preserve loosing embedded files when printing 1 attachment
With the reload from attachment ticked (attachment_use) when dealing with
a single pdf, the attachment's content must be returned without calling _merge_pdfs
in order to preserve the embedded files. Since PyPDF2 doesn't support completely
the embedded files, there are simply dropped with creating a new pdf in _merge_pdfs even
with a single attachement.

closes odoo/odoo#41246

Issue: https://github.com/odoo/odoo/issues/41079
X-original-commit: a8f96bc7f35d047999cd16b7dd03bcddd3c32263
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-12-02 13:41:34 +00:00