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
It is safer to avoid duplicates within a campaign,
so this should be turned on by default. Especially true
because campaign are often created without opening the
form view (quick create)
Also improved the description of the boolean option,
and made it editable in the form view, in case someone
wants ho really create a multi-step campaign.
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
Rev. e15372c071 modified
the management of mailing list contacts.
The relationship between contacts and mailing-lists is
now a many-to-many, but this made importing contacts
via CSV impossible from within the list (the usual flow)
This commit adds the appropriate context entry to fill in
the m2m relationship during import/creation.
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
- Create 2 companies (A & B)
- Create a product shared between companies
- Add a reordering rule in each company
- Add a supplier for each company
- Run the scheduler (from the cron)
The supplier selected is always the supplier with the smallest sequence,
since it is run in sudo mode.
opw-728346
- Create a SO with a product that is a service and will be invoiced
based in delivery quantities and will be tracked on timesheets and
contract.
- Confirm
- Use a simple user that only has for rights: "Employee"
- Create a timesheet as the employee for the contract created by the sale
- Log some time
- Save it
- Check the SO: ok the number of hours should be "to be invoiced"
- Edit the timesheet and set one day to 0 hours => Access Error
In case of a zero value, the timesheet widget sends an unlink command
for the corresponding entry. In this case, the `sudo` is not set at the
appropropriate moment since the context key `force_so_lines` will resue
lines which are not defined in the `sudo` environment.
opw-728453
Each REPL python shell behave differently depending on the exit method.
Force a rollback at the end to avoid inconsitent behavior.
Thanks to Harry Jollenbeck for the report: https://www.odoo.com/groups/59/26318707
The field partner_id on stock.picking is not a required field so it
would possibly cause error when getting the name of the report since
partner_id was used in it since efdb5373c3.
opw-728549