Commit Graph
117515 Commits
Author SHA1 Message Date
Christophe Simonis 7d45e43a13 [MERGE] forward port branch saas-15 up to 6e933e42ef 2019-01-02 13:42:12 +01:00
Enric Tobella c8de59ad2b [CLA] siognature for Enric Tobella
closes odoo/odoo#29593
2019-01-02 10:57:03 +00:00
Christophe Simonis 6e933e42ef [MERGE] forward port branch saas-14 up to a80bde859c 2019-01-02 11:44:07 +01:00
Christophe Simonis a80bde859c [FIX] base: correct res.partner name_search
Oversight of previous forward-port when adapting cc217569b7
2019-01-02 11:12:37 +01:00
Christophe Simonis 015f2582ad [MERGE] forward port branch saas-14 up to 1d672b33a7 2019-01-02 10:50:46 +01:00
Christophe Simonis 1d672b33a7 [MERGE] forward port branch 10.0 up to 9ef7802520 2019-01-02 10:49:56 +01:00
Nans Lefebvre 874425c69e [FIX] stock_account: fix default field value in wizard
Default time was set to default=fields.Datetime.now() instead of
default=lambda self: fields.Datetime.now(),
resulting in a discrepancy when printing the report.

opw 1917523
2018-12-28 15:19:15 +01:00
Josse Colpaert f5fe1f4064 [IMP] l10n_no: Norway tax update, see #28422
closes odoo/odoo#29852
2018-12-27 10:45:53 +00:00
wan 9ef7802520 [ADD] l10n_nl: tax codes for 9%
closes issue #29352
The Dutch taxes will change the low tax 6% to 9% on 01/01/2019. Please add these tax code in the system and also change the affected fiscal positions. Both 6% and 9% needs to exist during the transition period.

closes odoo/odoo#29374
2018-12-18 09:48:41 +00:00
Odoo Translation Bot 076c835544 [I18N] Update translation terms from Transifex 2019-01-01 02:42:55 +01:00
Thibault Delavallée cc217569b7 [FIX] base: fix name_search on res_partner when searching on linked users
Currently name_search on res_partner holds code to be done by a customized SQL
query allowing to speedup the search [1]. However when dealing with given args
there may be a crash if there is a domain based on user_ids fields.

Indeed this field is defined as auto_join [2]. It means the result of get_sql
returns where parameters based on joined tables. Those tables are not available
in the from clause in the original query.

This commit fixes that issue by correctly taking the from_clause from get_sql.
That way joined tables are available. Small update of the query is necessary
as fields are now res_partner.{id/email/vat/reference} as there may be several
tables linked in the query.

A test has been added to avoid regression.

[1] See https://github.com/odoo/odoo/commit/05ec12692f99b69924765fd0ce384632547f03f9 for a recent modification
    and implementation of this query, even if it exists since a looooong time
[2] See https://github.com/odoo/odoo/commit/db8203c27a21acdbcad2cf1c394b6fea3cf13688 for the auto_join addition

closes odoo/odoo#29827
2018-12-21 15:40:32 +00:00
David Tran 6bf8b25b70 [IMP] base: Vietnam Dong should have 1.00 as rounding.
No decimal part in Vietnam Dong (đ - Việt Nam Đồng)

closes odoo/odoo#29650
2018-12-19 14:24:43 +00:00
Denis Ledoux 5856dab380 [IMP] product: name_get, use mapped to gain some memory
This revision is related to
12df3c6a98

The above revision serve its purpose as well,
but by avoiding to store the result in a variable,
and using the records cache instead,
we gain some memory, which is noticeable
when there are hundred of thousands products.

The sudo() is important, as it must be the
same environment then the above call to read
to use the same cache.
Otherwise the values won't be in the cache
of self (without sudo),
and it will go get it and prefetch other fields
in the database.
2018-12-19 18:49:14 +01:00
Denis Ledoux 12df3c6a98 [FIX] product: name_get, products can share the same template
Oversight in revision
a91ffcf1a7

Multiple products can have the same template.

Passing multiple times the same template id
to the search domain to get the sellers
works, but better avoid the repetition
for the performances.
2018-12-19 18:28:23 +01:00
wan 06ad641b0a [ADD] l10n_nl: tax codes for 9%
closes issue #29352
The Dutch taxes will change the low tax 6% to 9% on 01/01/2019. Please add these tax code in the system and also change the affected fiscal positions. Both 6% and 9% needs to exist during the transition period.

closes odoo/odoo#29375
2018-12-18 09:42:42 +00:00
Lucas Perais (lpe) d3e84f80f4 [FIX] purchase: prevent div by zero in purchase.report
Spinoff of 6cd12694d8

OPW 1916964

closes odoo/odoo#29828
2018-12-31 08:47:16 +00:00
Wolfgang Taferner 138550fd2e [FIX] stock_picking_batch: do not lock batch model on transient model
closes odoo/odoo#29722
2018-12-23 07:57:27 +00:00
Odoo Translation Bot 912f88b980 [I18N] Update translation terms from Transifex 2018-12-30 03:12:33 +01:00
Nans Lefebvre 738e60c6eb [FIX] service: fix integrity error display
During the installation of a module, an IntegrityError can be raised,
e.g. if some module data already exists in the database
(as in the case of a module which uninstallation did not remove its data).

In Python2 it was possible to use such a psycopg2.IntegrityError with i[0]
to get its error message, while this raises an exception in Python3,
i.args[0] is needed.

As a result the log would contain an exception within an exception instead of
displaying an error to the user.

opw 1916374

closes odoo/odoo#29787
2018-12-28 14:27:11 +00:00
Andrea fe381f95b7 [FIX] stock: xrange->range in template report_location_barcode
closes odoo/odoo#29652
2018-12-19 15:10:13 +00:00
Anand Kansagra 24b88b6af9 [CLA] signature for anandkansagra
closes odoo/odoo#29709
2018-12-21 15:19:30 +00:00
Odoo Translation Bot 5d237b2037 [I18N] Update translation terms from Transifex 2018-12-23 03:12:41 +01:00
qdp-odoo 4fde773938 [FIX] account: don't propose partial reconciliation on blue lines
Create a vendor payment of 100€
Create a bank statement line with an amount lower than the payment
Open bank reconciliation view
Reconcile the bank statement line with the blue line of 100€, the triangle for partial reconcile appear.
Current behavior:
If you click the triangle, you can reconcile this payment with the statement line but it becomes unbalanced.

Expected behavior:
The triangle should not appear.

Fixes odoo#29654

closes odoo/odoo#29718
2018-12-21 15:53:21 +00:00
Pierre Masereel 696269bbc7 [FIX] iap: handle HTTPErrror and Timeout when contacting iap server
When the iap sever is called, it is possible that the request timeout
or that the webserver returns an error code (if the Odoo server is down
for example) and we should warn the user instead of throwing an
exception in a traceback

closes odoo/odoo#29667
2018-12-21 12:38:36 +00:00
Pierre Masereel f76a45a9d3 [FIX] iap: support dbuuid in authorize requests
In this commit: https://github.com/odoo/odoo/commit/a0b7802a5e7646a896f54cf125f0136ff489d4d9

We've added the possibility to send the dbuuid in the authorize request,
this as been added to allow to give free credits of a service to a
database.

As some services developped in 11.0 are using this mecanism, we have to
add that support in 11.0
2018-12-19 09:14:24 +00:00
Darshan Patel e9765d7f12 [CLA] Darshan Patel
closes odoo/odoo#29691
2018-12-20 16:17:00 +00:00
doun fba4ab8e5d [CLA] signature for doun
closes odoo/odoo#29009
2018-12-20 15:07:51 +00:00
Maxime Chambreuil f651597436 [CLA] Open Source Integrators signs Odoo CLA
closes odoo/odoo#29255
2018-12-20 15:00:14 +00:00
Martronic SA 75acfb1de9 [CLA] Martronic SA signs Odoo CCLA
closes odoo/odoo#29669
2018-12-20 13:01:02 +00:00
len-odoo 9186f433f1 [FIX] web: read records up to list limit
Fine-tuning of commit e7fab23420
In a one2many with more than one page with a limit of k records, add a line l.
It increments the list limit to k+1. Remove a line above (of index <= k).
It will try to load a line l' to replace it, that it will find on page 2.
However when deciding if it should read missing fields on that record, it will
scan at most u records, skipping virtual ids.
Here u is the min between the current number of lines and the list limit
without the temporary increase due to the added record.
Since there are at least two pages, u = k.
However since l is in the list at index k, then l' won't be read, and since it
was on page 2 its data hasn't been loaded.
Therefore the js would traceback when trying to evaluate it.

opw 1913361

closes odoo/odoo#29338
2018-12-19 13:03:46 +00:00
qdp-odoo 3d119415a2 [IMP] account: usability of payments
Backport of commit 771f65ecf5

Payments created without partner_type (field not required)
were previously not shown anywhere, as well as internal transfers.

opw 1910590

closes odoo/odoo#29647
2018-12-19 13:53:28 +00:00
Yannick Tivisse a6f02af1ab [FIX] hr_payroll: Specify a worked day description for global leaves
Currently when recording global leaves on the ressource calendar
the worked line has no code or description, which are required.

Specify a default value to allow the saving of the payslip.

closes odoo/odoo#29655
2018-12-19 16:13:13 +00:00
Yenthe V.G 772b854fcc [IMP] doc: improve wording in profile code docs
closes odoo/odoo#29424
2018-12-19 10:43:22 +00:00
Martin Geubelle 6bb4b6698d [FIX] web: x2m in x2m with different fields in different views
Use case: a x2m (ex: attribute values) displayed in a x2m (ex: attributes on
product) using different fields in different views (ex: tags in product form view
and list in product attribute form view). When opening the x2m record (in a
wizard) then going back on the form view, the tags are empty because the
`display_name` value has been lost when fetching x2m for the second time.

In this case, the list `fieldsInfo` needs to be updated with the existing
(default for tags) one so all the fields will be correctly loaded.

Task 1916891

closes odoo/odoo#29598
2018-12-18 09:45:07 +00:00
Denis Ledoux a91ffcf1a7 [IMP] product: product & template name_get performance
By prefetching only the fields required for the `name_get`

`product.product` & `product.template`
have a huge number of fields,
and prefetching them just to compute
the name is overkill.

Especially, as the browse was done using
sudo, the prefetch was a bit useless as
it was stored in the sudo user cache,
which was most-likely not used afterwards
by the callee of name_get

For a database with 50.000 products,
this reduce the processing time
by 15 (from 60 seconds to 4 seconds measured)
2018-12-17 15:00:45 +01:00
Martin Geubelle b0b9d028a6 [FIX] web: handle context key in calendar reload
When filtering the calendar view on search filters, the filter `context`
was not taken into account during the reload.

For example, in the Calendar app, the filter 'My Meetings' has a `context`
{'mymeetings': 1} which was not passed to `search_read`.

Task 1917628

closes odoo/odoo#29531
2018-12-13 20:21:23 +00:00
Jorge Pinna Puissant 8fe7229e19 [FIX] sale_stock: fix onchange product_uom_qty
opw-1916064

Have a sales order line on which you decrease the quantity.
Before, this commit, the warning message that says to update the
delivery order did not show. This was because, the onchange in the
python side compared the new quantity against the saved one, and did
not find any difference. This is caused by the onchange itself, which,
in a o2m setting, received from the JS, the changed order
(already containing the changed line) and only then proceeded to the
onchange of the line. The first operation wrote onto _origin the new
line value, which corresponded subsequently to the new value.

After this commit, we compare the real value explicitly retrieved from
the database to the one just entered by the user as an onchange.
The warning message works as expected.

Long story short, _origin in an onchange doesn't guarantee to yield
persisted values in all cases.

closes odoo/odoo#29582
2018-12-17 14:31:47 +00:00
Nicolas Martinelli a473a1bb88 [FIX] account: incorrect exported term
Manual forward-port of #29525.

opw-1908337

closes odoo/odoo#29526
2018-12-13 17:20:59 +00:00
Odoo Translation Bot 439e818953 [I18N] Update translation terms from Transifex 2018-12-16 03:13:51 +01:00
Nicolas Martinelli 8373bafbc2 [FIX] account: missing translation
- Install a second language, e.g. French
- Set Parter A language to French
- Create an invoice for A with a date due in the past
- On the partner form view, print the 'Due Payments'

The body of the letter is not translated in French.

Something quite weird appears:
- The corresponding string is exported in the `stock` module
- It is linked to the demo data `stock.res_company_1`, which corresponds
  to 'My Company, Chicago'.

Therefore, the translation cannot be found by the corresponding query
generated in `_generate_translated_field` and `_read_from_database`:
```
SELECT "res_company"."id" as "id",COALESCE("res_company__overdue_msg"."value", "res_company"."overdue_msg") as "overdue_msg" FROM "res_company" LEFT JOIN
                (SELECT DISTINCT ON (res_id) res_id, value
                 FROM "ir_translation"
                 WHERE name='res.company,overdue_msg' AND lang='fr_BE' AND value!=''
                 ORDER BY res_id, id DESC)
             as "res_company__overdue_msg" ON ("res_company"."id" = "res_company__overdue_msg"."res_id")
                        WHERE "res_company".id = 1  ORDER BY "res_company"."sequence" ,"res_company"."name"
```

Indeed, `res_company.id` is 1, while `res_company__overdue_msg.res_id`
is 3.

The root cause has been solved in v11, to we only export the necessary
term.

opw-1908337

closes odoo/odoo#29525
2018-12-13 17:08:15 +00:00
Julien (juc) Castiaux d129b0220e [FIX] base_address_extended: add missing mexican address format
After this fix, the field `partner.street` is correcly rendered,
but as the test shows the `street_name` and `street_number` fields
are not correct.

But as there are tests that validate that wrong use case, I
consider it a *feature* and not a bug.

opw-1896773

closes odoo/odoo#29520
2018-12-13 14:00:39 +00:00
Nicolas Martinelli c90cad2b6c [FIX] website_sale: shipping address edition
- Buy on product on the eCommerce with a partner having a single address
- At address selection, edit the shipping address

The billing address is also modified.

From the Odoo PoV, this is expected since they point to the same
partner. But from a user PoV, this is totally unexpected and confusing.

Therefore, we only allow the edition of the shipping addresses which are
different from the billing address. Yet, if the user modifies the
billing address, it will change the corresponding shipping address as
well. However, the usual flow is to set the billing address, then the
shipping address. So that should cause less issues. In v12, a warning
message is added.

opw-1914185

closes odoo/odoo#29509
2018-12-13 10:42:28 +00:00
Jorge Pinna Puissant 0377105304 [FIX] base_address_extended: Street in readonly
opw-1916148

The city, state and zip code are shown behind the street name and
street number, and not in a new line.
This only occurs in the read-only view.

This was changed to use the field 'street', which is a text of the
street name, number and door number in the street formatted in the
format of the partner's country. This only for the read-only view,
leaving the 3 fields separated for the edit.

closes odoo/odoo#29467
2018-12-12 12:02:52 +00:00
Jeremy Kersten 375c98ef16 [FIX] website_blog: fix select to comment
before this commit, the selected text was no more quoted in the comment.

This commit closes #29148

closes odoo/odoo#29486
2018-12-12 17:04:36 +00:00
Pedro M. Baeza e78af353fc [CLA] Include cristinamartinrod in CLA of Tecnativa
closes odoo/odoo#29454
2018-12-12 16:02:25 +00:00
Cristina Martin 6cb683ea94 [FIX] website_sale: Remove pricelist on Sitemap.XML 2018-12-12 16:00:44 +00:00
Lucas Perais (lpe) 6cd12694d8 [FIX] sale: prevent div by zero in sale.report
Backporting the behavior of v12 from e8f01b94ce

OPW 1916964

closes odoo/odoo#29472
2018-12-12 14:01:49 +00:00
Nicolas Martinelli a6d1353591 [FIX] l10n_be_intrastat, report_intrastat: date
The reference date for Intrastat should be the accounting date, not the
invoice date.

opw-1890240

closes odoo/odoo#29466
2018-12-12 12:03:54 +00:00
len-odoo 93807af6e0 [FIX] website_sale: fix overlapping text with product categories
If the price section goes on two lines because of crossed
prices or many icons, then it would overlap with the product title.

See before/after on the PR.

opw 1913521

closes odoo/odoo#29388
2018-12-11 14:21:54 +00:00
Christophe Simonis 7e5d5045bf [MERGE] forward port branch saas-15 up to 1ace2ed88b 2018-12-11 16:20:34 +01:00