This reverts commit ab303435d3.
Changing a feature one week before freezing a new saas, without review,
without spec, without testing, does not seem to fit the R&D process.
This commit will be set in a branch, tested and reviewed accordingly.
'color' is now a kind of magic field for the many2many tags widget, it
should not be used for something else.
This was half-fixed in 9.0 with f847701 and this commit solves it
properly.
opw-653124
Goal : Don't display the internal reference from one of the product template
as it was currently the case, because it was a related field to a one2many.
Here, we use the same behavior as for weight,volume or standard price fields.
If only 1 variant, i.e. no variant used, take the default_code from the template
If more than 1 variant, do not display anything.
Templates have been updated to match the general layout of the
notifications and emails in Odoo. This module has its own
commit because those templates were already complex and well
designed.
Some chatter messages have also been removed. Too much messages
are produced when creating and updating events.
Templates used to send invoice / quotation / PO by email are cleaned. Custom
style is removed. Content is simplified.
For sale, only one template is kept through the various addons. Previously to
this commit there are 3 templates: standard, portal and online quote. Those
template are similar except the link to get the sale order. Now the base template
contains some logic that should be sufficient to cover all cases. This breaks
the modular approach but is easier to use for users. As templates are still mako
it is not possible to use inheritance. So having a base template knowing some bits
of overriding modules is necessary if we want to avoid having the same template
duplicated.
The template used for notifications is updated. The general layout
is now
header: logo -- action buttons, contextual actions
separator
body
signature
Sent by company using Odoo
Action and access button in notification emails are added. Override
mail_thread methods to add a specific link + an access buttons to
everybody if the slide is published.
This makes every template holding images crash. As this feature will shortly be
fixed in 9, let us temporarily comment its use and wait for the forward port of
the fix.
The notification box remains on the form until either:
- the user closes it explicitly, or
- the user edits the record, or
- the form view is refreshed (switch to another record, or refresh form).
Add a method `once` to `EventDispatcherMixin`, as it is convenient.
Make `FormView` trigger events `to_view_mode` and `to_edit_mode`.
Since c04065abd8 (introduction of
accounting v9) bank statement lines can not have an amount of zero
anymore. So when we validate an order in the POS client we need to get
rid of paymentlines with an amount of zero.
The fix in 665bc1c solved the issue for pager of some X2Many widget x2m
which would shadow the accesskey to go to previous/next page of the top
view's current model.
But in the case a web.Pager (used in community for a X2Many kanban
widget) the fix had no effect.
opw-652888
This commit was necessary to fix weird problems in 9.0-nightly.
Phantomjs and the old nvd3 implementations did not play well together.
* transitionDuration() replaced by duration()
* tooltips() & tooltipContent replaced by tooltip.enable and tooltip.contentGenerator
* remove useless less for tooltip
Thanks to mge for his help
Before this fix, inconsistencies arise in the prices displayed in a
multi-currency environment. For example, let's consider these 2
pricelists:
- Public Pricelist, in USD
- Benelux Pricelist, in EUR with 10 % discount
When the Benelux Pricelist is selected, the strikethrough price is in
USD, the price is in EUR, and the currency displayed is $. The reason
is that the pricelist used is stored in request.session, but the
templates are still using the pricelist linked to the partner.
We link website.pricelist_id to the currency stored in request.session,
which is more logical. We also use the currency related to this
pricelist in the templates, which avoids the inconsistencies mentioned.
The function _onchange_partner_id must be triggered when the field 'company_id'
is modified like with function _onchange_partner_id in addons/account/models/account_invoice.py
In this way, the account_id is set in 'account.invoice when the 'company_id' is changed.
opw:652918
Non-trivial port because 9.0 has rescue sessions that kind of try to
solve the same problems, however:
- they do not automatically put orders into a compatible, newly opened
session because it explicitly searches for rescue sessions. So if
you open a new session and create a new order in a POS associated to
a closed session you will end up with two open sessions (one rescue,
one regular).
- they throw exceptions with cash control enabled
- they're a bit more complicated because they introduce the idea of
'rescue' sessions, which the 8.0 fix does not (it just uses regular
sessions).
So this reverts bed409322d without
changing the database and while still ensuring that databases with
existing POS rescue sessions don't break.
The `parent_id` field was mis-aligned in the `res.company`
form view, making the input away for its label.
We moved the field to the General information tab, to not
overcrowd the headers.
opw-653373