Commit Graph
109508 Commits
Author SHA1 Message Date
Goffin Simon fc659d3f78 [FIX] sale: Description of the product 'Downpayment' not translated
When you create a down payment invoice from an SO, the product that is used in the line is 'Down Payment'.
The description of this product, which is visible for the customer, was not translated to the language
of the customer in the SO and in the invoice. It was translated to the language of the user logged.
This fix is made to keep the same behavior for the description of an SO line and for the description
of the invoice line.

opw:1820081
2018-03-27 14:19:29 +02:00
Nicolas Martinelli f289451ce5 [FIX] payment_authorize: raise error if missing ZIP
The ZIP code is an optional field. When saving a payment method, this
generates a traceback since `partner.zip` is `False` while the field
expects a `string`.

opw-1829829
2018-03-27 12:53:36 +02:00
Nicolas Martinelli e78a08e336 [FIX] mrp: date expected
- Create a MO
- Change the date 'Deadline Start'

The corresponding 'Expected Date' on the stock moves is not updated with
the new value.

opw-1828631
2018-03-27 08:24:33 +02:00
Christophe Simonis b07edf605b [MERGE] forward port branch 9.0 up to f36f1ceccf 2018-03-26 12:21:57 +02:00
Nicolas Martinelli 927a133769 [FIX] purchase: hide PO when not necessary
Partial backport of 1d515fcdac

Closes #20274
opw-1829893
2018-03-26 09:07:22 +02:00
Odoo Translation Bot 751ed01524 [I18N] Update translation terms from Transifex 2018-03-25 00:29:04 +01:00
Christophe Simonis f36f1ceccf [FIX] base: avoid duplicated translations when possible
When modifying a translatable record, we try to keep close translations
However, we do not need to do it if there is already a translation for
the matched term.
2018-03-23 15:40:49 +01:00
Sébastien BEAU 2445f9e3c2 [FIX] base: remove BCC header from outgoing emails to avoid leaking information
When sending emails SMTP server only requires an author, recipients and the
email to send. It does not make any modification of what is sent. It is
therefore possible that BCC content is sent.

BCC mean 'Blind Carbon Copy', the address in this field should be not send
in the header of the mail and must be removed, if not the address are visible
for all recipients.

Closes #21965 .
2018-03-23 11:34:09 +01:00
Hetashree Chauhan fb2df13ea8 [FIX] stock: picking button in valuation report
When hitting the picking button in the valuation report, there was a
"form view could not be loaded" error. This is because we try to
open a picking with a stock move id.

master bug 1817491
Fixes #17226
2018-03-22 13:36:52 +01:00
Nicolas Martinelli 048539732d [FIX] stock_account: compute price if no product
- Activate anglo-saxon accounting
- Create an invoice with a line without product but a UOM
- Validate

A traceback arises since `_compute_price` is called on an empty
recorset.

opw-1830042
2018-03-22 12:39:16 +01:00
Toufik Benjaa 9aa1b7ba12 [FIX] web: Access issue for non qweb reports
- With the removal of the password field on the sessions (https://github.com/odoo/odoo/commit/da1f153d61d747d9357694382fe04f96c0ca886a) the non qweb reports going through the route '/web/report' were not able to be generated.
We address this issue by avoiding to call dispatch_rpc and by using the functions to generate the report directly.
This doesn't cause any security issue because the route '/web/report' is callable only by logged in user.
Meaning that the session is already validated.
2018-03-22 11:29:01 +01:00
Goffin Simon dcf77ee9f9 [FIX] web: Modify existing sales order lines
Steps to reproduce:

- Create a sale order and add sale order lines(Not Inline) without saving the sale order.
- Edit any of the existing sale order line and hit on "Save & New" on the sale order line.
- Add another sale order line and hit on "Save & Close"

Bug:

A validation error was raised.

opw:1829723
2018-03-22 10:56:31 +01:00
Martin Trigaux 88170774a7 [FIX] *: correct bad %s translation
Global search and replace badly formated %s
2018-03-22 10:52:01 +01:00
Martin Trigaux c5891effa6 [I18N] Update translation terms from Transifex
With automatic corrections of bad %s
2018-03-22 10:25:01 +01:00
Goffin Simon c2b3ad1899 [FIX] stock_account: Cannot validate some invoices
Steps to reproduce the bug:

- create an invoice
- add one line without product but with a uom
- validate it

Bug:

A traceback was raised because no product was set on the invoice line.

opw:1825464
2018-03-21 14:19:09 +01:00
Jeremy Kersten c17170b9c1 [FIX] web: all routes should have **kw to support utm/extra params
Without this commit, a valid route /web/content with an extra
params eg utm or adwords will return a 500 with:
TypeError: content_common() got an unexpected keyword argument 'extra_param_name'

This commit closes #21221

Task-32836 should fix for all routes in a future version
2018-03-21 12:20:33 +01:00
Jairo Llopis 9e981f6535 [FIX] website_project_issue: No buttons for portal, customers
Customers without an user account can do nothing with the button
in the notification, so it's better they don't have it.

partial backport of #4732a1

This commit closes #22487
2018-03-21 12:20:33 +01:00
Highcooley b3b0c02d8f [I18N] l10n_ch: add German translations
German (CH) Translations Chart of Accounts

Closes #23785
2018-03-21 11:45:26 +01:00
Highcooley 916dad8050 [CLA] signature for Highcooley
Done at #23785
2018-03-21 11:45:26 +01:00
Christophe Simonis 0cefaad370 [MERGE] forward port branch 9.0 up to 2c5fe07fc7 2018-03-21 11:35:58 +01:00
Ward Marissen 2c5fe07fc7 [FIX] website_portal: Keep country changes
When a portal user changes his account details and presses the 'Save' button
when a mandatory field is not set, the selected country will be reset even when
the user did change the country in the form. This fix prevents this from
happening and leads to an improvement for the end user.

This commit closes #22439
2018-03-21 11:31:27 +01:00
hpr-odoo ce05f3b2e0 [FIX] base: iterate on each report
If tries to compute the report_rml value on multiple reports at the same time

Closes #21116
2018-03-21 11:01:16 +01:00
Nicolas Martinelli 65bad81b2c [FIX] stock: Delivery Slip
- Create a picking to deliver 10 units, save
- Edit and change to 12 units
- Print the Delivery Slip => the qty is 10
- Validate the picking with 12 units
- Print the Delivery Slip => the qty is still 10

The use of `ordered_qty` is misleading, since it corresponds to the qty
ordered at creation.

Backport of 0a2999cdd9

opw-1825396
2018-03-21 11:00:36 +01:00
Nicolas Martinelli b200f020ea [FIX] crm: create opportunity from kanban
- Create a customer, set an address
- Create an opportunity from the kanban view

The address fields are not filled in in the opportunity.

We add all fields filled in by `_onchange_partner_id_values`

Complement of commit e2bbee6df5

opw-1816438
opw-1826859
2018-03-21 10:46:03 +01:00
Nicolas Martinelli 6d195ee603 [FIX] account: unreconcile payment
- Create a SO for a customer of 100 $
- Create Invoice for the Sales Order and Register the payment
- Create a Refund Invoice, Validate it and keep it in "Open" state
- Create a second SO for 5 $
- Create an invoice for this order and validate it
- It will show you outstanding payments
- Apply the credit and the invoice will be fulfilled => Now you have a
  credit left for 95 $
- Create a third Sales order for the same customer for 5 $
- Create an Invoice for it
- It will show you outstanding credit (95 $)
- Apply the credits
- Now 90 $ are left
- In the same invoice, the credit which you applied, Unreconcile it
- It should have shown you 95 $, but it shows you 100 $ which means it
  removed the credit which we applied to second SO

The unreconcile process does not filter the partial reconciliations of
the selected invoice. All partial reconciliations on the AML are
removed instead.

opw-1819602
2018-03-21 08:37:23 +01:00
Romain Derie b77ff40e93 [FIX] website_sale(_delivery): show prices according to B2B/B2C mode
Before this commit:
1. The delivery price on checkout would always be shown without the taxes.
   This would make the cart total unclear since it is not indicated that this
   price is tax excluded. You could only assume that this was the price the
   delivery would cost you (and not just the untaxed delivery cost which you
   can't even find the full price anyway since taxes in subtotal is the sum of
   all products taxes).

2. The sale order line in payment step of checkout are always displayed with
   taxes.

Now:
We ensure that both 1. and 2. show the delivery price with or without taxes
according to which mode (B2C or B2B) is enabled.

This fixes #12872, closes #13592 and closes #23746
2018-03-20 14:29:59 +01:00
Martin Geubelle 75d9a2b4db [FIX] web: correctly display statusbar
Some status were shown in the statusbar even though they were not specified in
the `statusbar_visible` attribute. This happened when the value was a substring
of one specified value.

Example:
```
hello = fields.Selection([('hello', 'Hello'), ('hello_world', 'Hello World')])
<field name='hello' widget='statusbar' statusbar_visible='hello_world'/>
```
In this case, both status were shown ('hello' is a substring of 'hello_world').

Fixes #20034
2018-03-20 13:49:32 +01:00
Jairo Llopis 6bd3bae04e [FIX] mass_mailing: domain translation
As Admin:
- Set up 2 languages for the installation, e.g. English and French
- Admin language is English, Demo language is French
- Create a `res.partner.category` named 'Test English'
- Assign the category to a newly created partner
- Create a French translation for 'Test English', e.g. 'Test Francais'

As Demo:
- Create a Mass Mailing
- Select a custom domain: ('category_id', '=', 'Test Francais') => it
  should match one partner
- Save and validate

Now either:
- manually run the scheduled action "Process Mass Mailing Queue" as
  Admin
- wait for the cron to process the mass mailing

No mail will be sent since the domain will be evaluated in the Admin
language, i.e. English. Indeed, the domain
`('category_id', '=', 'Test Francais')` does not match any record in
English.

The solution/workaround is to use the language of the last user who wrote
on the mass mailing.

Closes #20906, Closes #15467, Closes #15445

opw-778922
2018-03-20 13:48:49 +01:00
Goffin Simon c3b49b3a5f [FIX] mass_mailing: domain translation
As Admin:
- Set up 2 languages for the installation, e.g. English and French
- Admin language is English, Demo language is French
- Create a `res.partner.category` named 'Test English'
- Assign the category to a newly created partner
- Create a French translation for 'Test English', e.g. 'Test Francais'

As Demo:
- Create a Mass Mailing
- Select a custom domain: ('category_id', '=', 'Test Francais') => it
  should match one partner
- Save and validate

Now either:
- manually run the scheduled action "Process Mass Mailing Queue" as
  Admin
- wait for the cron to process the mass mailing

No mail will be sent since the domain will be evaluated in the Admin
language, i.e. English. Indeed, the domain
`('category_id', '=', 'Test Francais')` does not match any record in
English.

The solution/workaround is to use the language of the last user who wrote
ont the mass mailing.

Closes #20906, Closes #15467, Closes #15445

opw-778922
2018-03-20 11:42:11 +01:00
Nicolas Martinelli 407b85e329 [FIX] product: default quantity on pricelist item
- Create a new pricelist for a new currency
- Set the 'Sale Price' option to 'A single sale price per product', so
  that the user cannot see the pricelist details
- Sell 0.5 unit of the product with the new pricelist

The pricelist is not correctly applied.

This is because the default minimum quantity is 1. Once the user is
selling less than 1 unit, the pricelist is not applied.

opw-1825353
2018-03-20 11:38:24 +01:00
Nicolas Martinelli 4c692f1bb3 [FIX] website_project{_issue}: redirect from email
- Create a portal user
- Set an email address
- Create a project with tasks / issues
- Create a task / issue, set the portal user as follower => he should
  have access to the task from URL `/my/task/<id>`.
- On an email received (e.g. when the user is set as follower), click on
  'View Task'

The user is redirected to the chatter instead of `/my/task/<id>` or
`/my/issue/<id>`.

In method, `_redirect_to_record`, the record is browsed as `sudo`.
Therefore, in `get_access_action`, `self.env.user` is the admin.

We check the context to get the original user.

opw-1814577
2018-03-20 09:36:51 +01:00
tbe-odoo da1f153d61 [IMP] http: Sessions implicit deactivation
- Store a token inside sessions to allow implicit session deactivation when needed.
2018-03-19 18:11:12 +01:00
Yoshi Tashiro caf6b4a7c7 [FIX] base: round JPY at unit's place
Rounding should be done at the unit's place for Japanese yen

Closes #23739
2018-03-19 17:08:08 +01:00
Andreas Perhab 444e2a4ed0 [FIX] doc: correct link to nodejs download
Closes #23733
2018-03-19 17:05:30 +01:00
Andreas Perhab 45faa90732 [CLA] signature for bigbear3001
Done at #23733
2018-03-19 17:05:29 +01:00
jem-odoo 622b70ee3e [FIX] purchase: wrong condition in mail template
Before checking the first element of
'partner_id.child_ids', rather check that
the partner and not the object has children,
to avoid crashes when the partner of the PO
is a company.
opw-1826359
2018-03-19 15:13:33 +00:00
Mykhailo Panarin 71f56fd2fa [CLA] signature for mpanarin
Was already signed in 11.0 but not in 10
Closes #23715
2018-03-19 12:01:59 +01:00
Nicolas Martinelli 623f2baf9d [FIX] hr_timesheet: change department
- Set an employee in a department A
- Create some timesheet entries for this employee, validate them
- Change the employee to department B

An error arise:
> You cannot modify an entry in a confirmed timesheet.

The field `department_id` on the `account.analytic.line` is a related on
`user.employee_ids.department_id`. By changing the department on the
employee, it changes the department on the analytic line (= timesheet).

There is no real need of a related field. Actually, it makes more sense
to change the department with the user (e.g. at creation or change of
the user), and then do not change it later on. Indeed, a timesheet entry
that was created when the employee was in department A should remain in
department A even if the employee change of department.

opw-1824913
2018-03-19 09:37:27 +01:00
Odoo Translation Bot 4fd4816d49 [I18N] Update translation terms from Transifex 2018-03-18 00:26:00 +01:00
Toufik Benjaa 62b80d1da2 [FIX] payment_authorize: crash on invalid expiry date
- This commit fixes crashes occuring when the expiry date for a credit card was invalid.
  Instead of crashing we now warn the customer that the expiry date is invalid.
2018-03-16 18:32:21 +01:00
Romain Derie 9f1438d5f1 [IMP] website: Script injected in DOM: window.onerror empty params
Cherry-pick (and improvement) of 4bd8e3e (11.0) which should have landed in 10.0

Closes #21032
2018-03-16 16:12:29 +01:00
David Arnold 9035378d4b [FIX] stock: use full name in error message
IT was not possible to differenciate between variants as using the
product.template name in the message.
Same for the location were it was using the last level name (e.g. 'Shelve 42')
instead of the full path

Closes #20174
2018-03-16 15:39:38 +01:00
Martin Trigaux 38e4b2b50a [FIX] l10n_multilang: followup of 3bf9cf4f36
The change was made in the code but not in the error message

Courtesy of Stephane Bidoul
2018-03-16 15:22:27 +01:00
Martin Trigaux 06737c3441 [FIX] account_check_printing: compare float correctly
Example failing before this commit:
- amount = 11.01
- decimal = 11.01 % 1 = 0.009999999999999787
- 0.009999999999999787 < 0.01

Use correct float_is_zero method to test if there is decimal or not

Closes #18306
2018-03-16 14:18:37 +01:00
Martin Trigaux 9fd5df4305 [FIX] survey: add missing groups
Survey Users have a correct record rule but portal and employee had no rule,
being able to read more records than a Survey User

Closes #23675
2018-03-16 13:58:25 +01:00
Stéphane Bidoul (ACSONE) 854943379b [FIX] hr_expense: fix Not Refused filter
"cancel" is not a valid hr.expense state
This filter should be the opposite of the one above.

Closes #18823
2018-03-16 13:23:54 +01:00
Jerther 0ee76b664c [IMP] doc: add a tip to create a model without any table
As explained in #17386, _auto=False on a model is used for report where the
table is explicitely created in init method.
To create a model without any table, AbstractModel should be used.

Closes #19448
2018-03-16 12:57:16 +01:00
Akim Juillerat c4a11cb42a [FIX] stock: use correct warehouse name in multicompany
At stock installation, the warehouse0 has the name of the first company found
(order "sequence, name"), while the comapny_id field is
`_company_default_get('stock.inventory')` (the company of the user installing
the stock module).

In a multi-company environment, it is possible than both results are different
and having name = 'Company A' and company_id = 'Company B'.

Use the name of the default company as default value for the field name.
Note that 'stock.inventory' is not needed in _company_default_get call but
kept to match the default of company_id (in case of override).

Using a default on the field will impact all the future records but should,
hopefully, not be problematic as it is a valid default value.

Closes #19563
2018-03-16 12:12:30 +01:00
Stephane Bidoul 3bf9cf4f36 [FIX] l10n_multilang: correctly set src
While it is the name of the record that is set most of the time, it can also
be different value (like tax description)

Closes #21651
2018-03-15 16:40:53 +01:00
Romain Derie 2b5bb95d43 [FIX] website: make 'Optimize SEO' working again (for empty fields)
This commit https://github.com/odoo/odoo/commit/965f49201812cc3cca319a3b5b93331272dd2288 removed empty meta-description and meta-keywords from
the DOM for SEO audit reasons (these tags when empty are considered as
duplicates at a SEO point of view).

By doing so it prevent the 'Optimize SEO' to work correctly since it can't
retrieve the DOM elements that are used to store the user modifications until
he saves.

Now, even when these meta-tags are empty, we display them to people having the
rights to 'Optimize SEO'.

This closes #23659
2018-03-15 15:03:34 +01:00