Before this commit, trying to pay a sale order from portal would throw an
error
* create an order in back end, set a partner, a product, a quotation
template and 'Online Payment' as Confirmation Mode;
* confirm the order;
* go to the order in portal (/quote/XX) and click on 'Pay Now';
It throws a server error because route is being called with unexpected
keyword arguments like success_url, error_url, callback_method.
Otherwise access token is not correctly propagated notably in payment
form. This means customers paying invoices through the customer portal
without being logged are not correctly redirected once payment is done
as the access token used to display invoices is lost.
This reverts commit cfd5f47493.
It is not clear why it has been done. Original author thinks it can
be reverted as it makes Odoo have people without image which is not
good when starting with Odoo. We don't know what we want but what is
certain is that we need images instead of ugly void placeholder.
This fixes several problems with the reconciliation widget when used with multi-currency.
- company in EUR, create invoice 25 USD, statement of 25 USD (in journal USD), try to reconcile, the amount is not correctly converted, we see two different values, can't reconcile
- company in EUR, create invoice in EUR, statement in USD journal, the amount displayed for the EUR invoice is not correct
When using the HTML editor, when attempting to save a syntax-invalid
XML, the error line is supposed to be displayed in red. This was not
the case anymore since saas-15. This was a simple mistake of comparison
between a stringified integer ID and its integer equivalent.
On rereservation of an mo, it will remove the existing stock.move.lots
if no quantity was done on them. We wanted to avoid however that it
would remove the temporary stock.move.lots on the workorder. On the normal
ones however, there is also a workorder_id. That way it would
not unlink stock.move.lots when you had workorders. By checking the temporary or
not flag (done_wo) instead of workorder_id, we solve the issue.
Courtesy of blaggacao fixes#19422
Calendar tests did not go into US for a timezone problem, making it more difficult to correct errors.
To do: pass all the tests js in US (with simplification for the calculations of the times)
Tasks are showing up on Wednesday when they are Thursday. Checked the dates
on the tasks and my timezone preferences are set to Americas-New York.
fix: Do not apply timezone for all day mode.
Suppose that we have a form view with a one2many field o2m_1,
displayed as a list. The model of o2m_1 contains a one2many field
o2m_2 which isn't displayed in the list view, but which is in the
form view. If an onchange sets the value of o2m_1, e.g. with a
command 0 to create a new record, and that the value of o2m_2 for
this new record is set (e.g. with a command 0 as well), it crashed.
A traceback was raised when opening a new record for a model with a
one2many displayed inside a one2many (e.g. simply displaying the
number of records in the relation), and with an onchange setting a
default value to the inner one2many (for example, linking it to
existing records).
As the inner o2m has no subviews, it has no fieldsInfo, and the
code assumed that fieldsInfo was always set.
This was for example reproducible from v11 as follows:
- create a product (with MTO/Buy and call for tender (need
purchase agreement module))
- create an SO with this product and confirm it
- go to purchase order form view and add a move_dest_ids field in
the tree definition of field order_line
- go to menu purchase agreement and choose the PA generated by
your SO
- add a vendor, confirm the PA and click on 'New Quotation'.
The ORM doesn't automatically link subrecords when it receives an
update command for a one2many. However, it may be necessary when
the default_get returns existing records for a one2many field. It
only worked before this rev. for the hr_expense model because of an
hack from 2016 (to reproduce: go to Expenses, check some expenses
from the list view, in Actions, click on 'Submit to Manager', the
new hr_expense_sheet contains the checked expenses (one2many), and
the webclient only sent an update command by linked subrecord).
This rev. fixes the problem properly: when the default_get returns
existing subrecords for a one2many field, a link_to command (4) is
generated alongside the update (1) command.
Before this commit, buttons in form view with the confirm attributes had
a peculiar behaviour:
- < saas-16: they saved the record as soon as you clicked on them, so
the warning was basically ignored
- in saas-16+ (the new views): the button did not save the record before
calling the method, at all.
This can be a problem, obviously. Also, it does not seem consistent to
have a different behaviour when the user clicks on OK in the confirm
dialog, compared to a button without the confirm attribute.
So, with this commit, we just make sure that such buttons save the
record before calling the method, just like other buttons.
As a way to optimize loading, images are not necessarily fetched in db.
They have, in their url a "unique" parameter, which is the last_update date on **the record** and controls on the python-side whether it should get the image from a cache or from the db.
Before this commit, this __last_update field wasn't present in the view, so it wasn't fetched, and writes on a model's image worked but did not refresh.
The image displayed was the old one.
After this commit, when the image field widget is present, we force the loading of the __last_update field of the record.
Upon update, the image displayed is the new one.
OPW 777552
closes#20457
Fixes 27280fefa9:
* `partner_id` is an `int` not a recordset
* qweb Response is lazy (the template is only looked up and rendered
when we actually need to send the content over the wire) => the error
would occur outside of the try..except block. Force rendering
(`Response.flatten`) so we can handle the issue here
* Uses the HttpCase interface to contact the server over a new socket
(same as tours & al) because using `werkzeug.test.Client` would not
use the correct cursor (?) and so the test data would not be visible
In case of custom field 'upload file', the attachement
name will be the technical name of the input tag of the
form (aka 'attachments'). It is more user friendly to have
the name of the uploaded file.
If the user selected 'use_create_lots', he should see the text field and
not the many2one. This improves the usability of the barcode scanning in
a receipt, where the lots were not displayed (as it only set the
lot_name).
1- When viewing for example journal items.
2- Now activate a filter that would display no record
Before this commit, the column aggregates of case 2 were the same as case 1.
After this commit, we recompute the aggregate, which ever case we are in.
OPW 777660
closes#20452
A list view can display the sum of all values for one field, using the
'sum' attribute. Before this commit, this sum was not updated whenever
a field was changed (but it worked when adding a line).
Before clicking on 'Change Password' button, a new password must be
written. Otherwise an error was raised: TypeError: secret must be
unicode or bytes, not bool.
opw:777921
- Install Website Live Chat
- Publish a Livechat on the website
Crash on rendering:
```
<img t-att-src="user.image_small and ('data:image/png;base64,' + to_text(user.image_small)) ...
```
Commit 1df6f4c741 fixes a P2/P3 compatibility by including the helper
`to_text` in the QWeb context. However, it was included only for reports
(in `ir.actions.report`), while it is necessary for the rendering of all
templates.
opw-777681
opw-777630
Create an accout.voucher with "Pay Directly" as payment.
You get something like:
D | C
--------------------
Expenses: x |
Cash: | x
However, the expense line doesn't appear in the reconciliation widget
because the payment_id is missing in the account.move.line and then, doesn't match
the search domain for the reconciliation.
To solve it, a payment_id is created for this line in case of "Pay Directly" payment.
-opw: 775167
When showing a list in Calendar, it is always sorted at least by
id. If the recordset mixes real and virtual (recurrent) events, this
will blow up as sort() will try to compare the int-typed real event
ids and the string-typed virtual event ids.
Generate a type-compatible id key for both real and virtual events in
order to properly sort.
Closes#20278
Between v9.0 and v10.0 a pricelist refactoring made it so negative
discounts no longer worked correctly. They should always be
included in the unit price of the product (not to be displayed as a
negative discount even if the option to display the discount is
enabled).
This commit also corrects currency conversion issues when basing the
price on another pricelist with a differnt currency, and when making
the sales order in a company with a different currency than the
pricelists currency.
If the user change a filtered field, the record is not always displayed.
Wrong domain construction. The automatic filter must be use to filter and
remove items from the view for the unselected and not display the selected.
Complement of 5b50284127
The mentioned commit works well when adding a product, but
- changing the quantity
- changing the customer
won't trigger the fix of the included price.
opw-776530
Countries with several official languages often have multiple names for their
states. Allow to translate the state name for such countries.
Some monolingual countries but, yet, with a need of translation of the addresses
such as China or Germany can add the same flag in their respective l10n_* module
Closes#19481Closes#20259
With this commit, we allow an onchange coming from a field to modify the
same field. This was not working for field widgets derived from an
input field.