Commits on Source (58)
-
Lefebvre Thomas (thle) authored
To avoid developers to update the dict of `_events` in their overrides, to not alter by mistake the default behavior. Using a frozendict will force them to create a copy of the dict. closes odoo/odoo#123261 Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
18dd4487 -
Odoo Translation Bot authoredbe1e621d
-
OCA Git Bot authoredd4b56b00
-
Gauthier Wala (gawa) authored
Tax group are currently ordered by sequence only. Only 2 localizations of ours have defined the sequence on them. So, most of the tax groups have the same sequence. The order of search made on them is thus undeterministic. It can be seen when running the test test_generate_xml_sale with l10n_ee_reports installed, it fails sometimes (1 in 50 to 100). Because the invoice amounts are grouped and ordered by tax groups. Linked to runbot error 24595 closes odoo/odoo#137686 Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
7aff4a51 -
Andrea Grazioso (agr-odoo) authored
Try to Upload a Vendor Bill xml having an invoice line with billed_qty 0 Issue: Traceback caused by ZeroDivisionError opw-3497841 closes odoo/odoo#138249 Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
0b338739 -
OCA Git Bot authored18567bb0
-
Louis Baudoux authored
Fixes a few issues in `jsvat`: - Since the end of 2022, valid Belgian VAT numbers starting with `BE1` have been attributed, the regex had to be adjusted. - Since Brexit, Northern Ireland has to use the `XI` prefix instead of `GB`. - Removes the default country code logic. As Odoo is used worldwide, it didn't make sense to use `GB` as the default country code when no country code is mentioned. closes odoo/odoo#138749 Signed-off-by: Francois Georis (fge) <fge@odoo.com>
a49b8dd7 -
Maximilien (malb) authored
In Hungary, the tax id can be valid in different distinct ways. Either by putting a vat number looking like 'HU12345678' (EU VAT) or '12345678-1-12' (native format) or 8071592153 (Indiviual). To do the different check we added regex to check if it matches one of the three ways, otherwise a validation error will be thrown. closes odoo/odoo#136750 Task: 3522940 Signed-off-by: William André (wan) <wan@odoo.com>
c8cc82f2 -
OCA Git Bot authored03a37df0
-
Arnaud Joset authored
Before this commit, when the Database is using an enterprise Azure account/environment which has a configuration of 'Multifactor authentication', the users gets pop-up asking for approval. See https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/application-sign-in-unexpected-user-consent-prompt The solution is to remove the parameter 'prompt': 'consent' from the authentication URL which is not considered a good practice by the Microsoft support (see attachment in task). closes odoo/odoo#131701 Taskid: 3463417 Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
1e1f8453 -
Benoit Socias authored
*: website_crm, website_event, website_event_track Before this commit, when accessing the visitor views without having any event rights, an error was triggered. This commit restricts the display of the `event_registration_count` field on the `website_visitor_view_form` restricted to the `event.group_event_user` group so that its invisible condition does not fail. Similarly it restricts a visibility condition on `event_track_wishlisted_count` to the `event.group_event_manager` group. To avoid encountering the same issue with further extensions of `_compute_email_phone` on the `website.visitor` model, we make its fields `compute_sudo=True`, and revert the specific `sudo` that had been added in [1]. Steps to reproduce: - install `website_event` - set Demo user to have no Events right, but be an "Editor and Designer" for Website - register to an event as an anonymous user - access the Visitors page as Demo user => An error was produced. Steps to reproduce (2): - install `website_event_track` - set Demo user to have no Events right, but be an "Editor and Designer" - access the Visitors page as Demo user => An error was produced. [1]: https://github.com/odoo/odoo/commit/5ba09c2cb2bb180cfb1363c352f35bd8cf3b132b opw-3537849 closes odoo/odoo#138911 Signed-off-by: Romain Derie (rde) <rde@odoo.com>
aedafc81 -
OCA Git Bot authored1d5d7278
-
Nshimiyimana Séna authored
This PR fixes tests that were broken by commit 84e23047 That commit fixes the rounding of Float fields, ensuring that the floats' 'digits' parameter is enforced. Issue ----- Here an issue arise with the Discount field of `account.move.line`. In this case, the discount value is calculated from a price and a discount amount. Let's say we have an amount of $180 with a $30 discount amount. This gives a discount percentage of 16.6666666667 %. As expected, we can get the correct discounted amount like so: `180 * (1 - 0.166666666667) = 150` The default decimal accuracy of the discount field on `account.move.line` is 2 (and it's unlikely to be set much higher). Before commit 84e23047, that accuracy what not enforced in computes/onchanges, so the test ran without failure. But now the precision is always applied. As a result, the discount percentage become 16.67 %. However, with this value the test fails because, we cannot get the expected discounted amount: `180 * (1 - 0.1667) = 149.994 = 149.99` Fix --- Add a context manager to be used whenever we need Discount to have as much precision as possible. That context manager simply patches `DecimalPrecision.precision_get` to return a discount precision of 100 closes odoo/odoo#137731 Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
f33e80dc -
OCA Git Bot authored07148569
-
Andrea Gidalti authored
Incorporate Andrea Gidalti (andreagidaltig) as Vauxoo's contributor. I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr closes odoo/odoo#139100 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
12e2245d -
JordiMForgeFlow authored
Before the fix the check function is assigned a boolean, which causes an error when trying to call the function. After the fix the result of the check is returned. closes odoo/odoo#139280 Signed-off-by: William André (wan) <wan@odoo.com>
ea2798c5 -
OCA Git Bot authored13e863f0
-
Odoo Translation Bot authored61c7424c
-
OCA Git Bot authored5db68445
-
Pedro M. Baeza authored
If `past_months_limit` is set in the invoice reconcile model, and some `exclude_ids` are indicated on the call to `_get_invoice_matching_query`, an invalid SQL is built, throwing this error: odoo_1 | Traceback (most recent call last): odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/http.py", line 652, in _handle_exception odoo_1 | return super(JsonRequest, self)._handle_exception(exception) odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/http.py", line 317, in _handle_exception odoo_1 | raise exception.with_traceback(None) from new_cause odoo_1 | psycopg2.errors.SyntaxError: syntax error at or near "aml" odoo_1 | LINE 25: ...id = 2226)) AND aml.date >= '2022-04-22'::dateAND aml.id NOT... That's because the `past_months_limit` SQL condition is added without extra trailing space, and the excluded_ids condition doesn't contain an starting space. The solution is to add spaces to avoid this situation. closes odoo/odoo#139419 Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
34250482 -
Benjamin Vray authored
This commit fixes two bugs with the sidebar header. Steps to reproduce the 1st bug: - Go to "/shop" and edit the page. - Click on the header. - Open the header selector. - Choose the "sidebar header". - Bug: infinite loader (or traceback from V16). Steps to reproduce the 2nd bug: - Go to "/contactus" and edit the page. - Click on the header. - Change the "Header Position" option to "over the content". - Save the page. - Go to the homepage and edit the page. - Click on the header. - Open the header selector. - Choose the "sidebar header". - Save the page. - Go to /contactus. - Bug: the "sidebar" header is broken on the "/contactus" page. The first bug was caused by triggering the deactivation of the "Overlay" header from a location other than a website.page (in this case, the "/shop" page in the steps to reproduce). In this place, the "Overlay" header option isn't available. However, while trying to fix this, we noticed the second bug => When we activate the "sidebar" header (which is a general option for all pages), we were deactivating the "Overlay" header only on the current page (this option is specific to the page). It was done since this commit [1]. This doesn't make sense because the "Overlay" header should be deactivated on all pages, not just the current one. To address this in the simplest way, we modified the CSS so that the "Overlay" header doesn't have an impact when the sidebar header is activated. Without this change, we would have needed to add an RPC to remove the "Overlay" header on all pages, which wouldn't have been worth it. [1]: https://github.com/odoo/odoo/commit/618fd49642310c7b97ef3b9e6c01f8f691c7b12f task-3454161 closes odoo/odoo#135196 Signed-off-by: Colin Louis (loco) <loco@odoo.com>
53a3509a -
OCA Git Bot authoredc7fd24f1
-
hupo-odoo authored
Without the Accounting app and the Bank Reconciliation part, the menu item "Reconciliation Models" is irrelevant. We therefore move the menu item from account to account_accountant. task-3540705 closes odoo/odoo#139553 Signed-off-by: John Laterre (jol) <jol@odoo.com>
17f3fc98 -
OCA Git Bot authorede34d1ee6
-
Richard deMeester authored
Following #133759 - The code will fail if the purchase_order has NO date. This is because max( po.date_order.date_order and po.date_order.date(), fields.Date.today() ) will try to compare False with a date, resulting in: closes odoo/odoo#139672 Typeerror: '>' not supported between instances of 'datetime.date' and 'bool' Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
0831f6d0 -
OCA Git Bot authoredb25ea045
-
flvr-odoo authored
backport of #139701 closes odoo/odoo#139890 Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
a5a6e4f3 -
Louis Baudoux authored
Previously, this page was relying on the DB UUID to retrieve the IAP accounts of the user. In the case where account tokens are shared across multiple databases or are re-created, this becomes an issue as inconsistencies will appear. It will either show information about accounts that no longer exist in the database, or it will miss the information about accounts that were manually imported from another database. To solve this issue, the route to the page will now take the active account tokens as parameter and display the information for those accounts only. closes odoo/odoo#139928 Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
453f575a -
OCA Git Bot authored4e89f3f6
-
Odoo Translation Bot authoredb84fe736
-
OCA Git Bot authored5010b2e9
-
duongnguyen authored
For multi language website, when request http:/localhost/en/something, Odoo reroutes from the requested path /en/something to the new path /something with lang=en_US in context. If the new path is a unicode string like http:/localhost/vi/xin-chào, http:/localhost/ru/привет, a error should occur at werkzeug._compat.wsgi_decoding_dance() because the path was not latin1 string. closes odoo/odoo#139580 Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
fbd5fcf0 -
OCA Git Bot authored78e09c30
-
Soam (sold) authored
1. If the name of a product on an imported EDI document is a substring of the name of a product on the DB, said product could be used instead of the correct one, depending on their order (i.e. ID) in the DB. Example: There are 2 products named "Placement" and "Displacement" in a DB. A PDF is imported. It contains a product named "Placement". If the "Displacement" product on the DB appears before the "Placement" one, the product on the AML will be set to the "Displacement" one. To fix this, we first check if there is a product identically named to the one in the EDI document. 2. In case a product from the DB is used, if possible, the UoM used should be the one present on the EDI document. Thus there should be a check to ensure that the UoM category on said document matches the one of the product's UoM before assigning it, to avoid a compatibility error. opw-3470969 closes odoo/odoo#136109 Signed-off-by: Laurent Smet (las) <las@odoo.com> Co-authored-by: Julien Van Roy <juvr@odoo.com>
ab5741b5 -
Antoine Boonen authored
Problem --------- When creating and editing a bank account, a creation model pops-up to edit the bank account information. The previously entered bank account must be entered again which isn't user-friendly. Objective --------- The data entered on the bank account bank account should pre-fill acc_number on partner bank pop-up. Solution --------- When create & edit, `name` could be used to pass (in the context) the value input by the user. However, we want to set the default value of `acc_number` variable instead. By overriding the default_get method, we can get modify the context to do just that. task-3557753 closes odoo/odoo#139211 Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
c2e695f3 -
Xavier Morel authored
PR #139580 used `wsgi_encoding_dance` to fix the handling of i18n paths, but `wsgi_encoding_dance` is part of werkzeug's implementation details which were removed in werkzeug 2.0. Re-fix by inlining the function, copying over the version from pallets/werkzeug@9777c0821eb1a5a645185e35f7523a8725897634. closes odoo/odoo#140524 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
3eb81210 -
OCA Git Bot authored93dcab00
-
rolandojduartem authored
Current behavior: if the user has no access to crm.lead, it shows the error You are not allowed to access 'Lead/Opportunity' (crm.lead) records. This operation is allowed for the following groups: - Extra Rights/Contact Creation - Sales/Administrator - Sales/User: Own Documents Only - User types/Portal Contact your administrator to request access if necessary.' With this fix, First check the access to the model to count the records or assign zero. Related ticket #3546713 closes odoo/odoo#139404 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
d0f373ba -
Antoine Vandevenne (anv) authored
Payment acquirers don't have an `active` field, which makes users confused when they try to delete an acquirer, and the error message suggests archiving it instead. opw-3579946 closes odoo/odoo#140691 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
a07e295a -
OCA Git Bot authored23c685b7
-
Mayurrajsinh Rathod authored
Steps to reproduce ================== 1. Open course with enroll policy onInvitation or Click on three dot of any course in kanban view 2. Click on Invite > add a recipient 3. Go to mail template internal link 4. Go to setting tab 5. Disable the 'Auto delete' > save & close it 6. Click on Send 7. Go the Technical/Emails (in debug mode) 8. Send the mail by clicking 'Send now' Issue - Even if we unchecked auto delete still the mail is deleted automatically Technical ========= In the '_prepare_mail_values' method of the 'slide.channel.invite' model, the mail values for 'mail.mail' are prepared and the auto delete is set to True. After this commit ================= You can view the sent mails since the auto_delete is configured based on the template value for invitation. Task-3546212 closes odoo/odoo#139693 Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
84433cc1 -
jorv authored
Bug A previous commit b1ec81ed fixed an issue relating to wrong progression percentages when a survey was set as "one page per question" and "random selection". In doing so, it inadvertently added an issue in the following simplified case: 1. Create a new survey, and add 2 questions 2. Set layout (`question_layout`) to "one page per question" (`page_per_question`) 3. Set selection (`question_selection`) to "all questions" (`all`) 4. Now share the survey with a participant (send out the email) 5. As the participant, start the survey and answer question one 6. In the backend, go and modify the survey template by adding a new question after question 2. Save modification. 7. Now, in the ongoing survey, answer question 2 and try to move on to the next question. This will create an error traceback. Example ''' 'page_number': page_ids.index(survey_data['question'].id) ValueError: 108 is not in list ''' The error arises because the added question will have an id that is not in the `survey.user_input.predefined_question_ids` field. This list gets initialized when the `survey.user_input` gets created and reflects all the question ids of the original survey template (or the random ids in case of a random selection). So in other terms the set of questions given to a participant, starting in `survey_survey._get_pages_or_questions` is not aligned with those used for the references in the progression template Proposed fix: We add an extra check for `survey_sudo.questions_selection == 'random'` to decide if we use `survey.user_input.predefined_question_ids` or `survey.survey.question_ids` information to calculate the progession. opw-3516304 closes odoo/odoo#138736 Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
643fceff -
OCA Git Bot authoredc074569d
-
Odoo Translation Bot authored78f6557e
-
OCA Git Bot authoredc473eb41
-
Thibault Delavallée authored
Add test cases related to issues found in various leads management. All those email inputs lead to an email found being '@gmail.com' (or equivalent) which is not a valid email. A consequence of that behavior is that 'email_normalized' for several leads is the same ('@gmail.com') and they are considered as being the same email identity. They could be included in a pack of leads to merge (see 'crm'). Task-3572208 Part-of: odoo/odoo#139887
22358170 -
Thibault Delavallée authored
When 'getadresses' fails at parsing some input and give us a result like 'gmail.com' (see previous commit adding test cases) we fallback on using 'email_re' which is better at finding email addresses in a global string. We use it only in this specific case as fallback mechanism to rely on 'getadresses' when possible. Task-3572208 Part-of: odoo/odoo#139887
78052c06 -
Thibault Delavallée authored
Add test cases related to an issue found during mail gateway testing. When an email_to is formatted like '"robert@notgmail.com" <robert@notgmail.com>' the tool finds two emails. As it is used in IrMailServer it sends two emails insted of one. This may happen notably when partners are automatically created based on an email only in which case it is put in both name and email. Task-3566542 Part-of: odoo/odoo#139887
5cde4e25 -
Thibault Delavallée authored
Remove quotes when name of a formatted email is also an email, as indicated in tests. We still get two emails being sent for a given outgoing email when the name part is an email but that would be difficult to avoid. Task-3566542 closes odoo/odoo#139887 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
4c8d544c -
OCA Git Bot authored73073fd9
-
Odoo Translation Bot authorede79ff926
-
OCA Git Bot authored8fad80d9
-
Ahmed Khalaf authored
This commit updates the translations for changes in `delivery_ups` and `delivery_ups_rest` modules in the linked enterprise PR. task Id: 3349269 ENT PR: odoo/enterprise#43538 closes odoo/odoo#137713 Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
0175df25 -
Arnaud Baes authored
On live youtube videos, url are in reality like this: `https://www.youtube.com/live/<video_id >` which was not properly caught by the regex in its compute Reported during OXP closes odoo/odoo#141630 Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
fd348c67 -
Anna Janiszewska authored
leave_manager_id is used to create activity when new allocation request is created. In case when employee doesnt have leave_manager_id set, current user (employee creating allocation request) is used for activity. As a result manager doesn't receive email about allocation request by employee. Fix is to use employee's parent_id instead. closes odoo/odoo#141179 Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
cef006c4 -
Florian Charlier authored
Without it, like in no-demo testing conditions, tests with rights depending on Karma fail. Task-3575692 closes odoo/odoo#140309 Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
3ee9aa8a -
nda authored
The "reset password" feature does not take into account multi-website. steps to reproduce: - create a website A - uncheck 'Shared Customer Accounts' on website A - create a portal user user@example.com on website A - create a website B - uncheck 'Shared Customer Accounts' on website B - create a portal user user@example.com on website B - reset password for user@example.com on any website before this commit: An error is raised "No account found for this login" (which is false, actually 2 accounts are found) after this commit: Only the user linked to the current website is properly selected opw-3551540 closes odoo/odoo#140536 Signed-off-by: Romain Derie (rde) <rde@odoo.com>
4fd3b7a0 -
OCA Git Bot authored819e0ffa