Commit Graph
116338 Commits
Author SHA1 Message Date
Ivan Yelizariev 5cecd0a197 [FIX] web_editor: restore website context for assets editor
The assets editor controller was stripped of the website context with
https://github.com/odoo/odoo/commit/198673bf35f14e3a797d2ff09208a289e12bec4e

It was however needed by some client customizations.
2018-06-26 12:58:00 +02:00
Nicolas Lempereur fadb3e155e [FIX] addons: no unsubscribe for unsubscribed
The `/groups` route display mail.channel and allow:

- a public user to subscribe specifying a mail address
- a logged in user to subscribe/unsubscribe itself

The `/groups?unsubscribe` route is the same but only allow:

- a public user to unsubscribe specifying a mail address
- a logged in user to unsubscribe itself

When a user is logged in, there is the oddity that all mail.channel
appear as to "unsubscribe" even if the user is not subscribed.

With this commit, the unsubscribe is shown only if user is subscribed.

opw-1861208
closes #25439
2018-06-26 11:37:57 +02:00
len-odoo f28875b1b7 [FIX] crm: make the force assignation field visible in wizard
Commit: https://github.com/odoo/odoo/commit/83a4374
Introduced a parameter force_assignation to choose to overwrite the salesman
when converting a lead to an opportunity.
However the field had never been made visible in the wizard view.

opw 1859447
2018-06-26 10:39:26 +02:00
len-odoo d7f5a1b25e [FIX] delivery, sale, sale_order_dates: ignore delivery line in commitment date computation
The commitment date is computed using every line from the sale order.
When the picking policy is set to direct, it takes the earliest date
among the sums of the order date and lead time.
However when the delivery is set, is adds a line with an order date of 'now' and
no lead time.
This date thus necessarily becomes the commitment date, bypassing what was
intended by setting a lead times on products.

We simply ignore delivery lines in this computation.

opw 1855646
2018-06-26 10:35:57 +02:00
Nicolas Lempereur 8188e6c802 [FIX] project: default on email as suggested recipient
With 82ca3d3f in 11.0 it was possible to have an email address on a
task, without specifying a partner.

Because of a small issue, this address was not suggested as a possible
recipients like it was in a project.issue object.

opw-1858170
closes #25427
2018-06-25 12:30:45 +02:00
William Henrotin 85f8e4761b [FIX] uom: useless constrain on purchase UoM
The purchase UoM doesn't interfere with account move line at all so we
can remove this check.

Task id: 1844684
2018-06-25 09:20:55 +02:00
William Henrotin 74737865d5 [FIX] stock: block changing location usage if reserved moves
This commit block users to change the location usage (or set it as scrap
location) if there are moves starting from this location.
This commit ensure the stock management will remain consitent.

Task id : 1844684
2018-06-25 09:20:55 +02:00
William Henrotin 850bb6cae4 [FIX] stock: block updating uom factor if reserved moves.
This commit block users to change unit of measure factor. if there are
reserved move on product using this UoM. This will allow the quantities
to be correctly unreserved when the stock move will be confirmed.

Task id : 1844684
2018-06-25 09:20:55 +02:00
Nicolas Martinelli f89d4201c7 [FIX] sale: default invoicing policy
The default invoicing policy setting is not compatible with the logic
implemented in a222afb7d4.

opw-1860867
2018-06-25 09:14:30 +02:00
Nicolas Martinelli 2e4a75cbee [FIX] auth_signup: do not send email to duplicated user
When duplicating a user, an email was sent to a user at the email of the
previous user (as the create is called before changing the email).

opw-1853359
2018-06-25 08:37:24 +02:00
Odoo Translation Bot f9737d79e7 [I18N] Update translation terms from Transifex 2018-06-24 04:09:30 +02:00
Denis Ledoux 6edf49e36f [IMP] ir_qweb: provide a clean way to ovverride the AssetsBundle to use
This revision follows revisions
- 9cd982bcc8
- df4072b0b4

We noticed modules implementing multi-websites features
override `_get_asset` to be able to provide their
own overriden `AssetsBunble` class.

Private methods are meant for internal usage of the code/module,
overriding is never a good idea given the fact their signature
can change. As this is the case in commit
9cd982bcc8.

That said, we understand their was no other way to go.
We therefore decide to provide one,
by adding a method that can be overriden to pass
their own AssetsBunble class instance.

opw-1860136
2018-06-22 15:36:28 +02:00
Nicolas Lempereur cb047ae69d [FIX] web_editor: keep border when side style differ
Since e94702d8 when transcoding an element for the purpose of sending it
by mail, if the element had:

 border-bottom-style: solid;

in the CSS resulting from classes, it would be simplified to:

 border-style: 0 0 solid 0;

which is wrong since 0 is invalid for border-style, the default being:

 none

opw-1852839
closes #25423
2018-06-22 14:25:36 +02:00
Adrien Dieudonne bd004b8267 [FIX] *: Avoid BlockUI for some rpc
Before this commit, the point of sale displayed a loading message
every 5 secondes if the barcode scanner was configured.

This issue is due to the following commit: @1aacc96
After this commit,some calls may block the interface when they did
not do it before.
It concerns all rpc done with ajax.rpc and all done with a new
session.

We have now to explicitly set shadow property.

opw-1860493
2018-06-22 13:13:18 +02:00
Jeremy Kersten df4072b0b4 [FIX] base: keep _get_asset for retro compatibility
Return of _get_assets has been altered with commit 9cd982bcc8
We keep it for retro compatibility, but devs that override it before need to
override now _get_asset_node to be called correctly by t-call-asset.
2018-06-22 11:10:50 +02:00
Swapnesh Shah 55e2d249a6 [FIX] hr_payroll: Ad missing ValidationError import 2018-06-22 10:55:43 +02:00
Nicolas Lempereur 06d89a8440 [FIX] web: onchange on not loaded inline list view
Let's assume a one2many A inside a form view, such that the one2many
views (list, not editable, and form) are defined inline, and there is an
onchange on A. There is another inline one2many B editable list
displayed in the inner form view (and B isn't in the list). There are
two records on the one2many A, both of them having one record in their
one2many B. Edit the first record of A, and edit it's subrecord in B.
Click on save. This triggers an onchange on A and the onchange returns a
command 5 (DELETE_ALL), and two commands 1 (UPDATE). Now edit the second
record of A, and simply close the dialog (e.g. 'Discard'). Save the main
record: the record in one2many B of the second record of A has been duplicated.

This occured because the code in BasicModel messed up information coming
from the onchange (UPDATE command) and from the read (performed when
opening the second record), thus producing a CREATE command instead of
an UPDATE one.

This rev. ensures to properly mix the read data with the onchange
result, by transfering the changes over the list datapoint created after
the read.

opw-1836785
closes #25330
2018-06-22 10:19:51 +02:00
Nicolas Martinelli adeb570b5a [FIX] mass_mailing_event: stat button overlap
In some languages (e.g. German), the text on the stat button overlaps
the button next to it.

opw-1858981
2018-06-22 09:58:59 +02:00
Nicolas Martinelli 7cd13f3b55 [FIX] point_of_sale: settings access
Make settings accessible to POS manager only.

opw-1857771
2018-06-22 09:55:11 +02:00
Adrian Torres 9ddf2c6932 [FIX] crm: reset dashboard_graph_model on uninstall
Before this commit:
    * Install `sale_management`, `crm`
    * Uninstall `crm`
    * Go to sales -> sales channels
    * Boom! The view is broken

This happens because both CRM and Sales share the sales teams view, yet
CRM's override of the model adds a selection_add to the
dashboard_graph_model selection field, when it is uninstalled, records
whose dashboard_graph_model field are set to one of the values
introduced by CRM keep this no-longer-valid value and upon accessing the
view it crashes.

This is a known limitation of selection fields and the selection_add
feature.

To solve this, an uninstallation hook has been created for CRM which
will fetch all records whose dashboard_graph_model is set to
`crm.opportunity.report`, and update the field of all these records to
None (NULL).

Fixes #25363
2018-06-22 09:18:51 +02:00
len-odoo f557f34b75 [FIX] website_sale: set confirmation mail template setting to readonly
In website_sale setting, there is a field 'Confirmation Email' that is not used,
and which purpose is to have a conveninent link to edit the mail templates.
Since it is an editable setting, this confuses the users.
It was in readonly before commit:
https://github.com/odoo/odoo/commit/65a7531c8b5c713969e49a5fab9d4672524c3ba8#diff-3f25fe0e27881e9c6655bbb6974c84abR59
which removed the readonly without any apparent reason.

We put it back into readonly mode.

opw 1860167
2018-06-22 08:24:26 +02:00
Arnold Moyaux 1740b179bf [FIX] stock: resupply propagate pull rules
Use case to reproduce:
- Create a production warehouse that manufacture and a supply warehouse that deliver your product (manufacture and supply dist. WH checked on prod WH.)
- Create a product with a BoM and resupply, MTO and manufacture checked on its routes.
- Modify the resupply pull rule that go from prod/WH to transit location
from MTS to propagate
- Create a Quotation and confirm it.
The user error 'no procurement rule found' is raise.

It happens because the move from customer to Prod/WH are correctly
created but the rule manufacture is not found. It couldn't be find
due to a wrong warehouse on the stock.move. The pull rule use the
supply warehouse instead the warehouse that they serve when they
generate the stock move value.

This commit remove the propagate_warehouse_id on the second rule between
the stock location and the transit location.
2018-06-21 16:21:54 +02:00
Christophe Simonis c5ed372970 [MERGE] forward port branch saas-15 up to 152d42041e 2018-06-21 10:57:42 +02:00
Nicolas Martinelli 1fe119da3b [FIX] barcodes: nomenclature
Loads the barcode nomenclature only if one has been is defined. Indeed,
from commit 80e89c7a11, the POS config unset the
`barcode_nomenclature_id` field if the barcode support is not activated.

opw-1859928
2018-06-21 10:40:59 +02:00
Nicolas Martinelli 0aa2bc0acf [FIX] point_of_sale, sale_mrp, sale_stock: sort moves
`sorted` returns a new sorted recordset, but doesn't modify the actual
one. Therefore, the current code doesn't work as expected.

opw-1824734
2018-06-21 10:31:06 +02:00
Lucas Perais (lpe) 5f105d144d [FIX] account: aged balance shouldn't display fully reconciled on a period
Commit 45c5a07d89 deals with displaying on the aged balance reports
the lines that zero out each other: an invoice and a payment of the same amount for the same partner
However, that commit overlooked that when there is a chain of reconciliation
that puts the report line to zero, it was displayed as well.

This present commit corrects this by making sure there are amls that detail the report lines

OPW 1858963

closes #25359
2018-06-21 09:36:58 +02:00
Nicolas Martinelli dd2354a1ab [FIX] sale_timesheet: SO line on subtask
- Activate sub-stasks on projects
- Create a product A:
  Product Type: Service
  Invoice based on: Timesheets on tasks
  Service Tracking: Create a task in an existing project
- Create a SO with A, validate
- In the project view, open the created task
- Click on the stat button 'Sub-tasks'
- Create a task from the kanban view

The SO line is not copied on the sub-task.

The `name_create` method doesn't send the `parent_id` key in the values.
Therefore, the SO line is not retrieved.

We fallback on the context key `default_parent_id`.

opw-1857560
2018-06-21 09:33:15 +02:00
Nicolas Martinelli f90434b96c [FIX] resource: 24h shift
Create a resource working 24 hours / day.
If we record it as:
- From 00:00 ; To 24:00 => crash
- From 00:00 ; To 23:59 => 1 minute lost

The `float_time` widget doesn't allow to be more accurate than 1 minute,
therefore it is not possible to record an end time of 23:59:59.999999.
We allow a value of 24:00 which is automatically interpreted as
23:59:59.999999. Only 1 microsecond is lost for such use case, which
should be acceptable for our level of accuracy.

opw-1856943
2018-06-21 09:20:33 +02:00
Christophe Simonis 152d42041e [MERGE] forward port branch saas-14 up to e4663523b9 2018-06-20 18:48:06 +02:00
Christophe Simonis e4663523b9 [MERGE] forward port branch 10.0 up to 081259ef25 2018-06-20 17:44:58 +02:00
Christophe Monniez 081259ef25 [FIX] payment_stripe: fix broken test
The direct rendering test assertions were not reached at all because the
conditions were never True.
2018-06-20 16:57:55 +02:00
Christophe Simonis 7dbc995bef [MERGE] forward port branch 9.0 up to 9cb37398f2 2018-06-20 16:48:15 +02:00
Christophe Matthieu ab85e95946 [FIX] ir_qweb: remove browse records from context
The context is send to qweb as option, the options are converted into a
frozen dict, the browse records can have a closer cursor, takes the place
in the cache, and raise and exception in qweb (because contact try to
json.dumps options for multi-edition feature in web_editor.

opw-1859848
2018-06-20 14:14:36 +02:00
Arnold Moyaux 91714d4c46 [FIX] stock: inventory security with translation
Usecase to reproduce:
- Enable multiple languages and companies
- Set one language on the admin and another on the demo user.
- Create a product and a translation for its name (both languages)
- Create an inventory adjustement in a company A for this product
- Switch on demo user (inventory manager rights but in company B only)
- Create another inventory adjustement for company B
- Add the invenory line with the product and save

The Inventory Line multi-company rule raise an access error
because the system set product_name on the inventory_line that is
a related field. Since it changes the product name with its translation
it will update it on other inventory line that have this product. The
other inventory line is in company A and the user don't have access to
it thus the access error is raise.

This adds readonly on the product_name since it should not be update
with an inventory line.

opw-1855137
2018-06-20 14:06:25 +02:00
qsm-odoo f01a0bc04c [FIX] web_editor: allow to empty a style file with the editor
Before this commit, if the user opened the LESS editor and emptied a
file, he may get a compilation error (as intended if the file contained
necessary variables and stuff) but this error also prevented to open
the editor again because some code tried to decode an empty content.

Now, when a file is emptied it is set to an unique line feed.
2018-06-20 13:18:16 +02:00
Martin Trigaux 8439202915 [FIX] account: initial balance has a 0 amount_currency
amount_currency is a field that is expected in multi-currency
The general ledger report has a line
    <span t-esc="line['amount_currency'] if line['amount_currency'] > 0.00 else ''"/>
which crashes if amount_currency is None

opw-1859122

Replaces and closes #25240
2018-06-20 13:18:16 +02:00
Wolfgang Taferner 46b8c07249 [FIX] product: bring back description in product views
Somehow the internal description got lost in the product views in
https://github.com/odoo/odoo/commit/af9d21b379f1dd42e83dcfa164af489c9261542d.
As the field is still used for demo data and is highly needed to
describe the product without exposing in one of the other new fields, it
is brought back.

Closes #24164
2018-06-20 13:05:34 +02:00
Olivier Colson b81b9f9ca1 [FIX] account: use today's date as due date for invoices if there is no payment term and no due date was given manually
The code was actually alreadt made in this spirit, there was just as wrong call to the date_invoice field of the model instead of the local variable with the same name, which contained the right value.
2018-06-20 12:32:33 +02:00
Denis Ledoux e75c0bd2b9 [FIX] calendar: ensure the recurring dates is inside the limit defined
by datetime

The library `datetime` defines a MINYEAR and MAXYEAR limit.
If you try to play with dates outside of these years limits,
it crashes.

In the case of the opw, the date within its timezone was
within the limit (year 9999), but in the UTC timezone
it was no longer the case (year 10000).

Actually the condition should use `<=` instead of strict `<`,
and check the year *in utc*
is not outside the limit, but as soon as you try
to compute the date within UTC, datetime crashes :).

However we can assume nobody will need a event in the year 9999
any time soon, or by that time if Odoo still exists,
we should have refactored this module about 3333 times and somebody
would probably have removed this limitation by oversight anyway.

opw-1850024
2018-06-20 12:32:29 +02:00
Christophe Matthieu cf15030ed0 [FIX] web_editor: convert link to send by email
Don't convert in table btn-link, and center the button
2018-06-19 16:57:04 +02:00
Toufik Benjaa f3298859eb [FIX] sale_payment: Do not create payment token when not logged-in
- When paying a sale order with a payment acquirer that saves tokens
after each payments (S2S mode or save token to "ask" or "always") and
while not connected.
   The payment token is saved as either the sale order's partner (when the
acquirer is in form mode) or as the public user's partner (for S2S
acquirers).

   To fix this issue, if the customer is not connected and pays the sale
order using a form acquirer, we do not create a token.
   If the customer pays the sale order using a S2S acquirer, the created
token is then linked to the invoice's partner.
2018-06-19 16:05:05 +02:00
Pierre Masereel 9a810565b0 [FIX] purchase: Canceling the receipt of a receipt
Canceling the delivery order created for a "Make to order" product
cancels the related procurement.

But canceling the receipt order created for a "Buy" product" with reordering rule
didn't cancel the related procurement. In some cases, it can block the application
of the reordering rules.

Now the related procurement is canceled when the receipt order is canceled.

opw:1845345
2018-06-19 15:37:26 +02:00
Nicolas Martinelli 8b9b56bd73 [FIX] l10n_ch: default tax
As of 01-01-2018, the default taxes should be 3.7 and 7.7 %.

opw-1854312
2018-06-19 15:27:24 +02:00
Nicolas Martinelli 3e2f85e021 [FIX] purchase: duplicate procurement
The fields `purchase_line_id` on a procurement should not be copied.
Otherwise, issue arise in reordering rules.

opw-1859349
2018-06-19 15:24:47 +02:00
Goffin Simon 98be03860d [FIX] stock: issue with full package transfer
Steps to reproduce the bug:
-activate the pick-pack-ship route on the main warehouse
-activate the delivery packages option in Inventory > Configuration > Settings
-create a stockable product
-make a quick inventory for 10 unit(s) of this product
-sell 2.30 unit(s) of this product & confirm the sale
-process the done qty in the PICK operation and click the button "put in pack"
-validate the PICK operation

Bug:

check the PACK operation and the full package was not being transferred

opw:1858316
2018-06-19 15:23:26 +02:00
Toufik Benjaa bae7cd9c46 [FIX] account_payment: Do not create payment token when not logged-in
- When paying an invoice with a payment acquirer that saves tokens after each payments (S2S mode or save token to "ask" or "always") and while not connected.
  The payment token is saved as either the invoice partner (when the acquirer is in form mode) or as the public user's partner (for S2S acquirers).
  This should not happen.

  To fix this issue, if the customer is not connected and pays the invoice using a form acquirer, we do not create a token.
  If the customer pays the invoice using a S2S acquirer the created token is then linked to the invoice's partner.
2018-06-19 14:51:28 +02:00
len-odoo dfc37d3407 [FIX] calendar: do not write end time before start time of an event
The end time of a calendar event is constrained to never be before the start
of te event.
However when updating events, one path would first update the start of the event
before updating the end of the event.
So in case where (s_1, e_1) is updated by (s_2, e_2),
with respectively s_i < e_i,
if s2 > e1 then the update would violate the constraint and thus crash
the calendar update.

opw 1854394
2018-06-19 14:12:35 +02:00
Nicolas Martinelli 4e20c2a49e [FIX] stock_account: inventory valuation
When the initial inventory adjustement is made after the accounting
openeing entry, no AML is created with the initial quantities. The
valuation report is therefore wrong.

Partial revert of 21099f3eaf. Although the existing solution
has also flaws, the fix highlights them even more.

opw-1859204
2018-06-19 13:14:44 +02:00
Nicolas Martinelli fc14ed6642 [FIX] stock_account, stock_dropshipping: do not change accounts
- Change the one of the following default account on a product category:
  Stock Input Account
  Stock Output Account
  Stock Valuation Account
- Upgrade stock_account

The account is changed back to the default value.

This was due to commit 1bf25fc018 which attempted to solve an error
in a test.

We fix the test by making sure we check the right accounts. We also make
sure to avoid creating 2 identical `ir.properties` (one `False`, the
other with a value). We only update the property if it is `False`.

opw-1859706
2018-06-19 13:11:40 +02:00
Jos De Graeve d65043c3c2 [CLA] Accomodata signs Odoo CCLA
Closes #25305
2018-06-19 09:06:16 +02:00