Commit Graph
109091 Commits
Author SHA1 Message Date
Arnold Moyaux 6d02f7d6bf [FIX] purchase: Only use purchase UOM on vendor bill
It was the purpose of this commit fea667a243
However it uses purchase uom in any cases and not
only vendor bill.

This commit correct it by using it only if a purchase
order is linked to the invoice.
2017-12-11 11:24:33 +01:00
Odoo Translation Bot f3623f1513 [I18N] Update translation terms from Transifex 2017-12-10 00:42:03 +01:00
Pierre Masereel 6b27d9f91a [FIX] point_of_sale: digits field doesn't exist on currency
As the field digit doesn't exist on currency, we use decimal_places
instead which is the field containing the number of digits of the
corresponding rounding field
2017-12-08 16:03:08 +01:00
Pedro M. Baeza cd31e82689 [FIX] account: Allow to duplicate supplier invoices
As there's a check for unique supplier reference numbers, you can't duplicate them as the field is copied on the duplicated record. This patch removes the copy for emptying the error.

@Tecnativa
2017-12-07 09:08:17 +01:00
Lucas Perais (lpe) bf119dcff6 [FIX] account: predicting receivable/payable on partner in tests
Before this commit, when a localization defined default payable or receivable
accounts on partners (like l10n_do does)
The reconciliation tests that involve an invoice on the one hand and a payment on the other hand
broke just because the accounts of the payment and the one of the invoice did not match

After this commit, we force the receivable or payable account to be the partner's (if available)
and the tests do not break
2017-12-06 17:18:45 +01:00
auyeung112002 bde7030c59 [CLA] auyeung112002 signs the CLA
Backport of ecbf7aa471 to 10.0
Asked at #21284
2017-12-06 16:47:46 +01:00
Lucas Perais (lpe) fd560917ab [FIX] point_of_sale: sale details report correctly renders float
Before this commit, when printing all orders from the POS interface,
the ticket sometimes showed weird amounts (like 128.25000000001).

This was due to the usual problem of representing a float and has nothing to do with Odoo.

After this commit, the templates correctly display the amounts, rounded according to the currency
We do this by applying the relevant qweb widget (or calling the right format function in JS)

OPW 784626
2017-12-06 16:35:34 +01:00
Pedro M. Baeza f6321ab94c [FIX] hr_attendance: Make department related field readonly
Related fields that are not readonly are rewritten each time you save the
associated record, provoking performance problems.

Moreover, we don't want to allow an employee to change its department through
an attendance record.

Closes #21441
2017-12-06 16:25:41 +01:00
jat-odoo 0a90393da3 [FIX] web_editor: show proper video on existing video edition
See https://github.com/odoo/odoo/commit/5e38bef5a5ededb28707af44a19caaec2af2d682
and especially https://github.com/odoo/odoo/commit/45e0cd564afdae71e9525193250744e88076da71

Closes #19673
2017-12-06 15:16:46 +01:00
Lucas Perais (lpe) af8908b03c [FIX] stock: do not propagate date when negative delta
In Pick - Ship:
- validate a sale order which scheduled date is an hour in the future.
- validate the WH/PICK picking

Before this commit the WH/OUT picking 's scheduled date was set a day in the **past**

This was due to the implementation of datetime substraction and timedelta, which,
in case of a negative value, would take -1 day and some complementary values (hours, minutes etc...)
(the difference is complementary)

After this commit, the WH/OUT picking 's scheduled date stays what it was in that particular use case.

OPW 784452
2017-12-06 14:30:44 +01:00
Nicolas Martinelli 9d0b4d0c2d [FIX] base: deactivate lang
- Install a new language
- Set it as default for several users
- Open the language and click on "Deactivate"

Traceback.

Fixes #21418
opw-786342
2017-12-06 10:20:35 +01:00
Nicolas Martinelli d81000d0a6 [FIX] point_of_sale: virtual keyboard
Several issues arise with the virtual keyboard.

Issue 1
- Go in client list
- Go back to product list

The keyboard is still connected to the client search field.

Issue 2
- Go in client list
- Add a new client
- Click on any field

The keyboard is still connected to the client search field, it's
impossible to fill in any client data.

opw-784613
2017-12-06 08:12:04 +01:00
Christophe Simonis dd7ee15fb8 [MERGE] forward port branch 9.0 up to ce038f5d15 2017-12-05 13:52:02 +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
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
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
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
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
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
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
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
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
Maximilien Tantin a9add3b9a8 [FIX] website_sale: translate buttons
Log In and Sign Up was not translatable

Closes #21333
2017-12-04 09:36:27 +01:00
Adrien Dieudonne e15e6fe32e [FIX] web_editor: support of SVG elements in snippets
Before this commit, it was not possible to save a page
containing a snippet with a SVG tag.

To support SVG elements, we need to use 'Element.getAttribute'
and 'Element.setAttribute' as mentionned in the documentation:
https://developer.mozilla.org/en-US/docs/Web/API/Element/className

For more information, see GH-14485
2017-12-04 09:24:35 +01:00
Nicolas Martinelli 73f7567627 [FIX] point_of_sale: default fiscal position
- Create 2 FPos (1 & 2)
- Create 3 customers:
  Customer A has no FPos
  Customer B has FPos 1
  Customer C has FPos 2
- Set-up the POS so that FPos 1 is the default FPos (FPos 2 is not
  accepted in the POS)

Issue 1
- Select Customer A

The FPos is set to blank, while one would expect to keep the default
FPos.

Issue 2
- Select Customer B
- Deselect Customer B

The FPos is set to blank, while one would expect to keep the default
FPos (as it was before selecting B).

Issue 3
- Select Customer C

The FPos is set to blank, while one would expect to keep the default
FPos since his FPos is not accepted.

opw-782855
2017-12-04 09:07:34 +01:00
Odoo Translation Bot 60801e5375 [I18N] Update translation terms from Transifex 2017-12-03 00:41:36 +01:00
Adrian Torres 3d1e23aaba [FIX] *: Reset module states on registry init error
Commit 763d714 introduced cron job locking for databases which had
modules with states set to 'to x', however if an
installation/uninstallation/upgrade fails, the state will stay at 'to
x', and it may stay in that state for an indefinite amount of time,
meaning that cron jobs could stay locked forever.

This commit fixes this in part by adding a cleanup function to loading.py that
will be executed whenever load_modules fails, the function will change
every 'to x' module to their original state, effectively unlocking the
execution of cron jobs.

This however only works to prevent "zombie" transient states for
brand new databases, however for existing databases which already
contain some modules in a zombie state it won't do anything unless
a module is installed/uninstalled/upgraded, which may never happen.

This is where the second part comes in (ir_cron.py), when failing to
execute crons, we check if the failure was due to bad module state
and if an arbitrary amount of time (5 hours as of this commit) has passed
since the last time it was supposed to be executed, if it is the case, it means
that the cron execution failed around 5 * 60 times (1 failure per minute for 5h)
in which case we assume that the crons are stuck because the db
has zombie states and we force a call to reset_module_states.
2017-12-01 14:15:42 +00:00
David Vidal 441b2bf894 [FIX] website_event: add missing translation term
Was added at 78014ff

Closes #21372
2017-12-01 10:59:58 +01:00
Odoo Translation Bot 19fda52a53 [I18N] Update translation terms from Transifex 2017-12-01 02:53:01 +01:00
Christophe Simonis ba73fd534d [MERGE] forward port branch 9.0 up to fe4bb49b21 2017-11-30 13:55:01 +01:00
Thibault Delavallée fe4bb49b21 [FIX] mail: fix wrongly duplicated access right 2017-11-30 12:55:48 +01:00
Christophe Simonis 99f343c7b6 [MERGE] forward port branch 9.0 up to 82bde85030 2017-11-30 10:55:32 +01:00
Danimar Ribeiro 2896193d45 [FIX] website_blog: Add empty oe_structure to allow insert content before blog posts
This commit closes #14058
2017-11-29 17:08:44 +01:00
Jairo Llopis 05938ceb3e [FIX] website: Use current website's menu to determine home page
This commit closes #20722
2017-11-29 16:59:31 +01:00
Jeremy Kersten 52bf41e7f2 [FIX] website_sale: improve polling at confirmation page
At this step, Order is not always confirmed
2017-11-29 16:39:30 +01:00
Jeremy Kersten ee1d83dc3c [FIX] website_event: display normal 404 for non website editor.
Without this patch, the user will see a button 'create a new page' on the 404
for the controller /event/<event_id>/page/<page>
2017-11-29 16:38:04 +01:00
Martin Trigaux 159bcf3cc2 [I18N] update Danish terms
Courtesy of Visti Kristensen, IT-konsulent
2017-11-29 14:33:19 +01:00
Romain Derie 82bde85030 [FIX] website_sale(_options): text in field qty throws error and/or create infinite quotations
Before this commit:
1. If user wrote text in the quantity field to add to his cart, it would crash
and show a server error.

Now, if the user insert a non-valid quantity in the field, we set it to 1

Step to reproduce:
With website_sale only
  - Go to a product page on the shop
  - Insert 'abc' in the quantity field and click 'Add to Cart'
  - Server will throw an error 'Can't parse float..'
With website_sale_options
  - Go to a product page on the shop
  - Insert 'abc' in the quantity field and click 'Add to Cart'
  - Popup confirmation with optional product will show with 'NaN' in the qty
  - Click 'Proceed to checkout'
  - Server will throw an error 'Can't parse int..'

2. On the checkout, if user typed text in qty field it would create infinite
quotations.
Some modules (eg: website_event_sale) would hide this behavior because they
override the RPC call to '/shop/cart/update_json' and throw an error on the
RPC.

Now, if user type incorrect integer quantity, we set the quantity to 1.

Step to reproduce:
1. On base (website_sale only)
  - Add an item to your cart
  - On checkout page, set qty to 'abcd' or whatever text
  - Check your browser console, every 500ms their will be a RPC call
  - Check your quotations in backend, their will be a new one every 500ms
2. On db-all
  - Add an item to your cart
  - Set qty to 'abcd' or whatever text
  - Check your browser console, it will throw an error on the second call

This closes #20482, closes #20904
2017-11-29 13:31:59 +01:00