Now in 12.3, when the a editable list view is grouped, the "Create"
button is no longer shown as was the case before (when it would open the
form view when clicked).
In 12.3 when lines are resequenced, the position of the current line
does not take into account that it could have been changed (because of
drag and dropping a line before or after).
opw-1966589
closes#33878
- When validating a payment an "expected singleton" exception is
raised due to the fact that we are using a recordset with multiple
record instead of a recordset with a single record.
OPW-1981632
closesodoo/odoo#33767
Signed-off-by: Christophe Simonis <chs@odoo.com>
If the company is not set on the SO, the creation of a SO line crashes
because `currency` is empty.
opw-2005143
closesodoo/odoo#33783
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Create an Analytic Distribution for:
Product A
Current user (e.g. Mitchell Admin)
- Sell the product in the POS, request an invoice
The analytic account defined is not used.
This is due to the invoice created as SUPERUSER.
We should first take into account the user on the invoice, then the
current user.
opw-2003935
closesodoo/odoo#33758
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, the payment memo was copied during the duplication
of a voucher. The issue is that the payment memo is not always shown in
the view, and it's mostly unique by voucher.
Now, the payment memo it's not copied anymore.
opw-1986544
closesodoo/odoo#33708
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The stable behaviour of the mail composer is the following:
- if a template adds new attachments, the composer only has this list
- if a template doesn't add attachments, the list is unchanged
- if no template is set, the list is cleared up
In the case of templates, we also check that both static and dynamic attachments
are added to the list.
We clean up after c6d718f211 and subsequently 516f22c398 which failed to take
into account the fact that the attachement list could be a blend of commands
and ids.
Transforming that is taken care of by _convert_to_write, which semantics was
changed by c6d718f211.
To keep the second behaviour, we thus need to add a (5,) command.
opw 2003197
closesodoo/odoo#33706
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
In `_compute_qty_delivered` function
Python `all` function returns `True` if list is empty; thast why check
if `moves` is not empty to set `qty_delivered` to `product_uom_qty`.
Before the fix, if you had multiple accounts for a specific service, the
settings page was crashing.
(eg: for a service, you have one account specific to a company and
another account with no company set).
We now prefer accounts specific to the current company and tie-break on
the most recently created one
opw-2003744
closesodoo/odoo#33736
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
The stable behaviour of the mail composer is the following:
- if a template adds new attachments, the composer only has this list
- if a template doesn't add attachments, the list is unchanged
- if no template is set, the list is cleared up
In the case of templates, we also check that both static and dynamic attachments
are added to the list.
We clean up after c6d718f211 and subsequently 516f22c398 which failed to take
into account the fact that the attachement list could be a blend of commands
and ids.
Transforming that is taken care of by _convert_to_write, which semantics was
changed by c6d718f211.
To keep the second behaviour, we thus need to add a (5,) command.
opw 2003197
closesodoo/odoo#33707
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
If a field is inherited from another model, the attribute context_dependent
was not propagated correctly.
Example of bug:
>>> product = self.env['product.product'].search([], limit=1)
>>> product.name
'Whiteboard Pen'
>>> product.with_context(lang='fr_FR').name
'Whiteboard Pen' # cache used
>>> template = product.product_tmpl_id
>>> template.name
'Whiteboard Pen'
>>> template.with_context(lang='fr_FR').name
'Marqueur pour Tableau Blanc'
>>> product._fields['name'].context_dependent
False
>>> template._fields['name'].context_dependent
True
Fixesodoo/odoo#33641Closesodoo/odoo#33722
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Getting traceback when installing the l10n_ch module.
In the form view of journal, the field "l10n_ch_postal" is added using the xpath.
However the field provided in the expression of xpath('bank_acc_number') doesn't
seem to exist anymore in the form view of account journal.
Hence, it is replaced with the existing field('bank_account_id') in form view
of journal.
task-1999654
closesodoo/odoo#33702
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Since JS refactoring of ActionManager at 32b8cec536, the /apps/<app> controller
was not working anymore as the refactoring dropped the support of `sa` as URL
state.
closesodoo/odoo#33679
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
There was no way to inherit properly action_move_create method.
opw:1974069
closesodoo/odoo#33488
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
If an error is raised when saving a calendar event, the transaction is
correctly rolled back. However, the view is not refreshed and the
incorrect information is displayed.
We simply reload in all cases.
opw-2002186
closesodoo/odoo#33028
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When an error is raised server-side, the complete traceback is displayed
in the JS console. This traceback can be very useful since it might
contain information not recorded anywhere else by default. For example,
access errors due to record rules or SQL constrains do not have their
traceback displayed in the UI or recorded in the log [1], but it is
logged in the JS console.
However, the information is logged in the JS console as a stringified
version of the `result.error` object. The final result is a long and
non-formatted string which is unreadable.
We replace by a new format more convenient for technical teams. The
error is now formatted as:
Error code
Error message
Error data message
Error data debug
This will hopefully give a better starting point for debugging purposes.
[1] SQL constrains tracebacks are only recorded in the log in debug
mode:
https://github.com/odoo/odoo/blob/ec792da72b92b22349b6f325e53fd37d953c7db3/odoo/service/model.py#L122closesodoo/odoo#33650
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Install Babel 2.3.4 as specified in the `requirements.txt`
- In a Python file, do not add the line `# -*- coding: utf-8 -*-`
- Create a translatable string with a non-ASCII character, e.g.
`Amount in €`
- Export the translation
The exported term is incorrect: `Amount in â¬`.
Since the default encoding for Python 3 is UTF-8, it is logical for the
Babel extraction to use it as a default encoding.
The issue was solved in Babel 2.4.0 with commit:
https://github.com/python-babel/babel/commit/33a8fc40d417b401162e2d20021fcbebcc4ab7db
opw-1984480
closesodoo/odoo#33671
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When doing a write on multiple records, message_post expects a single record
if self.ids:
self.ensure_one()
closesodoo/odoo#33645
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
As snapshots are costly to compute, we now create exactly two snapshots:
one initial snapshot and one final snapshot. All intermediate checks
are done with respect to the initial snapshot.
Note also that checks are costly for x2many fields. Therefore, once a
field has changed, it will never be checked again. This optimization is
correct since, by contract, the onchanges of a field are processed at
most once. This guarantees the absence of cycles in onchange.
For instance, assume that field A modifies fields B and C, and that
field C modifies fields D, E and F:
- before: 7 snapshots (snapshot, process A, snapshot, process B,
snapshot, process C, snapshot, process D, snapshot, process E,
snapshot, process F, snapshot)
- after: 2 snapshots (snapshot, process A, process B, process C,
process D, process E, process F, snapshot)
closesodoo/odoo#31872
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Incorporate Carmen Miranda (CarmenMiranda) as Vauxoo's contributor
I confirm I have signed the CLA and read the PR guidelines at
www.odoo.com/submit-pr
closesodoo/odoo#33627
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this commit, when creating a PO line with a description that was long
enough (~2712 bytes long) and then confirming the PO, a traceback would
pop up with an error from postgres "index row size exceeds maximum".
This is because when confirming a PO, a stock.move is created with a
stock.move.line mirroring the purchase.order.line, however the "name"
field on stock.move.line is indexed (whereas the purchase.order.line is
not), thus triggering the aforementioned error.
This commit solves this issue by truncating the name field on the
stock.move.line to 2000 bytes (for simplicity's sake) upon creation.
Fixes#33549closesodoo/odoo#33607
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>