Commit Graph
114833 Commits
Author SHA1 Message Date
Martin Trigaux ca0875231f [FIX] survey: properly detect wrong token
Was in old API
  user_input_obj.search(...)[0]
but the tr/except was not migrated

Introduced at 66cb880
2018-02-13 15:56:01 +05:30
Christophe Simonis 169f899e29 [MERGE] forward port branch saas-16 up to 835e5ed62b 2018-02-12 13:11:09 +01:00
Nicolas Lempereur 1c5bb8564b [FIX] web_editor: regression less editor 5af122387
In 5af12238 a change was made to have the correct hierarchy levels, but
this can cause an issue when editing less files.

This is because we now had "undefined + 1" which gives NaN which breaks
Array constructor.

opw-814579
opw-815397
opw-814322
opw-815265
opw-814021
closes #23006
2018-02-12 11:57:39 +01:00
Christophe Simonis 835e5ed62b [MERGE] forward port branch saas-15 up to 0401a7349e 2018-02-12 11:46:00 +01:00
Christophe Simonis 0401a7349e [MERGE] forward port branch saas-14 up to 851c29ce0e 2018-02-12 11:45:00 +01:00
Aaron Bohy 11dff2b05c [FIX] web: ListView: format footer values
Before this rev., the aggregates values displayed in the footer of
list views were formatted according to the field type, and the
field's widget was ignored, whereas it should be used by default.
For instance, if the 'float_time' widget is set on a float field,
the sum should be formatted as FloatTime as well.

Closes #22724.
2018-02-12 11:11:43 +01:00
Aaron Bohy 0982ceaa37 [FIX] web: ListView: reset selection when reloading
Before this rev., the list of selected records wasn't correctly
reset when the list was reloaded (e.g. when coming back using the
breadcrumbs). In the UI, the records weren't selected anymore, but
in javascript, the list of selected records wasn't empty. As a
consequence, the aggregates were wrongly computed, and always
displayed 0.

Closes #22725.
2018-02-12 11:11:43 +01:00
Lucas Perais (lpe) b6d156ad7a [FIX] web_planner: take 'view_type' of action into account
Before this commit, when a planner made a link from an action, the view_type was always 'list'
This prevented the view from being properly loaded, as an action of view_type form wouldn't be recognized

After this commit, such links are well formed, and form view_type actions are correctly loaded

OPW 806758
2018-02-12 11:05:30 +01:00
Christophe Simonis 851c29ce0e [MERGE] forward port branch 10.0 up to 0351677a00 2018-02-12 10:52:34 +01:00
Géry Debongnie e0cb522bf2 [FIX] web: update form widgets when state has changed
Since the <widget> tag is not used anymore in any of our views, it was
not really properly supported. In particular, the form widget was not
notified when the state of the form view has changed, which makes it
very difficult to actually do any useful work.

With this commit, we make sure that the widget method 'updateState' (if
it exists) is called with the new state whenever it changed.

This should allow developers to do useful work without having to work
around the issue. Note that this is not really a perfect solution, since
the updateState methot may or may not have been implemented.

I think that we need some kind of ViewWidget abstraction, which could be
used to have a better and more complete API for widgets in a basic view.
And AbstractField could inherit from ViewWidget.
2018-02-12 10:35:54 +01:00
Raphael Collet 9e6bc391be [FIX] stock: workaround to make dp work in tests 2018-02-12 10:28:59 +01:00
Rémi Rahir 8b9bcf1b7e [FIX] crm_phone_validation: fix lead phone validation
Fixes country_id and company_id mismatch in 65832dc.

Removes the view added by said commit as it was not a true stable
fix since it required users to update the module.

This commit uses a workaround to get the missing company_id field
which is monkey-patching the fields_view_get of the model, as
suggested by rco.

This commit also removes the exception catches that were rendered
useless by the False value given to the raise_exception parameter
of phone_format, introduced in 65832dc as well.

This commits fixes the behaviour in the website form as the phone
numbers were sanitized but never saved as such on their record.

This commit also renames the Phone Validation config setting to
suit its true functionality.
2018-02-12 09:16:17 +01:00
Odoo Translation Bot 26468bfaba [I18N] Update translation terms from Transifex 2018-02-11 04:26:28 +01:00
Odoo Translation Bot 0351677a00 [I18N] Update translation terms from Transifex 2018-02-11 00:48:18 +01:00
Olivier Dony b8c8a5aef8 [FIX] l10n_fr_hr_payroll: adapt terminology for simplified payslip
Partial adaptation of terminology for simplified french payslips.
A thorough review of the current payslip is necessary and planned.

Cfr. https://www.economie.gouv.fr/entreprises/nouveau-bulletin-paie

OPW-805984
2018-02-09 18:20:57 +01:00
qdp-odoo 2aabdc00c3 [FIX] account: allow XML-RPC call to action_validate_invoice_payment on account.payment.
The method was returning no value (~None) which then blown up when serialised back to XMLRPC. Fixes #22630
2018-02-09 17:29:56 +01:00
Aaron Bohy 20e4cd5bcd [FIX] web: field widget with readonly modifier
Rev. dbdd742 introduced the 'baseMode' parameter of field's nodes
in the BasicRenderer. Its purpose is to encode the generic mode
of the field, regardless of its readonly modifier (i.e. in form
views, the baseMode of all fields is the mode of the renderer and
in list views, the baseMode of all fields is 'readonly', except for
fields in the row being edited, whose baseMode is 'edit').

Unfortunately, when the value of the readonly modifier of a field
was 'readonly', its baseMode was changed from 'edit' to 'readonly',
which shouldn't, as the baseMode's value should not be affected by
the modifiers.

This produced a bug when a field had a readonly modifier, as once
its value became true, the field was rendered in 'readonly', and
whatever the value of the modifier afterwards, it always remained
in 'readonly'.

The rev. ensures that the baseMode is no longer impacted by the
value of the readonly modifier.

Closes #22729
2018-02-09 15:36:14 +01:00
Christophe Simonis 4b43803dc6 [MERGE] forward port branch saas-16 up to e2ae51c4b0 2018-02-09 15:02:31 +01:00
Lucas Perais (lpe) 89c63096cb [FIX] point_of_sale: aml from pos.order.line should have their tax group and children
Having a product on which a group of taxes apply (containing children taxes, obviously)
Make a sale
Validate the entries

Before this commit, the account_move_line created from the pos.order.line
had only the group of taxes as their tax_ids
Which is inconsistent against what account.invoice do,
and against what the generic report tax does

After this commit, we imitate what happens on invoices, and the movel line
created from the pos.order.line has the children of the group and the group as tax_ids

OPW 806089
2018-02-09 14:46:14 +01:00
Lucas Perais (lpe) e67d6f85c3 [FIX] account: event on onFilterChange
Before this commit, on the reconciliation widget in Firefox
filtering lines through the input triggered a Traceback
This was due to the use of the absence of a defined "event" parameter on the handler

After this commit, filtering does work as expected

opw 813791
2018-02-09 14:42:57 +01:00
Christophe Simonis e2ae51c4b0 [MERGE] forward port branch saas-15 up to 6d0f63ec4e 2018-02-09 12:41:15 +01:00
Christophe Simonis 6d0f63ec4e [MERGE] forward port branch saas-14 up to 9b2d3b19a6 2018-02-09 12:40:16 +01:00
Christophe Simonis 9b2d3b19a6 [MERGE] forward port branch 10.0 up to df3fb9f85a 2018-02-09 12:39:43 +01:00
Christophe Simonis 5cf12bfba4 [FIX] sale_timesheet: extract theoritical revenue values computation
This allow easier potential overwrite and ease migration.
2018-02-09 11:55:08 +01:00
Jeremy Kersten df3fb9f85a [FIX] calendar: fix partners_to_notify to have flat list of ids
Before this commit, user see a traceback:
(res_users.partner_id in (3,ARRA.. ...
operator does not exist: integer = integer[]

After update from initial commit
After append from commit 1bb74b7588
Now,  extend to allow [1].extend([2,3])

This commit closes #22944

Courtesy of @paulius-sladkevicius for reporting
2018-02-09 10:54:54 +01:00
William Henrotin 6718de5393 [FIX] i18n: correct two traduction in tax names 2018-02-09 10:00:18 +01:00
mreficent aac8f9730e [FIX] base: on_change_country() on res.company should return an ID
Previously, the return value was sometimes an int and sometimes a browse record.
Was PR #22810. Courtesy of Miquel Raïch (Eficent)
2018-02-09 09:53:57 +01:00
Christophe Simonis 047796817c [MERGE] forward port branch saas-14 up to 3a1df2cf22 2018-02-08 18:08:52 +01:00
Christophe Simonis 3a1df2cf22 [MERGE] forward port branch 10.0 up to 1b5ecbb047 2018-02-08 17:30:08 +01:00
Christophe Simonis 1b5ecbb047 [MERGE] forward port branch 9.0 up to ce51ad7e69 2018-02-08 16:43:44 +01:00
Christophe Matthieu d288b33648 [IMP] web: use patch for object in tests to avoid edge effects 2018-02-08 15:46:00 +01:00
Christophe Matthieu 1d49d52b3a [FIX] web: properly set parent when using mixins
The parentedMixin doesn't automatically set the parent, so when this mixin
is used, the parent must be set manually. This wasn't done at several places,
and thus those elements weren't destroyed with their actual parent.

In master, we should probably make the ParentedMixin set the parent itself.
2018-02-08 15:46:00 +01:00
Christophe Matthieu b28ceec009 [FIX] web: Views: always destroy BasicModel instances
Before this rev., it might happen that the parent of BasicModel instances
wasn't correctly set to the Controller instance. It was actually set to the
ActionManager instance, which is never destroyed. So when this happened,
the BasicModel instance wasn't destroyed when it's controller was.
2018-02-08 15:46:00 +01:00
Christophe Matthieu 4f5fc6ee55 [FIX] web: properly set parent when using mixins
The parentedMixin doesn't automatically set the parent, so when this mixin
is used, the parent must be set manually. This wasn't done at several places,
and thus those elements weren't destroyed with their actual parent.

In master, we should probably make the ParentedMixin set the parent itself.
2018-02-08 15:45:30 +01:00
Christophe Matthieu 83795d37f3 [FIX] web: Views: always destroy BasicModel instances
Before this rev., it might happen that the parent of BasicModel instances
wasn't correctly set to the Controller instance. It was actually set to the
ActionManager instance, which is never destroyed. So when this happened,
the BasicModel instance wasn't destroyed when it's controller was.
2018-02-08 15:45:30 +01:00
Simon Lejeune 625a648f22 [FIX] stock, mrp: untracked quants and unreservation
- create a product comp1 tracked by lot
- make an inventory adjustment for comp1 ; 1 quant with lot1 and 1 quant
  without lot
- create a bom for product finished1 composed by 1 comp1
- create a mo for 1 finished1, reserve it
- the mo reserved the quant with lot1
- produce finished 1
- unlock the mo
- change the component from lot1 to lot2 (that do not exist)
- the write on a move line will trigger a re-reservation that will
  fallback on the quant without a lot (that's how untracked quant for
  tracked products are handled)
- delete the move line, it'll unreserve with lot2 and fail

We fix the issue by applying the same logic of fallback on the untracked
quants in the unreserve of a move line.

We add a test for the unreserve of a move, as it simply unlink the move
lines.

opw-814914
2018-02-08 12:58:47 +01:00
Christophe Matthieu ae39a89a09 [FIX] web_editor: add thumbnail image to send attachment 2018-02-08 11:25:51 +01:00
Christophe Matthieu 6494f51171 [FIX] base/mail: Added an access_token on the attachments url
The access_token is automatically added by the media editor. It's added
on the website and by the html editor to send by email. The widget display
the attachments from 'ir.ui.view' (public attachment) and the attachment
from the current record.

Issue: can't load image in gmail or mobile because the client mail use a
proxy who avoid ours odoo access.
2018-02-08 11:25:51 +01:00
Christophe Matthieu 152e3f8686 [FIX] web_editor: encoding of the attachment name is missing in image src 2018-02-08 11:25:51 +01:00
qsm-odoo ce51ad7e69 [FIX] web_editor: allow deleting all images in table cells
Before this commit, it was impossible to delete an image which was a
direct child of a table cell using the trash-icon button in the
toolbar.

This commit fixes the behavior by changing the logic quite a lot, so
it is kinda tricky (see https://github.com/odoo/odoo/commit/25849e918651eba080dac3af4e4fcdc8f1280241
for more explaination).

Closes https://github.com/odoo/odoo/issues/22523
2018-02-08 10:48:14 +01:00
qsm-odoo 8dfd6a2507 [FIX] web_editor: fix image deletion and replacement
Deleting/replacing an image through summernote gave unexpected results.
As modifiying the related function may be tricky, this commit instead
wrap them to solve the specific erratic behavior: if the range is in/
matches an image, then simply remove the image and move the cursor to
its previous location.
2018-02-08 10:48:14 +01:00
Yenthe V.G 72a8b420d2 [IMP] doc: specify to go in developer mode to access a feature
Closes #22877
2018-02-08 15:10:23 +05:30
Lucas Perais (lpe) d2f9994e92 [FIX] sale, website_quote: right display of confirmation mode
Create a quotation in sign confirmation mode.
Send it by email
Follow the link

Go the quote's user's portal
Go to the quotes menu, and enter the right SO

Before this commit, although the confrmation mode of a SO
was rightly computed, it was badly retrieved and displayed.
The button on the email was 'accept and pay'
On the portal, the form view of the SO displayed 'pay now'

After this commit, in both cases it displays 'accept and sign' or the like

OPW 806554

related to #22390
2018-02-08 10:32:00 +01:00
Lucas Perais (lpe) 9645a64d0e [FIX] base_vat_autocomplete: address fields should not be conservered on change vat
Bafore this commit, fields that were not written during on change were kept
leading to having a wrong overall address when changing vat when the return of the API
did not contain the same fields as before.
Also, ZIP from Netherlands were not supported

After this commit, when changing the VAT number, fields that were not set by this operation
are reset to False
Also, NL zip codes compute fine

OPW 807666
2018-02-08 10:29:30 +01:00
Pedro M. Baeza 84b0ec4da3 [FIX] delivery: Get correct carrier price on picking created from SO
Steps to reproduce:

* Create a sales order (SO).
* Assign a carrier.
* Don't press on "Set price" button next to carrier.
* Validate SO.
* Validate picking.
* Delivery line is added to the SO with price 0.

This is because the delivery SO line is added with the value of
picking carrier_price field, but that field hasn't been set.
If you modify on view carrier field, there's an onchange that
fills correct price, so I use that onchange method for getting
same results.
2018-02-08 10:17:06 +01:00
Christophe Simonis da19a7701e [MERGE] forward port branch saas-16 up to 23752102a0 2018-02-07 17:47:26 +01:00
Robert Rübner 32a7a1ed09 [FIX] website: do_not_show option in translator dialog not working
Before this commit, it would do the opposite of what it should:
When 'Do not show this dialog later' is checked, it would remove the
localStorage item instead of creating it.
When unchecked, it would create the localStorage item to prevent the dialog to
shows up again.

Now, we perform the correct behavior.

This closes #10882, closes #11550
2018-02-07 16:34:38 +01:00
Martin Geubelle 36d07bfc0f [FIX] web: properly handles ESC in editable lists
This is a small correction of odoo/odoo@3aad756 ; a traceback occured when ESC
was pressed in a list view with modifiers.

The `confirmChange` was done on the parent datapoint (of type list) which has no
attribute `evalModifiers`.

`confirmChange` is now called on the record datapoint. Note that for x2m, it
means that all modifiers linked to the parent record won't be re-evaluated (but
this wasn't probably intended as this is a bit overkill).

Closes #22718
2018-02-07 15:25:54 +01:00
Martin Geubelle 4ae44b3bd9 [FIX] web: prevent crash when downloading pivot view
A traceback was occuring when downloading the pivot view without data.

The export function expects the attribute `main_row` set on data, which
is defined in `_prepareData`. The latter wasn't called because of the `return`.

Closes #22728
2018-02-07 15:25:54 +01:00
Christophe Simonis 23752102a0 [MERGE] forward port branch saas-15 up to 830327c66a 2018-02-07 15:18:07 +01:00