Commit Graph
117156 Commits
Author SHA1 Message Date
Goffin Simon c487381dbf [FIX] pos_restaurant: Installing pos_restaurant with demo data
When installing the module pos_restaurant with demo data, the check boxes for
module_pos_restaurant and is_table_management must be checked.

opw:785943
2017-12-05 16:56:30 +01:00
Christophe Simonis b8540eefe3 [MERGE] forward port branch saas-15 up to 970be94f37 2017-12-05 16:46:14 +01:00
Christophe Simonis 970be94f37 [MERGE] forward port branch saas-14 up to e9c2dcd28d 2017-12-05 14:52:16 +01:00
xmo-odoo 96fcd4b56c [FIX] website_sale_stock: don't break product from non-website routes
Fixes #21442
2017-12-05 14:35:31 +01:00
Yannick Tivisse 03375dad3c [FIX] product: Hide product variant field if option not actived
Purpose
=======

If the group_product_variant is not activated, the field should be hidden
2017-12-05 14:26:56 +01:00
Christophe Simonis e9c2dcd28d [MERGE] forward port branch 10.0 up to dd7ee15fb8 2017-12-05 14:21:11 +01:00
Christophe Simonis dd7ee15fb8 [MERGE] forward port branch 9.0 up to ce038f5d15 2017-12-05 13:52:02 +01:00
Lucas Perais (lpe) 2a86e9245c [FIX][BACKPORT] Always round monetary values in database
backport of afef71d6b9

Original commit message:

Let `create` and `write` round monetary field values before sending them to the
database. Pass the values to be written to `field.convert_to_column`, so that
the currency can be retrieved from the values, and the value be rounded.
2017-12-05 13:46:06 +01:00
Xavier Morel 150fc064fd [FIX] product: image changes not sticking everywhere
Fixes #20046

Simply reverting e5ef1c5917 looks to
work *but* since I didn't note the repro case for the issue and don't
remember what it was it may re-introduce previous breakage. Instead,
ensure all "sizes" for the image are reset if any of the sizes is
present *and* Falsy by adding a final case to the conditional.

If any of the image fields is present and non-falsy one of the
previous branches will be taken, so we can just check that any of the
image fields is present at all (this implies it's falsy).
2017-12-05 13:35:51 +01:00
Romain Derie ce038f5d15 [FIX] auth_oauth: correctly retrieve user facebook email
Before this commit, you could never get the user's facebook email. Since there
was no email field on facebook response, email would be then set to an auto
generated value like 'provider_2_user_0123456789123456' by odoo.

Now, we correctly request user's email to facebook.

opw-782771
2017-12-05 13:29:06 +01:00
Adrien Dieudonne 6d7d6d9460 [FIX] web: debug_manager: change view_type to form in url
Before this commit, there were an error when you tried
to change the view_type directly from the url in debug mode.
The controller of the view wasn't defined and a crash happened
when we tried to render the DebugManager.View.

To fix this, we now wait for the 'switch_mode' which sets
the controller to the active view.
'do_load_state' is now chained to 'switch_mode'
2017-12-05 11:37:48 +01:00
Nicolas Lempereur 04bfd54013 [FIX] sales_team: multicompany issue typo 3ad1867e
3ad1867e could lead to wrong results in a multicompany setting because
the change got the company from the lead but it was intended to be
gotten from the user.

Since ('company_id', 'child_of', False) returned "root" companies, the
code still got a sales team but possibly one from another company if the
user was on another company that its sales team.

This would lead to an access issue that this commit solves.

opw-784455
closes #21428
2017-12-05 11:07:51 +01:00
Ruter fe8668e509 [FIX] web: Setting disable_favorites on Search View causes Exception 2017-12-05 09:31:00 +00:00
Ruter ed326e0569 [CLA] signature for ruter 2017-12-05 09:31:00 +00:00
jem-odoo 969184e4da [FIX] sale_timesheet: timesheet revenue should be zero on milestone 2017-12-05 09:59:37 +01:00
jem-odoo 1f09312bde [FIX] sale_timesheet: reset delivered qty when removing last timesheet line
When removing a timesheet line (on delivered quantity SO line), the delivered
quantity should decrease. This is the case when the is at least one timesheet
left, but not when we remove the last timesheet.
Forcing resetting value to zero make vendor bills flow, so adding
'sale_analytic_norecompute' key was required to force delivered
quantity.

This commit fix this bug, and provides some tests.
2017-12-05 09:59:37 +01:00
Alexandre Kühn 6cc5a9963b [FIX] web,*: time format from user's language
Before this fix, the chatter always showed dates of messages in military time format.

This was not the expected behavior, as the user could have had customize
the date and time format in the settings of the current language.

Steps to reproduce the issue:

1. Set Odoo in English
2. Settings > Translations > Languages > English
   2.1. Set Date Format to %m/%d/%Y
   2.2. Set Time Format to %I:%M:%S %p
3. CRM > (Select any opportunity with at least one message) > Mouse hover on elapsed time (e.g. "an hour ago")

Expected:

- It shows the customized time format (e.g. 11/07/2017 5:33:36 PM)

Results:

- It shows the military time format (e.g. Tue Nov 07 2017 17:33:36 GMT+0100)

opw-781647
2017-12-05 09:13:31 +01:00
Lucas Perais (lpe) 519555054a [FIX] web: BinaryFile not download when new record
Let's have:

- on res.company a binary file field named x_file
- on res.users a related binary field to company_id.x_file, and make it readonly
- On the res.users form view, display the new field
Before this commit in create mode, upon clicking on download the file, the server crashed, because the record id was empty.
Then, the JS crashed in turn because of the unhandled 404 from the server.

Since the id of a new record will always be unset, we choose to disable the download option in this very specific case

OPW 777042
2017-12-05 08:19:08 +01:00
Joren Van Onder b2f0af4543 [FIX] point_of_sale: allow searching a partner on >2 fields
When searching for a partner the ' ' (SPC) character can be used as a
field separator. You can search for e.g.:

'agr namur'

which will return the 'Agrolait, 69 rue de Namur,...' partner.

For some reason only the first space was considered a separator. So
e.g.:

'agr namur belgium'

wouldn't work.

This commit makes it so that every space character is considered a
separator.

Fixes #21357
2017-12-04 14:18:36 -08:00
Christophe Simonis a8d01cbf4e [MERGE] forward port branch saas-15 up to a447da75fd 2017-12-04 20:12:19 +01:00
Christophe Simonis a447da75fd [MERGE] forward port branch saas-14 up to e7d174a142 2017-12-04 19:25:51 +01:00
Christophe Simonis e7d174a142 [MERGE] forward port branch 10.0 up to 78aef7605c 2017-12-04 19:06:41 +01:00
Adrian Torres 78aef7605c [FIX] *: ordered group_by for field with capital letters
When doing a group_by in a tree view, and then ordering by an
aggregated field which contains at least one capital letter in its name,
you will get an error and won't be able to ordery by this field.

Why? read_group is called when sorting a group by, which calls
_read_group_raw which then goes to call _read_group_prepare, which will
return order by terms in this manner ['id asc', 'x_Test desc']
the problem with this is that postgres automatically converts
non-quoted/non-qualified column name to lowercase, of course this means
that if we have a field "x_Test" but no field "x_test", it will try to
look up "x_test" instead of "x_Test" and since the column doesn't exist,
it will throw a ProgrammingError.

This commit changes this behavior by wrapping the order_by terms generated in
_read_group_prepare with double quotes, which postgres interprets
correctly.

Fixes #21348

Cherry-Pick of c338e24ee7 as previous
forward-port has been badly done...
2017-12-04 18:49:31 +01:00
Christophe Simonis 8a9973bd2a [MERGE] forward port branch 9.0 up to c338e24ee7 2017-12-04 18:34:01 +01:00
Josse Colpaert 220bdb3587 [FIX] mrp: qty producing on update qty of mo
When updating the quantity of an MO, the qty we are producing on a work
order should possibly be updated.  When the finished product is tracked
by serial number it should be 1.0 when some quantity is still to be
treated.  (and not 0 as before)

opw-785190
2017-12-04 17:18:16 +01:00
Cedric Snauwaert 3549688b21 [FIX] account: fix reconciliation that create double entries in some case
commit 2f3b469dee fixes a problem
where open balance had to be added in the lines to create,
however in the case where no line is selected, a new one is created automatically
(for usability purpose) and the balance was not update correctly,
resulting in the creation of a double entry.
2017-12-04 16:33:53 +01:00
Adrian Torres c338e24ee7 [FIX] *: ordered group_by for field with capital letters
When doing a group_by in a tree view, and then ordering by an
aggregated field which contains at least one capital letter in its name,
you will get an error and won't be able to ordery by this field.

Why? read_group is called when sorting a group by, which calls
_read_group_raw which then goes to call _read_group_prepare, which will
return order by terms in this manner ['id asc', 'x_Test desc']
the problem with this is that postgres automatically converts
non-quoted/non-qualified column name to lowercase, of course this means
that if we have a field "x_Test" but no field "x_test", it will try to
look up "x_test" instead of "x_Test" and since the column doesn't exist,
it will throw a ProgrammingError.

This commit changes this behavior by wrapping the order_by terms generated in
_read_group_prepare with double quotes, which postgres interprets
correctly.

Fixes #21348
2017-12-04 16:28:32 +01:00
Christophe Simonis 426e269c22 [MERGE] forward port branch 10.0 up to 067a241ea8 2017-12-04 16:24:24 +01:00
Géry Debongnie e6146db88a [FIX] web_editor: make sure html editor does not ignore changes
For some reason, Summernote does not trigger a change event in some
cases.  It looks like it happens in 'codeview' mode, and when the change
in question is only a backspace key event.  Maybe it listen for keypress
and backspace do not trigger keypress event.

In any cases, the situation is that it is not easy to clear an html
field: going in edit mode, then selecting the content and pressing
backspace will not work before this commit.

With this commit, we specifically compare the value in the editor with
the current value to determine if the field is dirty.
2017-12-04 16:03:37 +01:00
Xavier Morel 5972969568 [FIX] base: encoding headers works better if we return the encoded value
Looks like a `return` was skipped/missed when the code was converted
to Python 3, and since there's a shortcut for pure-ascii values this
took some time to notice (and bubble up).

Fixes #20713
2017-12-04 15:57:04 +01:00
Lucas Perais (lpe) 067a241ea8 [FIX] product, web: many2one child of value
Before this commit, when a product category had a similar name than an other
e.g. ALL / Exp and ALL / Expenses

When entering the list view of its products, it displayed the product linked to the category with the similar name
e.g. When opening ALL/Exp products list, it displayed its products **plus** the products of ALL/Expenses

After this commit the list view just contains the active category's products

OPW 782905
2017-12-04 15:42:49 +01:00
Lucas Perais (lpe) 4aef443135 [FIX] product: product category smart button: sub categ too
Before this commit, the smart button on the form of product category
only displayed the number of product for the current category,
whereas the list view of products (when you clicked on the smart button)
displayed all sub-categories products.

After this commit, the behavior is harmonized: all sub-categories products
should be accounted for and displayed

OPW 782905
2017-12-04 15:42:06 +01:00
Christophe Simonis e0ea17990a [MERGE] forward port branch 9.0 up to 62fcf6a9fe 2017-12-04 15:33:24 +01:00
Christophe Simonis 62fcf6a9fe [FIX] project: only copy tasks when not explicitly set 2017-12-04 15:07:49 +01:00
Adrien Dieudonne ab42507d46 [FIX] web: datepicker: notify all datetime changes
Before this fix, there was an issue when you changed the value of
a datetime field by editing direclty the input (without using the
datepicker popup).
If this value was equal to the offset of your timezone,
the new value wasn't saved. The problem was that no event was
triggered by the 'bootstrap-datetimepicker' lib because it
considered that the old datetime and the new datatime were the
same...

In odoo JS, we always manipulate UTC moment objects and we
manually add the timezone offset at rendering (we mainly do that
for testing purposes). When the offset is added, calling format()
on the moment object doesn't convert the datetime to the browser
timezone because it's flagged as being UTC.

The datepicker lib creates moment objects in the browser timezone.
So comparing the ones it creates with the one given by Odoo is
like comparing apples and oranges, and it gives wrong results
when the datetimes differ by the exact timezone offset. So in this
case, no 'datetime change' is triggered by the lib.

We could fix this by wrapping moment objects into some kind of
OdooDate class and stop manually adding the timezone offset, but
this would involve a refactoring that can only be done in master.

Instead, we prefered to patch the lib to ignore the comparison
between UTC and non-UTC objects, as this is the safest way we
find to fix this issue in stable version.
2017-12-04 14:46:12 +01:00
Lucas Perais (lpe) 88ef8a1bde [FIX] website_sale: better address management portal
Before this commit, when editing the shipping id of a partner having a company_id,
an Error 500 was thrown because of recursive hierarchies.

On top of that, since no employees should be able to modify its company's address,
we hide the dit button in that case
BUT we display addresses type=other (the one that a child of a company has anyway)
meaning that the billing address appears also as a shipping one.

OPW 782524
2017-12-04 14:39:09 +01:00
Nicolas Martinelli e5075147cf [FIX] web: pie chart
Mixing positive and negative values in a pie chart is not possible.
However, in this case, a crash occurs instead of displaying an error
message.

opw-786137
2017-12-04 14:02:12 +01:00
Nicolas Martinelli 055f8e0fcd [FIX] project: archive project
Archive the associated analytic account when a project is archived. Once
a porject is archived, it is assumed that we don't want to use the
analytic account anymore.

Moreover, it might be tempting for a user to delete these "useless"
analytic accounts, and therefore it would delete the archived projects
and tasks without notification.

Closes #21224
opw-784685
2017-12-04 13:57:50 +01:00
Arnold Moyaux 9c4c51f417 [FIX] mrp: handle by_products
When creating by products during a workorder the move lines
for the final moves are not created and the user has to manually
create them on the manufacturing order view.

This commit adds an automatic action in order to create
the correct move lines with the consumed quantity for the
by products not tracked by lot or SN.

This commit also fixes a bug where the consumed move lines where
not linked to the by products move lines
2017-12-04 13:44:40 +01:00
Arnold Moyaux 2afedc99a6 [FIX] mrp: workorder SN required only when moves are consumed
When the user do a work order with a final product
tracked by lot or serial number. A serial number is
asked at the end of the first workorder. The purpose is
to link consumed products with the SN/lot produced.

However it could happens that no component are consumed
during the first and following work order.

This commit allows to by pass the lot/SN registration if
nothing is consumed.
2017-12-04 13:38:22 +01:00
Lucas Perais (lpe) 8b875e4dd4 [FIX] web: hide binary file download when new record
Let's have:
- on res.company a binary file field named x_file
- on res.users a related binary field to company_id.x_file, and make it readonly
On the res.users form view, display the new field

Before this commit in create mode, upon clicking on download the file, the server crashed, because the record id was empty.
Then, the JS crashed in turn because of the unhandled 404 from the server.

Since the id of a new record will always be unset, we choose to disable the download event in this very specific case

OPW 777042
2017-12-04 13:20:18 +01:00
Christophe Simonis 7b808982a0 [MERGE] forward port branch 9.0 up to 5e38bef5a5 2017-12-04 12:55:38 +01:00
qsm-odoo 5e38bef5a5 [FIX] website: review iframe video building
/!\ This commit *must* be "forced" forward-ported /!\

Recent commit(s) broke existing databases making website videos
disappear / not be saved / ...

Original code was broken then fixed by a succession of commits which
solved some errors to create new ones. Hopefully, this one is the right
stable one. Existing databases should be restored while allowing new
videos to be added correctly no matter the version. In master, a solution
must be found to smoothly migrate old videos to a new better system.

See:
https://github.com/odoo/odoo/commit/8749410b1033ddec1207ce1db42d1889a0d2ea33
https://github.com/odoo/odoo/commit/45e0cd564afdae71e9525193250744e88076da71
https://github.com/odoo/odoo/commit/6d2bf44fee76a8b73ebad206cd7a283c88b6c4ef (opw-783233)

opw-786165
2017-12-04 11:45:06 +01:00
Alex 424533f694 [CLA] signature for satriani-vai
Closes #21387
2017-12-04 11:40:47 +01:00
qsm-odoo 3a1c56f885 [FIX] point_of_sale: set correct label for start category setting
The label of the setting was linked to the invisible m2o field to
choose the start category instead of the start category setting
itself. The problem was that when clicking the label, instead of
checking the config checkbox, it opened the m2o's dropdown though
it was invisible.

opw-784599
2017-12-04 11:34:12 +01:00
Luc De Meyer ab52c636c3 [FIX] account: use proper return format for default_get
default_get expects ids, not recordset (e.g. called by webclient)

Closes #21358
2017-12-04 10:22:35 +01:00
Yannick Tivisse c423f9c209 [FIX] l10n_be_hr_payroll: Correct frenglish labels 2017-12-04 10:13:41 +01:00
Yannick Tivisse 878d44cf1c [FIX] l1On_be_hr_payroll: Compute correctly the brut2net if >20 holidays
Purpose
=======

Currently the wage reduced by a superior amount of 20 holidays is not taken into account in the brut2net computation.

Specifiation
============

Take also the wage deduction into account
2017-12-04 10:13:41 +01:00
Yannick Tivisse 671b9172e2 [FIX] l10n_be_hr_payroll: Hide editable holidays field 2017-12-04 10:13:41 +01:00
Yannick Tivisse ee999ce609 [FIX] l10n_be_hr_payroll: Extend default leave days amount to 35 2017-12-04 10:13:41 +01:00