- Sep 22, 2023
-
-
alsh-odoo authored
This traceback arises when the user selects multi company records and click on the 'create report' button. To reproduce this issue: 1) Install 'hr_expense' 2) Create a new company for example 'test' 3) Enable the 'test' company on the right corner 4) Now open 'employees' and change the company of the current user(Mitchel Admin) to the 'test'. 5) Open 'Expenses', create a new record, and change the company to 'test'. 6) Fill the required field values and save the record. 7) Now click 'My Expenses/My Expenses to report' and select all the records (Make sure 'My Expenses' filter is applied) 8) Click on the 'Create Record' button Error:- "ValueError: Expected singleton: res.company(2, 1)" On the '_create_sheet_from_expenses' method, the value of 'company_id' is getting through 'self.company_id.id'. See:- https://github.com/odoo/odoo/blob/f910987cb4af84c1e7afabf67f05d4eebc31e765/addons/hr_expense/models/hr_expense.py#L324-L335 But when user selects multi company recordsets 'self.company_id' has multi recordsets. When 'company_id' is getting value through 'self.company_id.id', because of 'self.company_id' has multiple records, which leads to the above traceback. By applying this commit will resolve the issue by raising an exception, when user selected multi company records to create report. sentry-4465422743 closes odoo/odoo#135035 Signed-off-by:
de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
-
- Sep 21, 2023
-
-
Mayurrajsinh Rathod authored
Prior this commit: The mail scheduler of the event notifies the attendees even when the event is no longer active. After this commit: Inactive events no longer notify attendees. Task-3381876 closes odoo/odoo#130237 Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
-
Robin Lejeune (role) authored
1. Backport of [1]. 2. Steps to reproduce: - Install website_crm - Connect as Admin and remove the sales rights for Demo - Check the website on a private window (to create an anonymous visit) - Connect as Demo on the normal window - Go to Website > Reporting > Visitors => It triggers an access error due to lead_ids being restricted to sales_team.group_sale_salesman. (Note: the error sometimes isn't triggered at that point. In that case, click on the visitor: the same error will trigger.) Considering the computed field doesn't do anything critical as it just retrieves the email and phone number, the restriction is overridden on the field. [1]: https://github.com/odoo/odoo/commit/7de453477d7c23e607a15e0d60613080857e3371 opw-3475301 closes odoo/odoo#135991 Signed-off-by:
Quentin Smetz (qsm) <qsm@odoo.com>
-
erl-odoo authored
Upgrade (aka migration) scripts are a core part of Odoo, allowing database manipulations for modules during version changes. Any module, including custom ones can run upgrade scripts, even if the `--upgrade-path` flag (and with it, the `odoo.upgrade` sub-module) is not present. Currently only the "standard" modules benefit of easy upgrade script testing. Any custom modules that want to run tests of their upgrades have to import the tests in the usual `tests` folder, which is not ideal. Therefore, to allow TDD and programmatic testing of upgrade scripts in custom modules, the test discovery is here modified to also parse the module's `migrations` and `upgrades` sub-modules for tests. closes odoo/odoo#136130 X-original-commit: 483cc20b Signed-off-by:
Christophe Simonis (chs) <chs@odoo.com> Signed-off-by:
Vranckx Florian (flvr) <flvr@odoo.com>
-
Leloup Loïc (lole) authored
When the number of mail.activities for a user was getting too big, the whole database is getting slowed down as the activities are recomputed each time a page is loaded. The issue was mostly brought by commit [03c3d440](https://github.com/odoo/odoo/commit/03c3d440ae31baa0400b7adba7f6373556ff5c38 ). The time was recorded when refreshing the home page of the site. | | | | | --- | --- | --- | | #activities | before PR | after PR | | 100 000 on 1 model | 22.66s (single test) | 0.408s (worst of few runs) | | 40 on 40 models | 0.06s worst, 0.037s best | 0.053s (worst of few) (0.038s best) | closes odoo/odoo#134126 Signed-off-by:
Sébastien Theys (seb) <seb@odoo.com>
-
Mathieu Walravens authored
Steps to reproduce: 1. Have 2 companies, and select the one w/ the highest ID 2. Create a new product tracked by lot + expiration date 3. Receive product 4. Set the received lot's expiration and alert dates in the past 5. Inventory > Operations > Run scheduler Before this commit: An activity is created on the lot for OdooBot, despite the product's responsible set to the current user. It happens because the default value for `responsible_id` is the current user, but the value is only set for the current company. When the scheduler runs, it doesn't set the company; therefore, it takes the product's responsible user for the company with the lowest ID, which is not set. After this commit: The activity is created for the product's responsible user using the lot's company. opw-3489340 closes odoo/odoo#135361 Signed-off-by:
Tiffany Chang (tic) <tic@odoo.com>
-
- Sep 20, 2023
-
-
Laurent Smet authored
- Create a move - Add a line and set a custom tax tag on it - Add a new line to balance the move => The tax tag is gone. This is because the code is recomputing taxes when adding a new line. closes odoo/odoo#135756 Opw: 3487465 Signed-off-by:
Brice Bartoletti (bib) <bib@odoo.com>
-
Mathieu Walravens authored
Before this commit: When returning a dropshipping, the valuation layers created do not have the correct accounts on it: - Valuation -> Input for the first SVL - Output -> Valuation for the second SVL After this commit: For a dropshipped move, valuation layers have the following chain of accounts: - Input -> Valuation for the first SVL - Valuation -> Output for the second SVL Therefore, the return should have it reversed: - Output -> Valuation for the first SVL - Valuation -> Input for the second SVL Steps to reproduce: 1. Create a dropship product with automated inventory valuation 2. Create a Sales Order, go on the PO and confirm it 3. Set quantities and validate dropshipping 4. Return delivered product (dropship return) opw-3391174 closes odoo/odoo#132864 Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
-
Huy Lee authored
After commit [1], the check that the target url is different from the current page's url has been removed thus leading to error that anchor link always scroll down to element that have data-anchor enabled. Steps to reproduce (the easiest way): - Install Website Blog - Turn on customize comment on post - Go incognito then access any blog post, scroll down and click the `Sign in to leave a comment` button - Holy, the page scrolls down to the discussion section but doesn't go to the login page [1]: https://github.com/odoo/odoo/commit/fb087dbec96f5e533d1fdd9c2b0c2e00296c83de closes odoo/odoo#135620 Signed-off-by:
Benjamin Vray (bvr) <bvr@odoo.com>
-
- Sep 19, 2023
-
-
Paolo Gatti (pgi) authored
The condition for which the Fiscal Position's Note is shown only in Customer Invoices is removed because unnecessary. A check has been added on the company's country to be 'IT'. Task link: https://www.odoo.com/web#id=3420752&model=project.task task-3420752 closes odoo/odoo#130042 Signed-off-by:
John Laterre (jol) <jol@odoo.com>
-
Djamel Touati authored
Steps to reproduce the bug: - Create a storable “P1”: - tracking= serial - save - Change the type of product to service Problem: some fields for tracked products are not hidden, because the product tracking is not updated. Solution: Convert _onchange_type into compute methods. The tracking is updated even if the change type is applied from the "product.product" form. opw-3499976 closes odoo/odoo#135852 Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
-
Julien Van Roy authored
Set the default sale and purchase taxes for the mexican CoA. Before introducing the IEPS taxes in commit 734e18eb, the default taxes were the 16% IVA taxes (when loading the CoA, the default is simply the first possible match with the lowest sequence). As the IEPS taxes now have the lowest sequence, they are incorrectly selected as the defaults. This commit fixes this. task-3507155 closes odoo/odoo#135810 Signed-off-by:
Laurent Smet (las) <las@odoo.com>
-
Gaetan Vanden Bergh (gavb) authored
purchase_stock, point_of_sale, sale_mrp What are the steps to reproduce your issue? When Odoo.sh runs unit tests on a development branch, it tests the code in the MRP module for rounding errors. What is the current behavior that you observe? I had a customization that introduced a rounding error in the standard MRP module. When the unit tests ran on the development branch, I got a traceback. What would be your expected behavior in this case? The rounding error should be reported as a failed test with a message. No traceback. opw-3454998 closes odoo/odoo#131418 Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
-
- Sep 18, 2023
-
-
Fabien Meghazi authored
This patch provides the possibility to implement a custom security layer on top of Odoo's bus notification system which uses postgresql's NOTIFY command. The key addition is the `ODOO_NOTIFY_FUNCTION` environment variable (opt-in), which can now define a postgresql function to be called instead of the NOTIFY command. This allows for greater flexibility and control over the notification and triggering mechanisms within Odoo. closes odoo/odoo#130368 Signed-off-by:
Fabien Meghazi (fme) <fme@odoo.com>
-
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>
-