Commit Graph
109490 Commits
Author SHA1 Message Date
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
Nicolas Martinelli e03a06b3e9 [FIX] crm: favorite filters
- Go to CRM > Reports > Pipeline
- Click on one of the Favorites filters (e.g. 'Opportunities Won Per
  Team')

A JS error arises.

The filters are not correct. `__count` should be `__count__` and
`expected revenue` should be `expected_revenue`.

opw-1825759
2018-03-15 13:26:48 +01:00
Goffin Simon b669c71aa3 [FIX] calendar: in multicompany user cannot access own calendar
Let's consider user1 and user2 allowed to access company1 and company2
In multicompany with shared partners unchecked in general settings,
if one of two users sharing the same event tried to access the event
when they are not in the same current company at this moment, an access error
was raised.

opw:1817475
2018-03-14 17:17:32 +01:00
Yannick Tivisse 1663133873 [FIX] purchase: Don't auto subscribe recipients on mail composers
Purpose
=======

During the refactoring of the purchase module something went wrong when overriding the 'send_mail' method.

The 'mail_post_autofollow' key should have been set into the context only for the purchase orders model.

See: https://github.com/odoo/odoo/commit/cb01be2#diff-fe8587929089e5fdb6c75687011b1c7eR822
2018-03-14 16:09:57 +01:00
Christophe Simonis 69ebbeea06 [MERGE] forward port branch 9.0 up to f1608829a1 2018-03-14 13:48:57 +01:00
Ivan Yelizariev 9fc44bef83 [IMP] web_tour: specify timeout per step
RUNNING_TOUR_TIMEOUT is equal to 10 seconds, which sometimes is not enough on
travis and we need a way to increase timeout per step.

Note: Exact same commit was already merged for version 11.0 here: 67e2372
Note 2: this is technically a IMP, not a fix, but I (GED) will accept this, since this should only impact the testing functionality.  Also, this was done in 11.0, so in some sense, it was proved to work.

(PR: #21750)
2018-03-14 11:31:55 +01:00
Laurent Smet f1608829a1 [FIX] account: add missing constrains dependencies
Create a move line having:

amount_currency = 1000
debit = 0
credit = 1000

The error is raised, it's ok.

Now, create a move line having:

amount_currency = 1000
debit = 1000
credit = 0

Then save, edit and write:

debit = 0
credit = 1000

No error raised, it's wrong!

-opw 1818714
2018-03-13 16:55:36 +01:00
Jeremy Kersten 4252cd7053 [FIX] doc: update footer links
Synchronize footer from odoo.com with the documentation.
2018-03-13 15:51:15 +01:00
Bole f521606d12 [CLA] signature for dajmi5
Done at #23606
2018-03-13 14:45:27 +01:00
mrshelly 255f9ee330 [FIX] hw_scanner: add missing import
`os.path.isdir` was not being imported
2018-03-13 14:29:25 +01:00
len-odoo 0c5841dccf [FIX] website_sale: display prices using public user pricelist on the shop
When a pricelist was set on the public user that was different from that of the
website, the prices were displayed using the public user default currency,
but the currency symbol displayed was the website default currency.
The issue was that in the template, the currency was accessed as a computed,
related field of website while the price was obtained using a function call.
In the first case the field was obtained using sudo, and thus the call would not
get the public user pricelist.

Equivalent to #23519 for odoo 11.0

opw-1819230
2018-03-13 12:46:37 +01:00
Nicolas Martinelli b522ab5772 [FIX] account: tax rounding
- Set 'Round Globally'
- Create an excluded tax of 10 %
- Create an invoice for a product costing 34.55, and apply the tax.

The tax on the invoice is 3.46, while the tax on the tax line is 3.45.

When rounded in `compute_all`, the tax amount is 3.455, which is the
value expected. However, the `create` method won't round this value
before storing, leading to the inconsistency.

We make sure to round the amount to the currency precision, so the
value 3.46 is recorded.

opw-1819902
2018-03-13 12:42:54 +01:00
Christophe Simonis 0440e25380 [MERGE] forward port branch 9.0 up to 7c6da3e076 2018-03-12 14:33:58 +01:00
Raphael Collet 2ea3c333e4 [FIX] models: update non-stored inverse field on several records
Issue: when the inverse method writes on a dependency of the first record, it
invalidates the cache of the field for the other records...  Solution: simply
evaluate the inverse method one record at a time.
2018-03-12 13:35:57 +01:00
Nicolas Martinelli 2021f44c0e [FIX] fields: empty date or datetime
When the `create` or `write` method receives an empty string for a date
or a datetime field, PostgreSQL will fail since this is not an accepted
value for this field type.

We fallback on `None` for falsy values.

opw-1819336

@KangOl : watch out when forward-porting, the signature of
`convert_to_column` has changed in saas-14.
2018-03-12 12:01:42 +01:00
David Arnold 231cae2e7f [FIX] fields: copy_cache with failed values onto sudo env (#23122)
Do not copy failed values, as they usually reveal access error that should
not occur in the sudoed env.

Closes #23121
2018-03-12 10:14:01 +01:00
Alexandre Kühn 3360c550cc [FIX] board: redirect to form on calendar event click
Before this commit, when clicking on a event of a pinned calendar view
in the Dashboard app, nothing occurs.

The cursor turns into pointer type when hovering on an event, suggesting
that clicking on it should do something. Kanban and list views redirect
the user to the document's form on click, so a similar behaviour is
expected with calendar view.

This is indeed the case in v11, but not in v10. The reason that it works
in v11 for calendar is that when we click on a record of a pinned views
in dashboard, it performs a do_action to open the form view. In v10, however,
it performs a do_switch_view to the form view. Since there's only one view mode
when we pin something in dashboard, the processing of the click fails silently.
Kanban and list were working because the dashboard app overrides their
handlers functions when loading the views, which wasn't the case with calendar.

This commit solves the issue by also overriding the handler function
of calendar view, so that it performs a do_action to open a form instead
of performing a do_switch_view to the form view.

(Note: pivot and grid views work, because they use do_action)

opw-1817725
2018-03-12 08:38:52 +01:00
Simone Rubino 671d54114f [FIX] project_issue: override _track_template
Properly override `_track_template` similarly to what is done for
`project.task`, so the method can accept a recordset.

Co-authored by: Nicolas Martinelli <nim@odoo.com>

Closes #23466
opw-1823244
2018-03-12 08:13:00 +01:00
Simone Rubino 18109edc6e [CLA] Signature for SimoRubi 2018-03-12 08:13:00 +01:00