There was a lost promise which made website_form loaded before the
languages informations (such as date format) was loaded.
The server expect the format of the client thus that could lead to wrong
or invalid dates.
opw-749544
closes#18074
It is for example useful in the form builder with date-kind form field,
the translation of momentjs is done in french.
opw-707986
opw-749544
closes#17103
The wizard to change the produced quantity of a manufacturing order was not
using the current produced quantity as the default value.
This was because the field mo_id was not present in the view (and not in
`fields` in default_get).
Adding the field as invisible to compute the default value for mo_id.
Correct typo in dictory lookup (using `[` instead of `(`)
Closes#17937
opw-749725
Steps to reproduce the bug:
-Create a product tracked by LN
-Create an inventory adjustment to add 10 products with LN A
-Validate it
-Then go in inventory > inventory control > lots/serial numbers > open LN A
-Change the product
Bug:
The LN A tells you you have 10 products X
While in your inventory you see you have 10 products Y
opw:750735
When sorting by price (increasing or decreasing) in the shop,
the products were sorted according to the catalog price(list_price)
and not according to the price(which takes the pricelist into account).
So a better name is given in this patch.
Reason: The field "price" is a computed and not stored field.
Then it's not possible to order the products with it in the orm.
opw:750997
When creating a sub task, the field default_parent_id is set in
the context. When a sub task is created, a mail.compose.message
was created with the same context. So the default parent_id set in the context
(for a project.task record) was used to create the message and an error was
raised in function get_record_data.
opw:749435
web_editor can be installed without website, thus missing needed CSS
causing e.g the widget sidebar to overlay and hide the mass mailing
content if website is not installed.
This fix implement a simple middle ugly solutions, but doing something
more in stable would be an hassle (for example in 88c2b684 the #wrapwrap
CSS is included in report module).
opw-748975
closes#18005
based on v10 terms and saas-15
add the new languages
Much noise due to the different softwares that do not indent the terms the same
way. Merged the po files with --no-wrap option which makes long lines.
opw-751014
opw-750892
Avoid to rewrite the `accounts_code_digits` on the company if the value is the same. As all the values are
passed on the res.config creation, the related fields are rewriten on each res_config creation. Rewriting
the `account_code_digits` on the company will trigger a write on all the account.account to complete the
code the missing characters to complete the desired number of digit, leading to a sql_constraint.
The route /shop and /shop/product did not used the same context.
The partner is set in the shop but not in the product page which may lead to a
different pricelist to be applied.
opw-746729
In base/res_partner.py, _fields_view_get calls _fields_view_get_address that could calls again
_fields_view_get in case of address_view_id is specified. That leads to issue in base_address_city
because the _fields_view_get_address method will replace two times the city field and then, we get
a view with two city_id fields.
see https://github.com/odoo/odoo/pull/16870 for screenshots
account_move_line field name is not required anymore, thus it is possible
that some aml does not have a name. Which made the reconciliation widget
crash in that case as it can not "concatenate string and bool"
Let's consider an event category EC with questions/answers configured on it.
When the category EC were added to an event, the questions were successfully
added to the event, but all the question answers were blank.
ps: odoo doesn't support multi levels of onchange i.e. the values of answer_ids
inside the values of question_ids in this specific case.
opw:744062
When opening the reconciliation widget, there are two queries that are done,
The first one is to find a move line that perfectly match the statement line
and is done in SQL for performance issue.
The second one is a search with a domain to find all the lines that could be used
in that reconciliation.
1) There was a mismatch between the two. The domain fetches lines that have a payment_id
while the SQL query does not. Which is inconsistent
2) In some case, we did not find a perfect match on the amount using the SQL query because
of a rounding error. Example is for amount 3,3. In python: 3,3 is represented like this
3,3000000000003 and doing a float_round of that value still returns 3,3000000000003
Since we want to match on an exact amount, using float_repr is needed to fix that error
The old code don't resize correctly if you use params in request.
because if '200' > 500 => return True
Now we force the casting to int to be sure to compare apple to apple.
before: /web/image/<id>?height=100 => don't return an image with height=100px
after: /web/image/<id>?height=100 => return now an image with height=100px
If the website default language is not en_US, qweb fields are not
translatable in en_US (and thus can't be translated) because:
- the code expected en_US to be the default language.
- there was a error in website _dispatch
opw-746776
closes#17939
Before 036ccbef when writing on qweb field with default language mi_SC:
- writing in mi_SC: wrote on the current res.user language (wrong)
- writing in en_US: wrote on en_US translation (right)
- writing in de_DE: wrote on de_DE translation (right)
but after 036ccbef:
- writing in mi_SC: wrote on mi_SC (right)
- writing in en_US: wrote on mi_SC (wrong)
- writing in de_DE: wrote on mi_SC (wrong)
With this commit, this drawback is also solved by keeping the lang in
context if present.
opw-746776
closes#17917
- Use the form builder to send an email
- Customize the snippet to include the subject and the body
- Send a mail
=> The subject is not included in the email
This is because the subject is filtered out and considered as a
blacklisted field.
It happens because `mail.mail` inherits from `mail.message`. The field
property `website_form_blacklisted` is set to:
- `True` for `mail.mail`
- `False` for `mail.message`
Since we go through all inherited models, the property on `mail.mail` is
overriden by the property on `mail.message`.
It is actually not necessary to go through all inherited models, since
in the case of `inherits`, we copy the fields of the inherited model to
the target model. The check is simplified by only checking the fields of
the current model.
Based on work of @nla-odoo
opw-748926
In an invoice, the modification of an invoice line triggers the complete
recomputation of the tax lines. However, it also deletes any manual
taxes that could have been set (e.g. on vendor bills).
Courtesy of @jjscarafia
Closes#17885
opw-749323
Really apply commit a9ce4ffb22 to POS orders.
Since the creation of a POS order in the backend is a feature which
nearly not used, we rewrite everything related to onchanges. To avoid
breaking the compatibility, the old onchange code is kept. As long as
the user doesn't upgrade the module it will be used instead of the new
onchange.
opw-746827