Commit Graph
122512 Commits
Author SHA1 Message Date
Odoo Translation Bot 652cecffde [I18N] Update translation terms from Transifex 2019-01-06 01:32:05 +01:00
Christophe Simonis 52057da36f [FIX] test_main_flows: more explicit trigger 2019-01-04 14:54:15 +01:00
Christophe Simonis ec9400821e [MERGE] forward port branch saas-11.3 up to 27a084eb81 2019-01-04 14:54:08 +01:00
Nans Lefebvre 2cdc1cc9ce [FIX] sale: hide the sales menu from users without any rights
If a user has no rights on sale, he should not see the sales menuitem
on the dashboard.

opw 1921335

closes odoo/odoo#29934
2019-01-04 10:39:18 +00:00
Toufik Ben Jaa 99c319e03a [FIX] account: deadlock on install
- When installing an accounting l10n module, the method `try_loading_for_current_company`
  is called and could cause a deadlock.
  The deadlock is caused by the fact that if the installation is started
  via a web request the code tries to retrieve the current user's
  company by doing `request.env.user.company_id`.

  This causes issues since the installation code has its own postgresql
  cursor while calling `request.env.user.company_id` will create its own
  cursor.

  So two cursors exists for the same Odoo worker.
  The installation cursor asks for a lock on `res_users` while the
  second cursor (the request one) will try to read on `res_users` and
  wait the first lock to be dropped.

  The lock is never dropped since the python code isn't running anymore
  waiting for the `request.env.user.company_id` to be completed.
  Causing the deadlock.

  To fix the issue, we avoid the creation/usage of a cursor created by
  `requesŧ`.
  So to retrieve the current user's company, we read the user id on the
  request's session, then browse the `res.user` record with the
  installation cusror.

  Fix issue introduced by commit d40956c790

closes odoo/odoo#29927
2019-01-04 10:55:31 +00:00
Julien (juc) Castiaux 033608eb11 [FIX] sale: non-consistent tests
The tests of the sale module are not constistent. Success depends on version
in use (com vs ent) and the modules installed (sale, stock, event_sale).

**Fix 1**

The "Description" field is updated by a onchange while saving the record.

**Fix 2**

The `sale_stock` module  adds a new step to click "ok" on the warning modal
shown when saling a product without enough of that product on hand. The added
step was added to test_01 (that doesn't show the modal) instead of test_02.

**Fix 3**

There is a difference between the price of the SO between community and
enterprise.

**Fix 4**

The event_sale module changes the form view thus need to perform more steps
to create a record.

opw-1912266

closes odoo/odoo#29679
2019-01-04 10:10:43 +00:00
Nicolas Martinelli 6da2e23e65 [FIX] hr_attendance: kiosk keep alive
When running in kiosk mode, it is necessary to refresh the interface
once a week since the session is garbage collected.

The garbage collection method `session_gc` relies on the last
modification time of the session file. However, the session file is only
saved when the field key `should_save` of the session request is `True`.
This happens when the session is `modified`, i.e. an item on the cookie
is set.

In practice, the session is saved at each reload of the page. Regular
RPC calls, such as the one used in commit 6e1b660f9c, do not
trigger a modification of the session file. Therefore, we create a new
route which explicitly sets the session as `modified`, which ultimately
triggers a `save` in `get_response`.

opw-1917254

closes odoo/odoo#29919
2019-01-04 09:56:55 +00:00
Nicolas Lempereur 27a084eb81 [FIX] web: attach document fix click on firefox
As of saas-11.3 there is a "Attach document" widget that is meant to
more easily add attachment.

But on firefox the click event is coming from the button, where on other
browsers it was possibly from a child element.

So the code expecting the child element did not work on firefox.

opw-1920842
closes #29903
2019-01-03 17:00:18 +00:00
Christophe Simonis d96c42ea88 [MERGE] forward port branch 11.0 up to 22637aadec 2019-01-03 15:31:05 +01:00
qdp-odoo 22637aadec [FIX] account: typo introduced in d44437f93830afae60e5354e0b4777413be29c93
closes odoo/odoo#29874
2019-01-03 09:21:50 +00:00
Christophe Simonis a23e8c081a [FIX] account: adapt forward-ported test 2019-01-02 17:11:36 +01:00
Christophe Simonis e618845112 [FIX] web: adapt forward-ported test 2019-01-02 16:08:25 +01:00
Sanjay Jamod 03b0e153ac [FIX] account_check_printing: Fix traceback on onchange
Method amount_to_text() having self.ensure_one(), it should not be
called with empty recordset

Closes #29854

closes odoo/odoo#29865
2019-01-02 14:46:07 +00:00
Christophe Simonis 79f1ecd756 [MERGE] forward port branch 11.0 up to d82c0d133e 2019-01-02 15:37:01 +01:00
Wolfgang Taferner d82c0d133e [FIX] stock: tell the user which product is causing the issue
closes odoo/odoo#29857
2019-01-02 10:36:57 +00:00
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
Julien (juc) Castiaux 79b80d9c37 [FIX] tools: value_label attribute translatables
A newly intoduced xml attribute by @svs-odoo was not translatable.

Related PR on enterprise: odoo/enterprise#3252

opw-1908220

closes odoo/odoo#29386
2018-12-31 09:08:54 +00: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
Nicolas Lempereur 222f3166b0 [FIX] account: apply currency on uom change
When creating a new line on a customer invoice, we could get the price
unit in the company currency instead of the invoice currency.

This is because the uom_id onchange would ignore currency when setting
the price.

Changing an invoice line's price unit on uom_id change was introduced
in february 2018 in saas-11.3 with 3a38080ff.

Change to how currency is applied when setting an invoice line's price
unit was introduced in june 2018 in 9.0 with 367fadc8.

So there was a missing part in saas-11.3 to adapt 367fadc8 for 3a38080ff
change that is added with this commit.

Without the fix, the added test failed with:

  AssertionError: 10.0 != 20

opw-1920504
closes #29776
2018-12-28 13:20:52 +00:00
Nicolas Lempereur a6279fe169 [FIX] hr_holidays: demo data error on 31 december
On installation demo data causes an error on 31 december since we test:
 is 31 december at midnight < now() => so after midnight error.

Solve this by comparing today instead of datetime.

opw-29776
closes #29830
2018-12-31 11:31:02 +00: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