Commit Graph
118602 Commits
Author SHA1 Message Date
svs-odoo f339ed6ff6 [FIX] web: avoid annoying xdg-open prompt
Due to the route beginning with 'test: ', it was interpreted like a
protocol and on some OS (ubuntu for example), a xdg-open prompt pops up.
So, the window looses focus and some tests will fail because of that.
2018-09-12 13:17:54 +02:00
Christophe Simonis 2b92f04289 [MERGE] forward port branch 11.0 up to cf7cb147f2 2018-09-11 19:50:13 +02:00
Christophe Simonis cf7cb147f2 [FIX] rating: remove useless header in icon title 2018-09-11 19:46:05 +02:00
Christophe Simonis 49a7295ce9 [MERGE] forward port branch saas-15 up to 48aac01c13 2018-09-11 19:06:22 +02:00
Christophe Simonis 48aac01c13 [MERGE] forward port branch saas-14 up to 55ab1ac691 2018-09-11 18:54:08 +02:00
Christophe Simonis 55ab1ac691 [MERGE] forward port branch 10.0 up to cd66b0984e 2018-09-11 17:44:14 +02:00
Christophe Simonis cd66b0984e [FIX] base: only sync partners when type change 2018-09-11 17:08:14 +02:00
Christophe Simonis 63afaf438b [MERGE] forward port branch 9.0 up to 415aa05806 2018-09-11 17:07:35 +02:00
Nicolas Lempereur dc9b3df431 [FIX] calendar: keep recurring after edited one
Since 76b7242 if we have a recurring event with 3 occurences:

 [4th 4:00-4th 5:00] [14th 4:00-14th 5:00] [24th 4:00-24th 4:00]

And we detach the first one to modify it, then when getting the
info of reccurring events not detached the system get:

- starts: [14th 4:00] [24th 4:00]
- stops: [4th 5:00] [14th 5:00] [24th 5:00]

And wrongly apply the current filtering over:

 [14th 4:00-4th 5:00] [24th 4:00-14th 5:00]

So the issue hides recurrences of event wrongly if:

- they have not been detached
- they don't have a duration of 0
- one or several previous events have been detached
- the stop date of the nth previous event occurrence (nth equaling
  number of detached previous events) is not in the current filtering.

With this change, the stops are also filtered based on start of
occurrence + duration.

Without the change, the added test fails with:

 False != '155-20120301120100' : Last event should be found searching it by date range

note: for 10.0 up to not including 11.0 which is solved with #26901

opw-1866151
closes #26887
2018-09-11 16:29:05 +02:00
Nicolas Lempereur 3d09560ffc [FIX] calendar: keep recurring after edited one
Since 76b7242 if we have a recurring event with 3 occurences:

 [4th 4:00-4th 5:00] [14th 4:00-14th 5:00] [24th 4:00-24th 4:00]

And we detach the first one to modify it, then when getting the
info of reccurring events not detached the system get:

- starts: [14th 4:00] [24th 4:00]
- stops: [4th 5:00] [14th 5:00] [24th 5:00]

And wrongly apply the current filtering over:

 [14th 4:00-4th 5:00] [24th 4:00-14th 5:00]

So the issue hides recurrences of event wrongly if:

- they have not been detached
- they don't have a duration of 0
- one or several previous events have been detached
- the stop date of the nth previous event occurrence (nth equaling
  number of detached previous events) is not in the current filtering.

With this change, the stops are also filtered based on start of
occurrence + duration.

Without the change, the added test fails with:

 False != '27-20120301120100' : Last event should be found searching it by date range

note: 11.0 version of 10.0 #26887

opw-1866151
closes #26901
2018-09-11 16:27:58 +02:00
Laurent Smet 415aa05806 [IMP] account: add error when setting a foreign currency on account
If currency set on account, all journal items part of this account must have either the same
currency or no currency.
2018-09-11 16:04:52 +02:00
Christophe Simonis babfca1cf4 [MERGE] forward port branch 11.0 up to 5a1f874602 2018-09-11 14:57:25 +02:00
Goffin Simon 5a1f874602 [FIX] base_address_extended: contact address is not updated
When the module "base_address_extended" was installed, the contact addresses
of a company were not updated when the company address was updated.

opw:1879968
2018-09-11 11:30:44 +02:00
Nicolas Martinelli 1b47575372 [FIX] account: cash basis in statement
- Set up a 10 % tax with a 'Tax Due' as 'Based on Payment'
- Create a bank statement of 110, Reconcile
- Create a new AML for the reconciliation using the mentioned tax for an
  amount of 100
- Validate

The tax amount does not appear in the Generic Tax Report.

This is a specific case where the reconciliation process creates the
payment itself. Therefore, the tax amount should appear in the report.

To do so, we explicitly send the `tax_exigible` value on the AML, and
propagate it to the tax line.

opw-1858492
2018-09-11 10:30:45 +02:00
Nicolas Martinelli 097963624f [FIX] stock: prevent location change
Changing the partner on a picking triggers an onchange which might
modify `location_id` or `location_dest_id`. However, when the picking is
not draft anymore, these fields are not supposed to be changed.

opw-1872635
2018-09-11 10:21:14 +02:00
Lucas Perais (lpe) 816f386161 [FIX] mail: action send mail no default_type
Have a send email automated action on invoices upon validation (write)

Go onto the credit notes, create one, and validate

Before this commit, at the creation of the attachment (the invoice pdf), there was a traceback
because default_type was in the context containing 'out_refund'
And that attachments also have a field 'type'
So the default_get of the latter got a value that wasn't correct for its field

After this commit, we clean the context of the default_type context key since it
is irrelevant beyond that point

OPW 1868638

closes #26621
2018-09-11 09:35:44 +02:00
Lucas Perais (lpe) f5e145d2b9 [FIX] payment_stripe: regex to match so_ID
Before this commit, when paying a confirmed SO with the token access with Stripe,
Clicking on the button "pay now" wouldn't do anything, because the id of the SO couldn't be retrieved

After this commit, the regex that does just that is more generic and the flow works

OPW 1881192
closes #26884
2018-09-11 09:30:25 +02:00
Christophe Simonis 826cd9b3d3 [MERGE] forward port branch 11.0 up to c3ea0a7811 2018-09-10 19:21:57 +02:00
Christophe Simonis c3ea0a7811 [MERGE] forward port branch saas-15 up to 7563abbde8 2018-09-10 17:27:02 +02:00
Christophe Simonis 7563abbde8 [MERGE] forward port branch saas-14 up to 1b5933cc3d 2018-09-10 17:24:13 +02:00
Christophe Simonis 1b5933cc3d [MERGE] forward port branch 10.0 up to 0776306813 2018-09-10 17:23:50 +02:00
Nikunj Ladava 2ea7d9b10e [IMP] payment: Improved error message for an empty field in payment.acquirer form view
- payment.acquirer have many fields with 'required_if_provider'
   attribute and while saving form it gave an error like "Required
   fields not filled", so it was confusing to know  which required fields were empty.

 - after this commit, it is displayed like "Required fields not filled (field name)"

opw:1881054
2018-09-10 16:46:21 +02:00
Nicolas Martinelli 0776306813 [FIX] membership: recompute state
Commit https://github.com/odoo/odoo/commit/2b587d34ff30147c03baf16e998effe46ce5d9cf#diff-2d656902930900b836412f086c924643R164
incorrectly removed the content of the cron.

Indeed, `membership_state` is a computed field which depends on time
(which is usually a bad idea). Therefore, we must force its
recomputation.

opw-1878878
2018-09-10 15:03:35 +02:00
Adrien Dieudonne 15e1b2a469 [FIX] test_main_flows: automatic install of account_accountant
'account_accountant' is only defined in enterprise.
Before this commit, many of us forgot to manually install it
before running main_flow_tour in enterprise.
Plus, it was difficult to know that a required module is missing
when a step failed. The error was not clear.

Now, the post hook will check if this module exist (it's the case in
enterprise) and will install it.
2018-09-10 14:48:47 +02:00
Nicolas Martinelli 5be17f7bc6 [FIX] point_of_sale: mandatory picking type
Make the picking type mandatory, otherwise any picking will be created
without one, which will cause stock issues.

opw-1873326
2018-09-10 13:11:28 +02:00
Nicolas Martinelli fb22a4db2a [FIX] sale: analytic account in confirmed state
- Activate analytic accounting
- Create a SO, validate
- Edit, and in the tab 'Additional Information' set an 'Analytic
  Account'
- Save

The analytic account is not saved.

The domain applied on the field is:
`attrs="{'readonly': ['|',('analytic_account_id','!=',False),('invoice_count','!=',0),('state','=','sale')]}"`

This means that once the account is set, the field becomes read-only.
However, a read-only field is by default not sent to the server.

opw-1882448
2018-09-10 13:07:22 +02:00
Lucas Perais (lpe) 8fca115b04 [FIX] web_settings_dashboard: give context to search_read planners
Before this commit, the planner section of the settings weren't translated.
This was because the context was not sent along with the search_read that fetches planners data

After this commit, the planner section is correctly translated

OPW 1881092
closes #26766
2018-09-10 12:04:13 +02:00
Lucas Perais (lpe) bb12890977 [FIX] mail: activity don't loose text of feedback popover
On an activity, click Mark as done, the popover pops over
Now write some text in it, but click somewhere else, like to copy/paste something
The popover looses focus, and your text disappears

After this commit, we store the value of the popover when hiding it,
then, when when showing back the popover, the value is reinjected

OPW 1873999
closes #26315
2018-09-10 11:24:42 +02:00
Nicolas Martinelli 0f2292018e [FIX] account: manual reconciliation with tax
In the Manual Reconciliation widget:
- Link 2 entries that do not balance
- Create the write-off line with a tax

When reconciling, the following error occurs:
"It is mandatory to specify an account and a journal to create a
write-off."

Two new lines are sent to the server: the write-off, and the tax of the
write-off. The latter causes the issue, since it doesn't contain the
field `journal_id`.

Actually, the tax of the write-off is not necessary since the taxes will
be recomputed automatically thanks to the context key `apply_taxes`.

opw-1875822
2018-09-10 10:10:46 +02:00
Lucas Perais (lpe) 9671ccb509 [FIX] website_quote: option product discount report print
Before this commit, the suggested products section on a printed SO always showed
the discount, even if it was 0.0

After this commit, we display discounts only if they are different from 0.0

OPW 1882942
closes #26847
2018-09-10 09:58:16 +02:00
Odoo Translation Bot 01d853e295 [I18N] Update translation terms from Transifex 2018-09-09 04:11:03 +02:00
Odoo Translation Bot 988cadaf5d [I18N] Update translation terms from Transifex 2018-09-09 00:29:00 +02:00
Romain Derie 3a496f18fa [FIX] web: forward-port 10.0->11.0 (CORS error handle)
CORS error was firsly fixed with 4bd8e3e2ed in 11.0
Then it was cherry-pick'd and improved in 10.0 with 9f1438d5f1.
But the improvement was lost during forward port from 10.0 to 11.0.

This commit adds the lost fix.

Closes #26812
2018-09-08 12:58:53 +02:00
Jeremy Kersten e1b142bd9f [FIX] website_sale, website_sale_stock: fix deps
Commit d25719cd use in website_sale the field sale_delay defined in stock and
so only available with the module bridge website_sale_stock only.

After this commit, website_sale without stock works again.

This commit closes #26855, closes #24671
2018-09-07 23:05:30 +02:00
Iván Todorovich 8781286f1c [FIX] account: multi-company bank statement reconciliation
In a multicompany environment, if the user is not logged-in in the same company as the statement's company (even though he might have access to it), the reconcile interface was filtering on the user's company instead of the bank statement lines's company.

Was PR #26782
2018-09-07 15:24:33 +02:00
Iván Todorovich 6d36343d5d [CLA] Signature for ivantodorovich 2018-09-07 15:24:10 +02:00
rocketgithub a5d28e0e95 [FIX] base: correct currency code for Guatemala
The correct code is GTQ, QTQ does not exists
https://www.xe.com/currency/gtq-guatemalan-quetzal
2018-09-07 14:24:06 +02:00
rocketgithub 9647faa825 [CLA] signature for rocketgithub
Done at #26781
2018-09-07 14:23:50 +02:00
jcoux c5dce48fbe [CLA] Signature for jcoux
Closes #26841
2018-09-07 14:21:05 +02:00
Christophe Simonis 4850fb0838 [MERGE] forward port branch 11.0 up to 9b602ae648 2018-09-07 12:38:59 +02:00
Christophe Simonis 1884c71245 [FIX] test_translation_import: correct test and add required i18n files ignored during forward-port 2018-09-07 12:06:24 +02:00
len-odoo 9b602ae648 [FIX] base: allow to use Python builtins in views
Py.js does support Python builtins, e.g. abs, len, str, which can
be used in views if the view validation accepts it.

opw 1879160
2018-09-07 11:38:22 +02:00
Nicolas Martinelli 7e83ea8d57 [FIX] point_of_sale: restrict price control
- Activate the Price Control option in the POS
- Connect as Admin => you are allowed to modify the price
- Switch the user to Demo => you are still allowed to modify the price
- Switch back to Admin => you are not allowed to modify the prices

The two last steps are clearly incorrect.

The reason is the following.
The function `applyAccessRights` is bound to `'change:cashier'` event of
the `pos` at:

https://github.com/odoo/odoo/blob/d25719cdf2b8a863c1a855f2e42e9c3a43580f66/addons/point_of_sale/static/src/js/screens.js#L389

When switching the user, 2 steps are performed:
1. Set the cashier on the `pos`
2. Set the cashier on the `pos.db`

https://github.com/odoo/odoo/blob/d25719cdf2b8a863c1a855f2e42e9c3a43580f66/addons/point_of_sale/static/src/js/models.js#L646-L647

Step 1 will trigger the function `applyAccessRights`, which calls
`pos.get_cashier`. However, the latter retrieves the user on `pos.db`
first, and falls back on `pos`.

https://github.com/odoo/odoo/blob/d25719cdf2b8a863c1a855f2e42e9c3a43580f66/addons/point_of_sale/static/src/js/models.js#L642

This means that we retrieve the cashier in the `pos.db` before it is
actually set (in step 2).

To avoid this, we explicitly retrieve the cashier on the `pos`, then
fall back on the usual `pos.get_cashier` function.

Closes #26814
opw-1871189
opw-1881172
2018-09-07 09:29:38 +02:00
Aaron Bohy a51a5b70d3 [FIX] web: FieldDomain: reset field with a new domain
Before this rev., there was a crash when a FieldDomain was reset
with a new domain (e.g. coming from an onchange). For instance, it
crashed in Email Marketing > create new Mass Mailing > select
mailing lists. Introduced by 68332a01.

opw-1882850
2018-09-07 08:37:45 +02:00
Christophe Simonis 21a186dadd [MERGE] forward port branch 11.0 up to 737ca0eb42 2018-09-06 18:13:56 +02:00
Christophe Simonis 737ca0eb42 [FIX] web: adapt newly added test (2) 2018-09-06 17:27:50 +02:00
Christophe Simonis 63f95760ef [FIX] web: adapt newly added test
Oversight of previous forward-port
2018-09-06 17:23:27 +02:00
Christophe Simonis 505e42b78b [MERGE] forward port branch saas-15 up to 5a5d6d1e8e 2018-09-06 17:00:26 +02:00
Xavier Morel a3cd0ac2ce [FIX] project: add access token to task attachment display
Following CDN expansion (d98b262398)
portal attachment links now go through the CDN, which is an issue for
restricted-access attachments e.g. attachments bound to specific objects
(such as support tickets).

Add an access token to the attachment links in the /my/task template.

Cf OPW-1882014 (fixed ad-hoc by editing the relevant view on odoo.com)
2018-09-06 16:44:00 +02:00
Goffin Simon d3dc5048e4 [FIX] purchase_requistion: Duplicate purchase agreement with "Run sch…
…eduler"

Steps to reproduce the bug:

- Let's consider P a product with routes "buy" and "mto" and with
purchase_requistion = 'Propose a call for tenders'

- Let's consider a BOM B with P as component

- Create a MO for B

- Run the scheduler two times

Bug:

Two purchase agreements have been created for the the same MO.

opw:1882280
2018-09-06 16:05:13 +02:00