This fixes the following issue. Assume a custom field F is created on
`res.partner`. This field will appear on `res.users` as an inherited field,
and will be reflected in `ir.model.fields` as a 'base' field. When F is
removed from the parent model, it no longer appears on the child model in
registry, but remains in `ir.model.fields`.
The patch allows the proper removal of the no-longer-inherited field from
`ir.model.fields`.
- Create an expense sheet
- Line 1 is 500
- Line 2 is -200
- The total is 300 => a payment of 300 is made
When the payment is validated, the expense is not set as paid.
In v10, one expense line = one account move. In order to know if the
expense is paid we check that each account move is completely
reconciled. The account move of 500 is never completely reconciled by
the payment of 300, so the expense stays opened.
This simply cannot be supported in v10, since each expense line is
handled in a separate account move.
opw-740492
XML-RPC can't serialize None, as a result methods callable over RPC
must return something (True, False, an actual value) otherwise an
error is generated when their result is serialized and sent back to
the client. It happens that JSON-RPC has different limitations and can
serialize None, so MRP had multiple button/action methods which could
be called over JSON-RPC but would break when called in XML-RPC for no
reason.
Fix them by returning `True` or result of `write`.
OPW-728844
When adding a field on a model, only the _inherit were checked, not the _inherits.
This commit fixes the following bug:
1. install `sale` (adding the field `sale_order_count` on `res.partner`)
- field `sale_order_count` is created on `res.partner`
- the ir.model.field is tagged with module `sale`
2. install `point_of_sale` (adding another field on `res.users`)
- field `sale_order_count` is created on `res.users`
- the ir.model.field is tagged with module `point_of_sale`
When installing sale, the model res.partner is returned in the list of impacted
models, on which _create_fields method is called but not res.users.
A direct consequence of this bug is that, the fields translations are in the
wrong module. May fix some uninstallation bugs too.
Closes#16104
In 9.0 the argument pay_journal in function pay_and_reconcile must be an id
but in 10.0, pay_journal must be a recordset with one element. So it was
not possible to call this method by rpc in 10.0
opw:725737
When deleting payment tokens from website, in My account, by clicking
on button "Manage your payment methods", the public user, the user and
the portal user got a 403 error. But when creating a subscription
for a customer with admin user and setting a payment token for
the company of this customer. This payment token could not be deleted
or modified by its users. In a few cases, it's needed to delete or
modify a payment token, for example, when the expiration date of
the payment token is expired.
opw:740169
Default mail.alias for crm.team are currently recomputed/modified
when *setting* use_leads on the team (type changes from opportunity to
leads), but not the other way around (*unsetting* use_leads doesn't
rollback type to opportunity).
Fix this issue.
Leaves over the issue that *disabling* the global setting doesn't
recompute aliases, which it probably should.
OPW-728690
Use case when it can happens (non deterministic):
- Enable product variant
- Have different stock moves with the product variant
- Click on the stock moves in the section reports
- Switch to pivot view
-> Traceback : can't find path of null
This happens in the js in the function find_path_in_tree,
this function try to find path for children object. There is
a condition root.children[i].path[l] === path[l] (2 strings
comparaison).
With product variant this condition can be overpass when it should
have been triggered. The product path string is represented as follow
[Ref]Name(variants) -> Sometime the variants in the string do not have
the same order and thus the condition is never true and the function
return null instead of the correct root.
This commit corrects the name_get function for product product
in order to always return the variants in the same order.
The start command takes the default dbname from the path.
But when running inside a virtualenv, it is a better default to take the
dbname from the virtualenv's path.
SQL that retrieves data for the "Due Payments" report doesn't include
any filter for excluding AR/AP move lines already reconciled, which
shouldn't be presented in this report.
Courtesy of Pedro Baeza. Was PR #16440
On IE (from 9.0 up to at least IE EDGE 14) we have this behavior
for the method serializeToString of XMLSerializer:
> (new XMLSerializer()).serializeToString($('<b>"</b>')[0])
'<b xmlns="http://www.w3.org/1999/xhtml">"</b>'
> (new XMLSerializer()).serializeToString($('<b>"</b>')[0].firstChild)
'"'
Whilst browser such as chromium or firefox have:
> (new XMLSerializer()).serializeToString($('<b>"</b>')[0])
'<b xmlns="http://www.w3.org/1999/xhtml">"</b>'
> (new XMLSerializer()).serializeToString($('<b>"</b>')[0].firstChild)
'"'
Hence for IE9 and over, if in a `<t t-extend/>` a `t-jquery`
sub-directive (without `t-operation`) is available, we can have
broken javascript if a " is transformed into an " at a unfortunate
location.
This commit favour node.data over XMLSerializer serializeToString to
avoid the possibility of this issue when a text node is processed.
opw-727283
The fields `owner_user_id` used `maintenance` search view to filter on
assigned equipment is overwritten in `hr_maintenance` to be computed
based on employee or department manager linked user.
However employee may not have linked user, considering equipment
unassigned.
Use directly the presence of employee or department to
determine if an equipment is assigned or not.
Different method use self._context.get('lang', 'en_US') to get the lang
value but, the lang in the context can be set to None (eg: copy method).
When the context is used with a lang=None, the method can have a
unexpected behavior or crashed (eg: if you try to format a datetime with a
locale=None)
Leads to the Duplicate link (when editing a blog post in website)
yielding a 500 Internal Error instead of duplicating the blog post.
OPW-740308
Fixes#16511
When reconciliating manually, it may be possible to filter between
`All`, `Customers`, `Suppliers`, `Others`.
When changing this mode, we could end up in a situation such as:
1)
- reconciliation widget X is available
- reconciliation widget line XB is being loaded
- mode is changed -> reconciliation widget X is removed
- reconciliation widget line XB loading finishes
-> error because the parent reconciliation widget exists no more.
2)
having no (or less than the expected) or too few results because
removing reconciliation items (when for example we switch from supplier
to customer mode) can be done asynchronically. But the code expected it
to be done synchronically. Also all elements displayed were removed
instead of only the ones of other types.
thus instead of displaying the expected number of reconciliation items:
MIN({num of record to display}, 10)
the records displayed were:
MIN({num of record to display}, 10 - {num records displayed before})
which could amount to 0 event if there was thousands available ones.
This commit solves these two issues:
1) by not adding line to a reconciliation item without error,
2) by counting and removing displayed items correctly
opw-725796
opw-728309
When deduplicating contacts, the function _process_query doesn't use
the orm to fetch the partners to merge according to the criteria.
So there were some access error in multi company when trying to merge
contacts from a not allowed company.
Now a check is made with the orm before merging the contacts.
opw:708457
When you have push rules on move having a 'production_id', the
'production_id' is copied on the generated moves. So it generate a
traceback when we check the tracking method of 'product_id' on
produce_move.
This issue is caused because we get multiple produce_move instead of
one.
To fix this issue, we don't copy the production_id anymore on moves
generated by push rules.
In function _get_top_level_packages, when checking that all the products
have the same destination, the destinations must be stocked in a set
instead of a list because with different products it could return a list
with duplicated destinations.
opw:725720
When a comma was written in the client_order_ref field of the SO,
the name of the invoice was duplicated because by default the name
of the invoice is client_order_ref in function _create_invoice defined
in model "sale.advance.payment.inv".
opw:724846