Commit Graph
103218 Commits
Author SHA1 Message Date
boogerlad 6c0bf660b1 [CLA] Signature for boogerlad.md 2017-01-10 22:39:06 +01:00
Olivier Dony cd4ff9341e [FIX] http: make error 400 slightly more user-friendly
Users who get an error 400 due to an invalid CSRF
token might be doing something legit. For example
they may have opened the page with the HTTP form
2 hours before posting it, and let the CSRF token
expire naturally (default lifetime is 1h).

In this situation the "invalid CSRF token" message
might be too cryptic for them to understand that
they need to refresh the form and try again.

Mentioning that their "Session expired" as well
should sound more familiar and lead to the right
reaction.
2017-01-10 17:09:03 +01:00
Denis Ledoux fc813847d8 [FIX] account: wrong counterpart in invoice / out refund register payment
Revision 20935462a0
introduces the below regression:

When registering a payment on a customer invoice refund
or a vendor bill, with a payment difference

e.g. payment of 101 for an invoice of 100

and marking the invoice as fully paid,
the counter part in the payment account move
were wrongly computed:

In those cases,
its the payment total minus the invoice residual total
that must be performed, and not the other way around.

This revision solves this, inspired on how
the payment difference is computed for display
in the wizard on how it was before the above revision,
in the method `_compute_payment_difference`

Fixes #15000
2017-01-10 16:49:21 +01:00
Denis Ledoux 23deeb187d [FIX] account_check_printing: remove useless sudo
This sudo is useless, and prevent the use of the record
rules on the creation of payments.

opw-703143
2017-01-10 15:09:24 +01:00
Nicolas Lempereur 3f7b1f6083 [FIX] web_editor: ignore read only + debug + write
In some case (for example the one solved with b51d21c5) we can have
write done on a field text in read only mode.

With 98ed53ce if :

- such a case happened (in b51d21c5 the fix only worked after the given
  field was written one time) or a similar instance,
- and the user was in debug mode,
- and the widget used was TextFieldHtmlSimple

this could lead to an issue with the code trying to toggle the code view
mode whilst the editor is closed.
2017-01-10 08:31:38 +01:00
Simon Lejeune 17adc2e09e [FIX] barcodes: form view barcode handler: concurrency
Suppose the following usecase: you scan the first product of the
picking. A server onchange is then triggered. You scan the same product
a second time, before the first onchange has returned. You expect that
the first onchange is completely executed before running the second one.
This was not the case. Moreover, some onchanges were not be able to
work with the invalid  state of the formview at some times, and crashed.

The previous implementation was wrong because id didn't run the main
barcode processing mechanism inside a Mutex. It was also wrong because
it didn't correctly wait for the onchange to execute (a previous  barcode
onchanges or some classic ones) before setting the barcode field.
2017-01-09 16:36:00 +01:00
Nicolas Lempereur f27e69eced [FIX] web_editor: harmless ; missing in 98ed53ce 2017-01-09 16:26:15 +01:00
Nicolas Lempereur 81b668c3e3 [IMP] web_editor: tour testing inline editor saving (up to s11)
With 98ed53ce when a form view is saved when a html field is in code
view mode, the change is not lost.

This new backend tour check that when saving in or not in code view, the
content is saved effectively.

The test not in code view would ensure issues like #14381 #14351 #14394
are detected on runbot.

closes #14475
opw-693052

note: the old test system is used so this test is only for up to saas-11
2017-01-09 16:06:46 +01:00
Nicolas Lempereur 98ed53ce3a [FIX] web_editor: don't lose modified code view content
The intended scenario when using the code view is the following:

1) click on code view button to use code view
2) make changes
3) click on code view button to get back to wysiwyg view
4) save from the wysiwyg view

If the 3rd step was not done:

- for the inline editor, we lose the changes that have been done in
  code view,
- for the iframe editor, we lose the entirety of the content.

At one time the user was forced to go back to wysiwyg before being able
to save, but this have been removed hence the present usability issue.

With this fix, when the editor content is saved, if the user is in code
view he is automatically set back to wysiwyg view.

fixes #14648
closes #14475
opw-678677
opw-693052
2017-01-09 16:04:42 +01:00
Nicolas Lempereur d40edd7052 [FIX] web: wraparound no create editable list
In e0c4ec54ca a change was done to improve the behavior in some
editable list instances, but this introduced a small issue for
list with line creation disabled.

With this change, doing tab or enter at last line should keep the
previous behavior of wrapping around and not creating a new line.

opw-703748
2017-01-09 15:03:29 +01:00
Odoo Translation Bot 62817a80d3 [I18N] Update translation terms from Transifex 2017-01-08 02:56:42 +01:00
Odoo Translation Bot d995739241 [I18N] Update translation terms from Transifex 2017-01-08 00:29:28 +01:00
Christophe Simonis e0d33ce07d [MERGE] forward port branch saas-6 up to 9ba3762a32 2017-01-06 17:29:42 +01:00
Christophe Simonis 9ba3762a32 [MERGE] forward port branch 8.0 up to 75692bc988 2017-01-06 17:27:06 +01:00
Christophe Simonis c382c8f2fa [IMP] core: module loading: less verbose logs
Only warn about non loaded declared models with a minimal logging level.
2017-01-06 17:11:30 +01:00
Nicolas Lempereur 678c42aeb0 [FIX] web: FieldCharDomain wrong count if other lang
The number of records selected by a FieldCharDomain was only computed
with the base language.

But when selecting the domain with a modal window, or when sending a
mass mailing restricted to a domain, the current user language is used.

With this commit, the number of records is computed with the current
user language.

opw-693836
2017-01-05 19:18:06 +01:00
Denis Ledoux c389a6576b [FIX] website_mass_mailing: typo in unsubscription confirmations and translatable
There was an obvious typo in these confirmations,
and they were not yet translatable.

opw-703745
2017-01-05 16:59:16 +01:00
Goffin Simon 416892279d [FIX] account_asset: Wrong account set in Vendor Bill
This reverts commit 804ef6f.

1. Generating the vendor bill by adding the related Purchase Order:
in that case, it works well since the system has a first on-change on the product when selecting the asset type;
it sets the asset account in the expense account of the product which in turn is used as the vendor bill account.

2. Creating the vendor by adding manually the product which is an asset:
in that case it takes the wrong account since it used the depreciation account instead of the asset one.

But the labels cannot be changed because the case 1 works.

opw:702265
2017-01-05 13:21:51 +01:00
Goffin Simon bf89a58acd [FIX] l10n_es: Wrong user_type_id for 47... accounts
opw:696888
2017-01-05 13:01:11 +01:00
Luc De Meyer 75692bc988 Update account_report_common.py (#14891)
[FIX] account: fixed onchange_chart_id that was failing on last and first day of the year.

Courtesy of Noviat
2017-01-05 10:25:39 +01:00
Christophe Simonis cbff8629fa [IMP] core: allow declaration of end migration scripts
These `end` migration script will be executed when all modules have
been updated and models setup.

Also accelerate the search of migration scripts, speeding up registry
loading.
2017-01-04 15:49:02 +01:00
Odoo Translation Bot cc2af89454 [I188888888N] Update translation terms from Transifex 2017-01-04 14:54:07 +01:00
Denis Ledoux b201da493d [FIX] sale: Ukrainian translation instead of English (UK)
opw-702022
2017-01-04 14:31:55 +01:00
Goffin Simon 0ef0e141c0 [FIX] web_graph: Adding to dashboard a customized view
When reading customized views from our dashbord in reporting,
the measures selected in the customized views were not taken into
account. It happened when the customized view was build from a report.

opw:698105
2017-01-04 10:28:33 +01:00
Nicolas Martinelli d619ad464f [FIX] sale_service: update SO lines
To reproduce:
- Create 2 products with 'Track Service' set as 'Create a task and track
  hours'.
- On a SO, add these 2 products and confirm (2 tasks will be created)
- Go to Timesheet > Activities, and create a line for Task 1. The
  delivered quantity of Product 1 in the SO should be modified
  accordingly.
- Change the activity line by setting 'Task 2' instead of 'Task 1'.

The delivered quantity of Product 2 is updated accordingly, but the
delivered quantity of Product 1 is unchanged.

This is a complement of commit 4e60d28d00.

opw-693520
opw-695087
2017-01-03 17:01:47 +01:00
Nicolas Lempereur bbc4137600 [FIX] calendar: partner filter for search more or created
When adding a partner "filter" to the calendar view, it only works if we
select directly the partner and not when we choose him via "search more"
or create him on the fly.

This commit uses the partner id directly which is available in the field
value in those three possible instances.

opw-702491
2017-01-03 16:57:20 +01:00
Philipp Hug 7cd2969b09 [FIX] sale_layout: correct the alignment of taxes
To do the same on the rapport as what was done at #14511
2017-01-03 16:01:50 +01:00
Philipp Hug 4ea61f6c54 [FIX] sale_layout: unify tax displayed field in report
Use the same logic to display taxes as in the default report:
use the tax description and fallback on the name

Already done in report_invoice_document and report_saleorder_document

Closes #14906
2017-01-03 15:57:29 +01:00
Christophe Simonis 1aad733dc4 [IMP] base_import_module: correct validation of custom views
Consider also imported and exported views when validating custom views.
2017-01-03 13:12:17 +01:00
Christophe Simonis fc91feda30 [IMP] core: more lenient check of custom views
By not marking invalid custom views as a failure, this allow database
migrations to not be considered failed for simple errors that can be
solved after migration.
2017-01-03 13:12:17 +01:00
Daniel Dico f984073251 [FIX] pad: get pad content with newlines
Some more recent versions of etherpad can have newlines in the pad
content. Allowing newlines should not break anything that worked
before and allow more etherpad versions to be used.

closes #14877
opw-703173
2017-01-02 18:35:41 +01:00
Christophe Simonis 3805eb620a [MERGE] forward port branch saas-6 up to 7be1a1c55b 2017-01-02 11:42:52 +01:00
Christophe Simonis 7be1a1c55b [MERGE] forward port branch 8.0 up to 2b8fcfc08b 2017-01-02 11:22:45 +01:00
Odoo Translation Bot 2b8fcfc08b [I18N] Update translation terms from Transifex 2017-01-01 02:58:08 +01:00
Odoo Translation Bot 072906795c [I18N] Update translation terms from Transifex 2017-01-01 00:30:05 +01:00
Nicolas Martinelli a71cdd02ec [FIX] payment_paypal: documentation link
The Paypal URL doesn't exist anymore. Redirect to Odoo documentation
instead.

opw-697606
2016-12-30 15:01:43 +01:00
Nicolas Lempereur eb2d598935 [FIX] auth_oauth: dup fail if odoo oauth provider removed
It is unwise to delete it (it can simply be disabled) but it can be done
(and other part of the code take it into account).

opw-703196
2016-12-30 11:29:48 +01:00
Nicolas Martinelli 8a1b55ae04 [FIX] website_sale: default company on SO
In multi-company:
- Create 2 companies A and B
- Set the superuser on company B
- Set the website on company A

When a SO is generated from the eCommerce, it is defined on company B,
while it should be on company A.

opw-695253
2016-12-29 13:49:28 +01:00
Goffin Simon 30fb3f7c4c [FIX] stock: Making inventory adjustments in multi companies
With Company A (Warehouse Wa) and Company B (Warehouse Wb)

When making inventory adjustments for Warehouse Wb in company A,
the inventory lines displayed must only be the lines of the company A in
the Wb.

In this way, the user avoids confusion with the adjustments he is creating.

opw:697182
2016-12-28 15:51:15 +01:00
Goffin Simon b58b334ace [FIX] stock: Inventory adjustments in multi company
When making an inventory adjustments in multi company, the company field
must be set according to the location_id set. In this case, it avoids creating
by default different inventories for the same warehouse.

opw:697182
2016-12-28 15:45:49 +01:00
Denis Ledoux 7befe67a75 [FIX] account: compute_invoice_totals with amount currency set, but to False
This is related to revision dfcc0c40b1

If the invoice line provided the amount currency, but
set to False, the amount_currency must be computed anyway

opw-702045
2016-12-28 14:57:27 +01:00
Denis Ledoux dfcc0c40b1 [FIX] account, stock_account: anglo saxong cost price currency rounding
When selling in a foreign currency,
A double currency rate change, one in each way, was applied when creating the good cost
move line of the invoice, which leaded to some precision loss when the decimal accuracy was
set with a number of digits greater than the currencies digits rounding

e.g.
Product cost price: 52.56422
CAD to USD rate: 0.7383

The product cost price is always in the company currency
while `_anglo_saxon_sale_move_lines` always returned the price
in the currency of the invoice. A first conversion rate was applied
from the company currency to the invoice currency.

52.56422 * 0.7383 = 38.808163625999995, rounded to 38.81

Then, when validating the invoice, and creating the move line,
the price was then converted again, to the company currency,
as the debit/credit of a move line is always in the company currency:
38.81 / 0.7383 = 52.566707300555336, rounded to 52.57

The cost price of the product in the good cost move line was therefore
set to 52.57, insteaf of 52.56, because of this precision loss.

With this revision, we avoid to do the currency rate conversion
two times, in both ways, to avoid the precision loss.

opw-702045
2016-12-28 14:19:18 +01:00
Nicolas Martinelli 66732acabf [FIX] hr_holidays: leaves by department
Backport of commit 80963c33b0

opw-702202
2016-12-28 11:24:13 +01:00
Christophe Simonis aa09c52205 [FIX] account: correct query
fix up of commit e98c329039.

opw:702908 opw:702909 opw:702910 opw:702911 opw:702918
2016-12-27 21:02:14 +01:00
Nicolas Lempereur d36dca2d2d [FIX] website_sale: 2 state tags and same shipping change
If website_sale_delivery is installed, when we choose same invoice
address as shipping or another one, a new set of country/state are
displayed.

It is done since if we are using the invoicing address as shipping, the
address must be in the allowed shipping countries and states.

This was solved for some instances with 164b8ed01a but failed in other
instances.

With this fix the two state select tags have references to their own
options which allow us to have it alright for the several possibilities.

opw-693127
2016-12-27 15:44:55 +01:00
Nicolas Martinelli bf88647e8d [FIX] account: show maturity date
When creating a journal entry manually, the user needs to be able to
define the maturity date. It was always shown in v8.

opw-702652
2016-12-27 14:28:28 +01:00
Goffin Simon fe705b514c [FIX] point_of_sale: Product quantity in Orders Analysis
The product quantity in Orders Analysis must be expressed in the uom
of the product like in the Sales Analysis. In a POS order line, the uom
is always expressed in the uom of the product.

Closes #14599

opw:696927
2016-12-27 11:09:08 +01:00
Goffin Simon e98c329039 [FIX] account: where_clause in function _credit_debit_get
The where_clause needed a "AND" to work.
The where_clause didn't contain allias for "account_move_line" so when
injecting a condition with "account_move_line" it crashed.

opw:702538
2016-12-26 13:35:11 +01:00
Odoo Translation Bot 534eab0c3b [I18N] Update translation terms from Transifex 2016-12-25 02:57:37 +01:00
Odoo Translation Bot c484abf7af [I18N] Update translation terms from Transifex 2016-12-25 00:30:02 +01:00