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.
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
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.
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.
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
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#14648closes#14475
opw-678677
opw-693052
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
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
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
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.
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
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
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
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
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.
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
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
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
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
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
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
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
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
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