When a module uninstallation fails, its views and
templates are still present in the database, and
its routes should still be loaded.
Otherwise random inconsistencies and errors may
occur when rendering the modules' templates.
When creating a SO in dropshipping with 'create invoice' = 'on delivery order',
the resulting invoice must not be linked to the PO but to the SO created.
Inspired from '_create_invoice_line_from_vals' in addons/sale_stock/sale_stock.py
opw:647628
The argument `auto_commit` was omitted in `send_mail` overrides.
`auto_commit` was therefore allmost always `False` when
reaching the `send` method of model `mail.mail`,
in `mail/mail_mail.py`. At least it was when either
`sale`, `purchase` or `account` were installed.
Not committing the sql transaction leaded to the fact
the mail statistics were never created when the queue
process was interrupted (e.g. process time limit reached),
and knowing if an email in a mass mailing has already been sent or not
is based on the fact the mail statistics exists or not.
Therefore, if a mass mailing sending process was interrupted,
the emails were re-sent over and over.
opw-649106
QWeb's LazyResponse mechanism allows controllers to be inherited
and to alter the rendering context (qwebcontext) *after* calling
super().
However it caused the final rendering to occur outside the protection
of the @service.model.check decorator that handles concurrent access
errors. In rare cases the lazy rendering can be interrupted by
a concurrent access error, for example when bootstrapping the
the cache of asset bundles (as it INSERTs a bunch of attachments).
By forcing the flatten()ing of the lazy response earlier, right
after calling the route's endpoint(), it occurs within the
protection of the @service.model.check, and benefits from the
automatic retry.
flatten() was modified to avoid rendering twice the template
The flatten() in get_response() is still necessary for addons
code that directly calls get_response().
Moved QWebException into openerp.exceptions next to the other
exceptions classes - since it now has more global semantics.
~
The whole request dispatching code could really do with a
complete redesign/simplification.
Since the method must return a deferred, resolve it with true to proceed with onchange
and with false to prevent the onchange. Deferred failure is not an option.
For some reason, the computed Many2many or One2many field is not
received through the onchange RPC call when creating a new order, but
only once the order is saved. This makes the widget displaying previous
orders kind of useless. We use this workaround with the default value
in order to be sure to send the value in the default_get call.
We also display previous orders and the agressive alerts in edit mode.
The button Inventory Adjustement is also changed to Update Qty On Hand
as an inventory adjustment would expect a total inventory.
These buttons do not need a variant security group.
The incoming and outgoing quantity give more information on the forecast
button immediately.
The stock move view (Traceability statbutton) should not allow for creating or editing immediately.