- Sep 18, 2023
-
-
Ludovic Gasc authored
closes odoo/odoo#135679 Signed-off-by:
Martin Trigaux (mat) <mat@odoo.com>
-
- Sep 17, 2023
-
-
Odoo Translation Bot authored
-
- Sep 15, 2023
-
-
Levi Siuzdak (sile) authored
Versions: --------- - 14.0 - 15.0 Steps to reproduce: ------------------- 1. create an eCommerce site; 2. add another language; 3. visit site using any language other than English; 4. add product to cart; 5. go to checkout until you can change address. Issue: ------ In the country and state/province selectors, the default values are not translated. Cause: ------ Their `msgid` strings in the .pot files don't include the option tags that were introduced in 57d7e75b. Solution: --------- Add option tags to the `msgid` strings. opw-3455492 closes odoo/odoo#133750 Signed-off-by:
Levi Siuzdak (sile) <sile@odoo.com> Signed-off-by:
Martin Trigaux (mat) <mat@odoo.com>
-
Claire Bretton (clbr) authored
When trying to customize Swiss invoice report with QR-Bill through Studio an error was thrown because it tries to _compute_name() on a dummy 'account.move' record with self.id=0. This is part of a more general task in master around report customization but it make sense to backport the fix in all stable versions. task-id:3492033 closes odoo/odoo#135367 Signed-off-by:
Laurent Smet (las) <las@odoo.com>
-
Karnav Sojitra authored
When the user tries to modify the view with an invalid xpath expression, an XPathSyntaxError traceback will appear. Steps to produce: 1. Install the Accounting module. 2. Settings > Technical > UI > Views > Open any view 3. Invalidate expr syntax and try to save, thus an error will be generated. Error: XPathSyntaxError: Invalid expression This commit handles XPathSyntaxError by raising ValidationError instead of a traceback. sentry-4377014622 closes odoo/odoo#131673 Signed-off-by:
Achraf Ben Azzouz (abz) <abz@odoo.com>
-
- Sep 14, 2023
-
-
Quentin authored
When parsed, if the attachment has a basis quantity of zero, it creates an error, because it is used in a division. The condition that checks whether is computed should be done only if this variable is none. The code does not handle if `attachement_name.text` is None, which can be caused by an orphan ID tag (e.i. "<cbc:ID />") , in the xml of the pdf. opw-3470969 closes odoo/odoo#135270 Signed-off-by:
William André (wan) <wan@odoo.com>
-
Josse Colpaert authored
The SII module adds some fields on the taxes, so after installing the module, those fields need to be set on the already installed CoAs. We forgot to set the l10n_es_bien_inversion field, which is used in l10n_es_edi_sii to send the right information about the taxes to the gov. closes odoo/odoo#135059 Signed-off-by:
Olivier Colson (oco) <oco@odoo.com>
-
Moises Lopez authored
The following method: - https://github.com/odoo/odoo/blob/2091994c/addons/pos_restaurant/models/pos_config.py#L40 Gets the following query: SELECT min("pos_order".id) AS id, count("pos_order".id) AS "table_id_count", "pos_order"."table_id" as "table_id" FROM "pos_order" LEFT JOIN "restaurant_table" AS "pos_order__table_id" ON ( "pos_order"."table_id" = "pos_order__table_id"."id") WHERE (("pos_order"."state" = 'draft') AND ("pos_order"."table_id" in (TOO MANY IDS HERE))) -- for this case 178 restaurant_table records ids GROUP BY "pos_order"."table_id", "pos_order__table_id"."id" ORDER BY "pos_order__table_id"."id" It spends 24ms without index After creating index it spends 0.57 It is not the unique side filtering by pos_order.state column Check the following lines of code: - https://github.com/odoo/odoo/blob/f5553c550/addons/point_of_sale/models/pos_order.py#L678 - https://github.com/odoo/odoo/blob/f5553c550/addons/point_of_sale/models/pos_order.py#L690 - https://github.com/odoo/odoo/blob/f5553c550/addons/website_sale_coupon/models/sale_order.py#L91 closes odoo/odoo#129486 Signed-off-by:
Rémy Voet (ryv) <ryv@odoo.com>
-
- Sep 12, 2023
-
-
Miquel Raïch authored
This way, we avoid spamming the log each time new constraints are added in the constraint's table. closes odoo/odoo#135123 Signed-off-by:
Rémy Voet (ryv) <ryv@odoo.com>
-
Xavier Morel authored
Intent of checking `group_no_one` was always to query the advanced info / debug mode, however when the semantics of group_no_one got changed in 31518bc0 this site was missed, and now always displays "advanced" errors for internal users. Which was not the intent. Also since we're printing `display_name` and some of them annoyingly hook onto context variables to show extended information, reset the context to the user's default in order to avoid such extended-formatting `display_name`. Also fix "debug mode" in `TestIRRuleFeedback`, which has been broken since time immemorial (likely as long as the group_no_one semantics changed). closes odoo/odoo#135028 Signed-off-by:
Xavier Morel (xmo) <xmo@odoo.com>
-
- Sep 11, 2023
-
-
Nasreddin Boulif (bon) authored
Steps to reproduce: On Odoo: - Install `Documents` module - Go to `Settings` and set a Custom Email Server(ex. `mydomain.com`) - Ensure an alias exist for the model `document.document` with `inbox-financial` as alias name In mail client: - Send a mail with an image in the body to the following email: inbox-financial@mydomain.com Issue: Mail not received (traceback in logs) Cause: Since we use the email alias `inbox-financial`, we process the mail through the `document.document` model where we have an override of the `_message_post_after_hook` method that is called after that the `msg_values` values are post-processed and where we do another message_post() for the new document create for the attachment (in this case, an image). https://github.com/odoo/enterprise/blob/2c3596e4e18c201809558d3ea878b141e366a027/documents/models/document.py#L305 During the parsing, the mail values are updated through the `_process_attachments_for_post` method: https://github.com/odoo/odoo/blob/6c0d2d7a9d44459f3e09a38bd80ef9b018e8c946/addons/mail/models/mail_thread.py#L1881-L1904 On posting the first time, the original type of the `body` value is a `str`, but the post-processed value (because there is some CIDS in the body) is of type `bytes` (because using `encoding='UTF-8'` with `lxml.html.tostring`). https://github.com/odoo/odoo/blob/510a997017a9cbe14522a0013a578f6d1d9b257a/addons/mail/models/mail_thread.py#L2209 Then in the `_message_post_after_hook` we call post again on the newly created document record by using post-processed value of body who is of type `bytes`. On posting the second time (for the document record), the `body` value is of type `bytes` and when checking if the body is empty with `is_html_empty` that received a string as param, an error is raised. Solution: Use `encoding='unicode'` to return a string instead of bytes. https://lxml.de/api/lxml.etree-module.html#tostring ENT PR : https://github.com/odoo/enterprise/pull/42653 opw-3273583 closes odoo/odoo#133339 Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
-
- Aug 29, 2023
-
-
bve-odoo authored
closes odoo/odoo#27664 Signed-off-by:
Pierre Masereel (pim) <pim@odoo.com>
-
- Sep 10, 2023
-
-
David authored
This reverts commit 814fb43e. After #129567 the lines in export profiles which correspond to field relations attributes get deleted whenever you access to them in the export profile. This is leading to a huge lost of users custom data. Closes #134791 closes odoo/odoo#134949 Signed-off-by:
Julien Castiaux (juc) <juc@odoo.com>
-
Odoo Translation Bot authored
-
- Sep 08, 2023
-
-
miad-odoo authored
Before the commit, the _get_seen_list() function in the mass_mailing module was not able to correctly identify all the duplicate email addresses in a given mass mailing. This was because the function chose and used only one way to find an email address for each record in the mailing list, even though there are many ways to find an email address for a record. For example, a crm.lead record might have an email address in its partner_id field, but it might also have an email address in its email_normalized field. This can vary from record to record. To fix this issue, the _get_seen_list() function was updated to only look at the email address to which emails have already been sent, rather than trying to fetch it from the record itself. This ensures that all duplicate emails are correctly identified and that no duplicate emails are sent in the mass mailing. Task-3234378 closes odoo/odoo#118220 Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
-
Maximilien (malb) authored
During this pr (https://github.com/odoo/odoo/pull/121413 ), we have made a few css changes on the din5008 format, some of them needed to be revert because they broke the layout. closes odoo/odoo#134775 Task: 3495712 Signed-off-by:
Florian Gilbert (flg) <flg@odoo.com>
-
Richard deMeester authored
There is code to block the UOM changing if there are done moves. Because it searches in non-sudo mode, it does NOT currently stop you changing the UOM if the product has moves in a different company. closes odoo/odoo#133895 Signed-off-by:
Tiffany Chang (tic) <tic@odoo.com>
-
Francesco Ballerini authored
Typo error detected on `/mrp/wizard/mrp_immediate_production_views.xml`. It doesn't cause any issue on module installation or updates, but it's probably gonna cause issue on view inheritance. If you can confirm this is unintended typo I will edit commit msg. I also detected this on version 15.0 and 16.0. closes odoo/odoo#134070 Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
-
- Sep 07, 2023
-
-
Arnaud Joset authored
Before this commit, simple user could not use the novatim API since https://github.com/odoo/odoo/commit/160e8bfbf72a3e5d7cc8d8cbe7bc4f310f298baa closes odoo/odoo#134678 Taskid: 3497580 Signed-off-by:
Arnaud Joset (arj) <arj@odoo.com>
-
- Sep 06, 2023
-
-
Julien Van Roy authored
Add IEPS taxes and tax groups. Make sure the IEPS taxes are `include_base_amount` and have a lower sequence than the IVA taxes. Unify the names of the taxes and their labels on invoice. Resequence the taxes to group them by nature. task-3100679 closes odoo/odoo#133372 Signed-off-by:
Laurent Smet (las) <las@odoo.com>
-
Mathieu Walravens authored
Before this commit: Packages were computed using a for loop, skipping any picking without any packages. After this commit: Packages are computed using a read_group, speeding up the computed method for large pickings with hundreds of stock move lines. opw-3461706 closes odoo/odoo#132585 Signed-off-by:
Arnold Moyaux (arm) <arm@odoo.com>
-
Michael Tietz authored
Backport from version 16.0 of _get_default_amls_matching_domain To decrease the amount of account.move.lines which should be reconciled Exclude amls of payment move lines where the account is configured as receivable or payable closes odoo/odoo#133690 Signed-off-by:
Olivier Colson (oco) <oco@odoo.com>
-
pash-odoo authored
before this commit, in resume we are able to put end date less than start date which is not possible in real life. make change in constraint to check selected end date is greater than start date. make changes in demo data of end date which are according to new changes. task-3397726 closes odoo/odoo#127351 Signed-off-by:
Sofie Gvaladze (sgv) <sgv@odoo.com>
-
- Sep 05, 2023
-
-
Pratik Awasthi authored
Before this commit, when `a` tag is in a td, the color of text ellipsis (3 dots) is different than the text because the text-ellipsis is set on the parent element, that is `td` element and the color is set on the `a`. This commit sets the right color on td element when that element has `a` element. Limitation (only for td inside element with `o_portal_my_doc_table` class): if the `td` element contains `a` tag and another element then the color has to be set to that other html element otherwise, the color will be the one of the a tag. task-3251721 closes odoo/odoo#124447 Signed-off-by:
Xavier Bol (xbo) <xbo@odoo.com>
-
Jinjiu Liu authored
Reproduction: 1. Install Event, Sales, Website, Contacts 2. Login as Admin, create a new portal user 123, set the password as 123 3. Go to Contacts, find the created user, add a shipping address, leave the name blank 4. Open another tab login as the portal user, place an order 5. At the Address step, Edit the billing address, change the name from empty to “Test Name”, click next 5. An error is thrown cause the new name is not equal to empty value Fix: this fix aimed the conditions we have in the previous PR: https://github.com/odoo/odoo/pull/111708 This change will allow the user to add a name for shipping address at checkout.Without the fix, if you change the name of a shipping address, it won’t be able to get through. This is because of how we manage the shipping address, e.g. shipping address is managed as child partners. For shipping address, the check can_edit_vat is always false. See here: https://github.com/odoo/odoo/blob/14.0/addons/portal/models/res_partner.py Another check, e.g. if shipping is being edited, is added to make sure name/email can be changed for delivery address. For internal user, the editing of shipping address is not blocked because of the `share` check. But the same condition is used to ensure the consistency in case we change how the shipping address is managed in the future. Note: if the data is '' for name for example, the pre-process will convert it to `False`. Thus the edge case that `'' != False` doen't exist anymore Related PR: https://github.com/odoo/odoo/pull/111708 opw-3126325 closes odoo/odoo#128146 Signed-off-by:
Antoine Vandevenne (anv) <anv@odoo.com>
-
Arnaud Joset authored
Before this commit, the useragent was harcoded as an Odoo one and if it was blacklisted by the osmfoundation policy https://operations.osmfoundation.org/policies/nominatim/ all Odoo instances were forbidden to access the service. This parameter allows to override the user agent with a system parameter. closes odoo/odoo#134131 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
Preksha Chouhan authored
When user access template at the time of export with deleted field. The traceback will be generated. To reproduce the issue(any model, here- 'account.move.line'): - Install 'account_accountant' module - Go to Settings > Technical > Database Structure > Fields - Create a new field with model as 'Journal Item' and save - Go to Accounting > Miscellaneous > Journal Items - Select any record in list view and click on export and generate a new export template with newly created field - Go to 'ir.model.fields' and delete that field - Go to 'Journal Items' and select that template while export Error: A traceback appears: KeyError: 'tax_audit' When a field gets deleted from 'ir.model.fields' but it does not get deleted from export template. And selecting that template to export the records will lead to traceback. See - https://github.com/odoo/odoo/blob/59669e9943158e51dcbb9ae69ad758df8f7c7976/addons/web/controllers/main.py#L1815-L1818 sentry-4331986723 closes odoo/odoo#129567 Signed-off-by:
Julien Castiaux (juc) <juc@odoo.com>
-
Yann Papouin authored
`read_group` signature is not respected: the offset integer param is filled with a list closes odoo/odoo#134002 Signed-off-by:
Xavier Bol (xbo) <xbo@odoo.com>
-
- Sep 04, 2023
-
-
Yann Papouin authored
closes odoo/odoo#73090 closes odoo/odoo#134086 Signed-off-by:
Martin Trigaux (mat) <mat@odoo.com>
-
- Jul 12, 2023
-
-
Arnaud Baes authored
Changes in default can be bothersome, embed a full baseline configuration for reliability. closes odoo/odoo#27926 Signed-off-by:
Pierre Masereel <pim@odoo.com>
-
- Sep 03, 2023
-
-
Odoo Translation Bot authored
-
- Sep 02, 2023
-
-
William Henrotin authored
Commit 72a17baf force the PO `date_order` to be >= at ` today() to ensure the select_seller method take the right seller price. This introduces an error in the MPS module that may need to create PO in the past. Instead, this commit patch the call to `_select_seller` to take at least `today()` closes odoo/odoo#133759 Opw: 3167094 Related: odoo/enterprise#46623 Signed-off-by:
Arnold Moyaux (arm) <arm@odoo.com>
-
- Sep 01, 2023
-
-
Xavier Morel authored
I missed a critical issue in #133708: various users had discovered they could already fix description issues by adding an XML declaration to their document which is very cool (though technically not really valid). What is a lot less cool is that lxml gets *extremely* unhappy when asked to parse *strings* with an encoding declaration, raising a ValueError, so the purported fix breaks on any module which does that, which seems to include a lot of OCA modules. Gate the encoding guessing by bailing if the document has an XML declaration, in which case we just assume the author knows what they're doing and we leave them alone. For extra safety, check the encoding declaration in ascii and utf16. Could also have checked for BOMs, but lxml seems to not care about them overly much (in fact it seems to prefer them decoded which is odd). closes odoo/odoo#133918 Reported-by: @rezak400 X-original-commit: 51d37560 Signed-off-by:
Xavier Morel (xmo) <xmo@odoo.com>
-
Odoo's Mergebot authored
PURPOSE Be defensive when dealing with email fields, notably when having multi-emails or email field containing an already-formatted email. RATIONALE Two main use case of corner case usage of 'email' fields are tested in this PR and their support is improved * formatted emails: `"Full Name" <email@domain.com>` stored into the 'email' field; * multi emails: `email1@domain.com, email2@domain.com` stored into a single 'email' field; IMPLICATION Email field is generally managed as "containing a valid email". This means it is sometimes used as it in 'formataddr' as well as to perform searches or identification checks. Example of issue: partner 'Raoul' has a formatted email like "Raoul" <raoul@raoul.fr>. Using 'formataddr' in email_from leads to from: "Raoul" <"Raoul" <raoul@raoul.fr>> -> which is incorrect (but often dynamically corrected by email servers); Email field holding multi-emails are not normalized, as current normalize is done only if the field holds a single email. It means * no easy finding based on 'email_normalized', e.g. various tools like '_mail_find_partner_from_emails' or 'find_or_create' do not find partners based on this email; * no exclusion list management; * issue with formatting, like to: "Raoul" <raoul@raoul.fr,raoul.other@raoul.fr> -> which is incorrect (but often dynamically corrected by email servers); USAGE: OUTGOING EMAILS Those use cases currently generate faulty outgoing emails. This is valid for recipients ('email_cc', 'email_to') as well as author ('email_from'). For formatted emails: `email_to` is formatted again based on name and email which leads to sending emails to `"Full Name" <"Other"<email@domain.com>>`. Note that multi emails without formatting may work as it leads to email_to `"Full name" <email1@domain.com,email2@domain.com>`. Some outgoing email servers correctly send multiple emails. It depends on their fault tolerance. USAGE: FIND BASED ON EMAIL (NORMALIZED) When searching for partners (e.g. using '_mail_find_partner_from_emails' or 'find_or_create') normalized version of input is used. In case of multi emails sanitize is 'False', as normalization expects a single email in the field. Therefore no partner is found. In processes that do a "search or create" (e.g. using a template on a record) this leads to creating a new partner (or several partners in case of multi emails) each time. USAGE: OTHER FLOWS Other flows are build on top of '_mail_find_partner_from_emails' / 'create' of outgoing emails and are impacted by formatted email / multi email usage. Those include notably * mass_mailing: '_message_get_default_recipients' should be defensive to give correct values when creating mailing emails; * mass_mailing: faulty emails is based on normalize and multi-emails are considered as faulty and ignored; * after post hook: '_message_post_after_hook' tries to link messages without author (but email_from) with newly-created partners, when partners are created from chatter. It is therefore impacted by those corner cases; * marketing_automation: built on top of mass_mailing and suffers from the same issues; USAGE: UNICODE Unicode in emails should be supported. 'formataddr' and IrMailServer notably received fixes to support unicode. Some check performed on email addresses fail when unicode is involved, which leads to some emails not being sent while they could. USAGE: WRONG EMAIL FORMATTING With input 'name email@domain.com' (missing chevrons allowing to clearly spot the email part) 'getaddresses' returns ('', 'name email@domain.com) i.e. the whole input is considered as being the email. To improve the heuristic we can add a fallback by recalling 'getadresses' on the input with spaces replaced by commas when it found only an email and no name. The new email will be split into sub pairs allowing to find the real email and various name parts, allowing to make a new name / email pair. Emails should not contain spaces thus this is coherent with email formation. This fallback actually comes from a specific code done in '_parse_partner_name' of Partner model. Supporting it directly at tools level make the behavior coherent for all models. SPECIFICATIONS This PR contains first tests to cover current support of those use cases. Then we gradually improve support of multi-emails and formatted emails in various layers of mail code, from mail.mail to mass_mailing or email formatting. See individual commit for more explanation, each of them solving a specific issue / use case. Task-2612945 (Mail: Defensive email formatting) closes odoo/odoo#74474 Related: odoo/enterprise#41828 Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
-
Thibault Delavallée authored
Formatted emails using our own formataddr contains quotes to correctly separate name from emails, like'"Name" <email@domain.com'. However JS parse function does not correctly handle quotes, assuming everything being left of opening chevron is the name. Task-2612945 (Mail: Defensive email formatting) Part-of: odoo/odoo#74474
-
Thibault Delavallée authored
It seems the commented test make PLS test crash. Not sure why as tests unit tests should not be dependent but PLS is a complicated matter, flushing stuff could have an impact on DB state notably. Until we figure out what happens test that makes the PLS tests crash is commented. Crashing assert in PLS is improved to better know which one is crashing. Task-2612945 (Mail: Defensive email formatting) Part-of: odoo/odoo#74474
-
Thibault Delavallée authored
With input 'name email@domain.com' (missing chevrons allowing to clearly spot the email part) 'getaddresses' returns ('', 'name email@domain.com) i.e. the whole input is considered as being the email. To improve the heuristic we can add a fallback by recalling 'getadresses' on the input with spaces replaced by commas when it found only an email and no name. The new email will be split into sub pairs allowing to find the real email and various name parts, allowing to make a new name / email pair. Emails should not contain spaces thus this is coherent with email formation. This fallback actually comes from a specific code done in '_parse_partner_name' of Partner model. Supporting it directly at tools level make the behavior coherent for all models. Task-2612945 (Mail: Defensive email formatting) Part-of: odoo/odoo#74474
-
Thibault Delavallée authored
PURPOSE Be defensive when dealing with email fields, notably when having multi-emails or email field containing an already-formatted email. SPECIFICATIONS As of rfc5322 section 3.4.1 local-part is case-sensitive. However most main providers do consider the local-part as case insensitive. With the introduction of smtp-utf8 within odoo, this assumption is certain to fall short for international emails. We now consider that * if local part is ascii: normalize still 'lower' ; * else: use as it, SMTP-UF8 is made for non-ascii local parts; Concerning domain part of the address, as of v14 international domain (IDNA) are handled fine. The domain is always lowercase, lowering it is fine as it is probably an error. With the introduction of IDNA, there is an encoding that allow non-ascii characters to be encoded to ascii ones, using 'idna.encode'. Also remove usage of 'email_re' in mailing email check. It is too restrictive compared to real formatting we support (or try to). Valid outgoing emails were directly canceled, notably when containing unicode. Task-2612945 (Mail: Defensive email formatting) Part-of: odoo/odoo#74474
-
Thibault Delavallée authored
PURPOSE Be defensive when dealing with email fields, notably when having multi-emails or email field containing an already-formatted email. SPECIFICATIONS: MAIL COMPOSER IN MAILING When using the composer with a mailing, it currently skips recipients whose email is a multi-email due to the strict usage of 'email_normalize'. We can improve multi-email support by effectively checking for the first email found, using the "less strict" mode of normalize. It means more emails are detected as valid, and therefore sent. Due to lower support of multi-emails when sending emails, this even allows to send multiple emails as all emails are mailed. SPECIFICATIONS: DEFAULT RECIPIENTS Mailings are generally done using default recipients, aka using a model method that returns the people to mail: customers ('partner_id'), customer emails ('email_from'), specific implementation, ... This is implementation using '_message_get_default_recipients' that returns 'partner_ids', 'email_to' and 'email_cc' that are then used in the mail composer to generate final recipients. In this commit we better handle the content of email fields to avoid issues with multi-emails. For that purpose we correctly split the content of those fields. We now have several 'email_to' for records having multi-emails instead of a single badly-formatted 'email_to'. Task-2612945 (Mail: Defensive email formatting) Part-of: odoo/odoo#74474
-
Thibault Delavallée authored
PURPOSE Be defensive when dealing with email fields, notably when having multi-emails or email field containing an already-formatted email. SPECIFICATIONS Post-message hook is used in various apps to link records to a newly created created partner. This is the case notably when used with a template as it creates partner on the fly based on emails to always handle partners. We now check either the complete 'email', either the normalized version of it to avoid comparison issues with multi emails and formatted emails. As 'email_normalized' now supports multi-emails by storing the first found one it helps finding the partner. Task-2612945 (Mail: Defensive email formatting) Part-of: odoo/odoo#74474
-