Clicking multiple times on 'Create' (in main list views) or 'Add an
item' (in o2m lists) might create invalid rows (i.e. rows with
required fields unset).
Creating a new record requires two sequential RPCs: a default_get
and an onchange (only if there is an onchange of one of the
record's field). When clicking twice to create a new record, that
sequence of RPCs is done twice in parallel, after unselecting the
current row (i.e. saving it if it is valid). However, in both
cases, there is no line to unselect yet (as both operations are
done basically simultaneously). When the first onchange returns,
a first new record is added to the list. When the second returns,
the second one is added and takes the edition, leaving the first
one, invalid, in the list.
This rev. ensures this doesn't happen by preventing concurrent
record creation.
... before saving a line.
Suppose that we have an editable list with one required field
(e.g. many2one) with an onchange. We add a record and select a value
for the many2one. Before the onchange returns, we click again on
'Add an item'. If we don't wait for the onchange to return before
unselecting the row (i.e. before saving it), a confirm dialog asking
if the changes can be discarded opens, because the line isn't valid
yet. This could easily be reproduced on the sale_order form view,
with some throttling.
This rev. ensures that we wait for the onchange to return before
saving the line, and thus before creating a new line.
In a slightly too naive way, we apparently tried to improve the
parse_float method while rewriting the new views. This was done by
using a regexp to match all occurences of a thousand separator.
The way the regexp was built was fine, until the thousand separator is a
'.', which, if used as a regexp, matches all characters. Also, sadly,
'.' is not so rare as a thousand separator...
When creating a vendor bill from a PO, the payment term configured in
the PO was lost due to function _onchange_partner_id.
When creating a vendor bill, the field payment term was invisibile if
there was no payment term set on the vendor.
opw:744714
When a ´default_order´ is set on an embedded view for a x2many field,
the sort was only applied server-side, after saving the record. After
adding a record in a x2many, the records were thus not correctly sorted.
We reintroduce here the client-side sort after the x2many modification.
With the new views, the attribute autocomplete on input was no
longer supported. We simply reintroduce its support in this commit.
The basic attribute values are 'on' and 'off' but one may want to use a
random string.
Note that an input with type='password' is a special case: the autocomplete
attribute should always be set to 'new-password' to remove autocompletion
(autocomplete='off' doesn't actually remove the autocompletion).
When clicking on 'Save & New' in the form view dialog, a new default record
is created. The parent was not correctly set in this record, which causes an
error if `parent` was used in context.
Only the validity of a date was enforced but the date could also be
wrong in other situation (required so must be filled, validation
attributes, ...).
opw-744273
closes#17329
Before this commit, error was giving on browser console when we open seo wizard which is due to the wrong (this) was passed when initializing Configurator
So in this commit, we passed correct this, to get rid of the error.
(PR #17260)
The stat button "Leaves Left" is a computed field of type integer.
However, it aggregates the data of `number_of_days`, which is a float.
Since the field is not stored, we can change its type.
opw-743153
Quick creation of attributes in the bom line of the bom form does not
make sense as it won't be related to the product (and would need to
create extra variants, ...)
closes#16924
Because read_group can not handle non-stored fields well,
we fall back to the similar implementation as for the stock
valuation report. This allows only one non-stored field as a measure in
the graph. Then it is more logical to show the total margin as that is
what the module is meant for.
The user menu was not visible in portrait mode with multi company in mobile. This was caused by the company menu taking too much room. We fix the issue by making the company menu smaller (just the size of an icon)
(PR #16685, task 29394)
The previous code when "Manually Assignation of Incoming Emails" sale
config was set always set the alias prefix to "info" even if another
value had been previously saved.
opw-745174
closes#17305
Default value is out_invoice aka an invoice of type sale. However here
we would like to test invoices of type purchase. Otherwise extending
tests for specific purchase-related invoice code is not possible. This
is done using the magical context key type.
Closes#15886
By the way Lois Rilo lois.rilo@eficent.com is now integrated in the
Eficent corporate CLA and does not require a personal one anymore on
the same email address.
Related to #15886
- Create an invoice
- Add a product
- Create an analytic account directly from the invoice line
- Validate the invoice
The partner is not filled in on the analytic entry.
This is because the partner of the line is a related of the partner of
the analytic account. By default, the partner is not filled in.
opw-743628
With this, when you import a bank statement that contains lines that had already been imported, the start balance of the statement is automatically recomputed.
Courtesy of Alexis de Lattre (Akretion). Was PR #16144
Add support for value 'save' to attribute 'special' for buttons in
form view. This is useful for form views in dialogs. When clicked,
it saves the form view and closes the dialog (the default 'Save'
button doesn't close the dialog). Without this, the only way to
achieve that was to define a dummy python method and call it with
<button type="object" name="dummy_method"/>.
Authorship should go to https://github.com/joray . However as he did
not sign the CLA and does not seem very active the patch is applied
to benefit from the improvement.
Closes#16294 .
Description of the issue/feature this PR addresses:
The Tax ID field is validating NOxxxxxxxxx as format, but the format is actually NOxxxxxxxxxMVA if you are in the VAT registrty.
Current behavior before PR:
Valid tax numbers for Norway are rejected.
Desired behavior after PR is merged:
The format NOxxxxxxxxxMVA is accepted, along with the old behaviour of NOxxxxxxxxx.