The `default_order` attribute of a <kanban> view was applied
for a non-grouped kanban view, but was simply ignored when
the kanban view was grouped, a common situation.
When a groupby is active, the main order is the column being
grouped, but the `default_order` is still useful as
a secondary sort ordering, within the kanban columns.
This patch complements the original patch of
rev. 5c0804eaef from PR #520.
Add restriction on product_id field to prevent the suppression of the product
if already present in an invoice.
This is to avoid the suppression of a used product variant when modifying
the list of attributes.#
Due to the constrain, the variant will be disabled instead of deleted.
Fixes#4129
Add warning message on the product form to warn users about the potential impact
of modifying variants.
Pricelist computations need to consider 2 different Units
of Measure:
- The default product UoM (product.uom_id), used as reference
for the various quantities and amounts specified in each
pricelist rules.
- The `context UoM` is the UoM in which the result is requested,
that is the list price UoM.
For example the 'price_min_margin' amount is meant for the unit
price of 1 x default UoM. When the context UoM is not the default
product UoM, it can be any UoM of the same UoM Category, and the
various quantities and amounts specified on the rule need to
be adapted accordingly:
- min_quantity (expressed in terms of the default UoM)
- price_surcharge (specified for 1 x default UoM)
- price_min_margin (specified for 1 x default UoM)
- price_max_margin (specified for 1 x default UoM)
The UoM corrections were not done consistently and resulted in
wrong prices when computing the price using a non-default UoM.
The cases were a conversion was needed or not were not properly
identified within the _price_rule_get_multi().
After this commit, the various code branches in _price_rule_get_multi
always ensures that:
- price requested for: `qty` of `qty_uom_id`
- `qty_in_product_uom` is the requested `qty` converted to default UoM
- current (intermediary) price: `price` for `price_uom_id`
Therefore `price` and `price_uom_id` are always in sync, and `price_uom_id`
can always be compared with `qty_uom_id' in order to know whether
a conversion is still needed.
This patch also corrects and extends the regression tests
introduced at revision 79ebe10.
With 'Fixed Price' enabled, a button giving the possibility to list all sale orders appears.
When browsing the list, there the possibility to create a new sale order.
The contract pricelist should be used by default when coming from this specific button.
When sending a message with the "Compose new message" button on the right of the user menu, in the top bar, if you tried to save the message as template, you had a traceback because model field of email.template is mandatory, but was set to True because there is no model in such a case.
As there is no any relevant model in such a place, and that the field is mandatory, mail.message is pretty convenient as the default value.
If the many2one selection height was too big (bigger than the browser page), it wasn't possible to see all options, because the body is set as overflow: hidden;
Moreover, if you opened a many2one selection and then scrolled the page, the selection moved with the scrolling, while it should be sticked to its input field
Potentialy, the timezone too.
On item action click (such as menus in More.. and Print..), the data in form view had the priority on user context (through the sidebar_eval_context)
Therefore, if a field "lang" was present in the form view (like in partner form), the web/action/load xmlrpc call was using the partner language instead of the user language.
Example of wrong use case before the fix:
- Set the user language in French, then go to a partner form of a partner with English set as language
- Click on any button of the partner form, such as the "Invoices" button, notice that the last item of the breadcrumb is in English, instead of Frenh (the user language)
- Click on any menu opening a wizard in the More.. dropdown menu, notice that the wizard title is in English instead of French
- Print any report from the Print dropdown menu, notice that the report file name is in English. If you print the same report for the same partner but from the list view, the report file name is in French.
website_customer filters the partners based on assigned_partner_id (the list of
customers that were impletemented by another partner). This field was not
visible so no way to actually display a partner in this list.
Fixes#430, opw 619254
On ecommerce checkout, the language of the partner wasn't set according to the language in which he is visiting the website.
Therefore, its partner was set with the default language (English in most cases), and any emails sent to him were not translated in his own language (in the email templates, such as the quotation email he received on order confirmation)
The key 'novalidate' is added in the context when an operation not impacting
the validation of a move is made. The validation recreates analytic lines
which decrease the performances.
In case of registrating a payment, the skipped validation are the one from
the reconcile method (reconciliation does not change the validity)
Fixes#3787, opw 618529
The destruction of one2many fields is forced with the event change:effective_readonly
This revision add the forced destruction for cancel(discard) button as well
Otherwise, one2many fields are not properly destroyed when hitting the button "discard" (from save or discard).
This can be problematic for one2many editable list views (such as invoice lines) if you discard while having a mandatory field not filled in the invoice line: You can't recreate an invoice, the one2many editable list is messed up
Use case: Create an invoice, create a line, leave the description, required field, empty. Then, discard. Then, click on create.
opw-616946
User-provided addons paths are checked for existence (and rejected), but
default addons paths are not checked, and blow up when trying to listdir
them (e.g. when http.py tries to load modules).
This is an issue when using Odoo from the distributed tarballs, because
the packaging currently moves all modules to openerp/addons and removes
the root ("main") addons directory.
This is possible to set field conditional defaults, if the field has the attribute "change_default".
The defaults are set by the web client, by calling the method "get_defaults" of ir.values model, when the onchange is triggered on the field on which the condition is.
In 7.0, all onchanges were triggered clientside, one by one. On creation, the defaults of default_get method were pushed in the form, and then, as the values of the fields were changed (from null to the default value), all onchanges on which there was default value were triggered.
In 8.0, onchanges are performed server side, all at once. On creation, the onchange method is triggered by default (wether or not there is a default value for them), for all fields (widget param of method do_onchange of view_forms js is undefined, meaning the onchange is not triggered on a specific field, but on all fields). In such a case, we must call the get_defaults method of ir.values model for all fields (having change_default attribute), in order the conditional defaults to be set in the form view.
For selection fields, name_get calls to resolve the display name are client-side initiated, and will display "Unknown" if the user does not have read access to the selected company. And the reason for using a selection widget in the first place was to prevent inadvertent creation of companies. This is now doable via the no_create option, so we can remove the selection widget.
product_id_change_with_wh onchange was not anymore called when using the popup form in sale order line.
The behavior was different concerning the product onchange when being in the editable list or in the popup form
For instance, for make to stock products not having enough stock, the warning was displayed when being in editable list, but not in the popup form
This is a regression of rev. 86f785ae1b
opw-619624
The warehouse name and address name is often the same (name of the company).
Remove the name of the address as two warehouse may use the same address.
Fixes#4062
During a migration of database, it is possible that some custom field
("x_", state is 'manual') are relational to model from a module that is
not provided.
Note: this used to work in Odoo 7.0 but crashed in 8.0.
Closes#3877
The price_total field of the account invoice report is not rounded (it cannot be easily rounded, as this has to be done in the sql view)
In a multi currencies environment, this is possible that the price_total value has a lot of digits
We therefore round it manually, for the gauge of the sales team kanban view
Check if id is valid by searching record columns when a key error is raised
If the record has the column, the key error is actually an error on a
missing or inaccessible id.
Signed-off-by: Sandy Carter <sandy.carter@savoirfairelinux.com>
Closes#3658
Before, all isolated (between xml/html tags) two chars words coming from views were not translated (by choice).
But, for some words, allowing them is useful. For instance, the word 'or' located between two buttons.
opw-616716
Add invoicing related fields on anlytic account tree view for the invoicing group only
Otherwise, when a user not having the invoicing access rights displays the analytic account list, he gets an access right error.
opw-619485