-
Notifications
You must be signed in to change notification settings - Fork 23k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] web: Don't show buttons when model has readonly access #19314
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Yenthe666 thank you for your contribution |
You're welcome - happy that I can help. |
Tanks you, this change hidden buttons create & edit and quick create on fields many2one when user can't acces to create on model. Tanks again |
luistriana28
pushed a commit
to Jarsa/odoo
that referenced
this pull request
Sep 18, 2017
* [FIX] account: multi-currency reconciliation Reconcile the following entries : D C Amount currency 3.655,52€ +3.872,45$ 3.436,80€ -3.872,45$ What Odoo does when I reconcile the 2 entries above using the "Reconcile" button: D C Amount currency 3.655,52€ +3.872,45$ 3.436,80€ -3.872,45$ 0€ 218,72€ -236,61$ 0€ 0€ +236,61$ What Odoo should do : D C Amount currency 3.655,52€ +3.872,45$ 3.436,80€ -3.872,45$ 0€ 218,72€ 0$ opw-687481 * [FIX] sale: Making a downpayment with a fiscal position When creating a SO line and an invoice line for a downpayment, the fiscal position set on the SO must be taken into account to map the right taxes. opw:688611 * [FIX] report_intrastat: Not allowed to delete record It's not allowed to delete record from the tree view of intrastat report. opw:692016 * [I18N] export saas-10 source terms * [I18N] update saas-10 translations by merging 9.0 and 10.0 * [FIX] account: refunding an invoice with two payment terms Step to reproduce the bug: Create a payment term with two separated due type: -Due type 1: percent , value 30, numbers of days: 0 days after the invoice date -Due type 2: Balance; value 0, Number of days 0: Last day of following month Create an invoice with the payment term Refund the invoice with the option "cancel: create refund and reconcile" or "Modify: create refund, reconcile and create a new draft invoice". Error message: "You are trying to reconcile some entries that are already reconciled!" But no payment had been received and the receivable accounts were still open. opw:694386 * [FIX] crm: Use an address that google knows of. Forward-port of 154a125 Needed for geo localisation tests. * [FIX] tools: verify path before opening * Forward-port c6b9b69 * [MERGE] Forward-port of 9.0 up to e40a4ba More specificically, cherry-pick of e3a52a9 to e40a4ba * [FIX] mail, website_(blog/forum/slides): correctly redirect users on backend/frontend /mail/view controller is a generic controller that redirects to a view on a document either on backend or frontend depending on the module, user and some model specific conditions. However currently url computation is not always correct as you may end up on frontend view even when you are a regular user that should land on backend views. In this stable version we introduced a key in the returned action that indicates the action is a pure front-end (public) action or not. This way people are correctly redirected to the backend or the frontend when going through the controller. * [I18N] Update translation terms from Transifex * [I18N] Update translation terms from Transifex * [I18N] Update translation terms from Transifex * [FIX] hr_expense: prevent deletion of posted expense Prevent the deletion of expense or expense sheet if they are linked to a journal entry. Closes odoo#19128 Closes odoo#19044 opw-767549 * [FIX] hr_attendance: only if the check_out is later than the check_in You can not create a check-in at 09:00 in case you have an attendance where you checked out at 09:00. Complement of bfa55e4 Closes odoo#19226 opw-769773 * [FIX] mrp: generating raw move based on bom line should copy sequence Closes odoo#19182 opw-769259 * [FIX] website_sale: archived products Archived products still published on the website will trigger a traceback when accessed (the link might still exist in a search engine results). opw-767740 * [FIX] website_sale_delivery: disable 'Pay Now' button - Enable several shippers - Enable Paypal acquier - Buy a product on the eCommerce, go to payment page - Change the shipper While the page is reloading, the user has time to click on the 'Pay Now' button. opw-748467 * [FIX] website_sale: product category tree not clickable in eCommerce When the last selected category or search criteria in eCommerce had no products(No product defined), the website category tree was not clickable. opw:767021 * [FIX] website_crm: fix lead creation through website_form Before this commit, a message received through the contact us form did create a Lead, but any notification was impossible (even if a user was a follower of the relevant sales team. This was because the default sales team is integrated in the values for create in models.py, which mail_thread can't see, but needs in order to notify This commit corrects the behavior which now converge with standard lead creation by adding the default sales_team earlier in the values for create OPW 762651 closes odoo#19180 * [FIX] crm: expected closing Complement of commit 9d2f48d opw-724375 * [FIX] website_sale: correct images of product and variants Before this commit, when trying to edit through the website editor the product image, it was in fact the product variant that we edited. This commit corrects it and when an image is displayed, the model it comes from is reliable OPW 767539 closes odoo#19168 * [FIX] l10n_fr: migrate tags on taxes Closes odoo#19231 * [FIX] ir_model: Don't prefetch unnecessary fields Do not prefetch unnecessary fields during the uninstallation of modules. Previous to this commit, prefetching of unnecessary fields would cause server crashes on some modules that add a field on ir_model_fields. i.e. website_form * [FIX] ir_model: Don't prefetch unnecessary fields Do not prefetch unnecessary fields during the uninstallation of modules. Previous to this commit, prefetching of unnecessary fields would cause server crashes on some modules that add a field on ir_model_fields. i.e. website_form * [FIX] doc: mention psycogreen dependency for gevent worker * [FIX] base: remove early size limit on author field The default size limits set in base.sql are eventually superseded by the actual limits (or absence of) when the DB schema is synchronized with the Python model definitions. However the list of modules (name, authors, descriptions, dependencies) is loaded before this can happen. The length of the author field is one case that can easily crash the database bootstrap process at that point, should a module with a long author name be present in the addons path. After schema sync, that size limit is lifted entirely (although Odoo Apps does limit the max author name length to 512 at the moment, to prevent abuse). Fixes odoo#5850 * [FIX] point_of_sale: control if a cashier is in localstorage Before this commit, we could temporarily change cashier from A to B, and back to A seamlessly just by refreshing the page. This could be a security issue for a cashier is held responsible for its sales. This commit stores the cashier in localstorage, and with the right sets of methods, corrects the issue. OPW 767827 closes odoo#19207 * [FIX] calendar: all day event - Set the TZ as 'America/Martinique' - In the calendar (month view), click on a date D. - Fill in the topic, then click on "Edit" The date is set to D-1. Commit 09066fb makes the date consistent when the user sets an event as an all day event by taking into account the appropriate timezone. However, in the case of an event created from the month view, this TZ modification should not be applied. opw-766638 * [FIX] base_import: headerless import - Import a CSV file without header - Untick the option 'The first row contains the label of the column' An error is reported. If no header, the method `_match_headers` should return consistent object types. opw-769117 * [FIX] base_import: Specified Date Format in Import Statment is not recognized Steps to reproduce the bug: 1. Import a bank statement with the shown dateformad DDMMYYYY (without headers) 2. Specify this date format in the advanced options 3. Try to find the date column to assign. Bug: The date format is not suggested for the fields with format DDMMYYYY. opw:769118 * [FIX] web_editor, website_forum: allow to post videos on the forum The commit 8749410 corrected the way the iframe was rendered to display a video in v9.0. In v10 though, the html sanitizer is a bit more severe and cleans data-src attributes, preventing the iframe to have a src This commit works around that and allows the src of the video to be saved in db OPW 761424 closes odoo#19125 * [FIX] web: Setting ir.values for computed fields Setting ir.values for computed fields is useless as the function onchange in models.py will set to False all the computed fields with a modified dependence. opw:767942 * [FIX] stock: performance issue Commit 6a366b2 introduces a subquery when fetching translations in order to avoid fetching duplicates. On large a `ir.translation` table (~500000 records), this can cause a major performance degradation when the user is not using the English language. A typical example is a `read_group` call such as: ``` self.env['stock.quant'].with_context(lang='fr_BE').read_group([ ('location_id', 'child_of', self.env.ref('stock.stock_location_stock').id)], ['product_id', 'qty'], ['product_id'], limit=80) ``` When no `orderby` parameter is used, the `groupby` fields are implicitly used for ordering. While this makes sense for direct calls from the web client, this implicit order might be problematic for programmatic calls (such as computed fields). Indeed, in case of grouping by product, the subquery mentioned earlier is used to sort by product name. This is costly, and in most of the cases useless. The workaround is to explicitely order by `id`, to avoid the use of the subquery. For the upcoming version, a cleaner fix should be made in order to prevent duplicated translations, and get rid of the subquery. opw-767532 * [FIX] delivery: zip code comparison Some countries, such as Canada, are using letters in their zip code. When we check if the zip code is within the accepted range, we should make sure to normalize it by making it case insensitive. opw-767866 * [FIX] web_editor: enter remove or duplicate node There is some odd behavior especially inside a editable containing newlines. For example in the sale description on an ecommerce item, lines could contain newline (it is editable from backend) but as an effect of other use case, pressing enter could have a range of unwanted side effects: - removing all the content, - duplicating the editable (should never happen, if we have one field "description_sale" we don't want to duplicate it, this has no sense) In a product name which is in the same use case, there is no newline so the problem is not apparent, and ENTER do nothing. This is the behavior we should want in every instance. If we still want a newline, we have to force it with SHIFT + ENTER key, also this is regarding field that may or could be present in the backend views, so it could also be edited in backend. This change make ENTER ignored when we are editing a node directly child of an node being edited. A second part of the issue was that dom.removeBetween (used to remove content inside a range) could remove the ancestor node that was an editable. This is not wanted. For example if we did CTRL + A inside a field with `<br />` then ENTER or pasting something, the field would be removed and not just emptied and could not be gotten back without editing the template manually. This was sometimes mitigated because if a `<br />` was at the end of an element, it would stay in this use case avoiding the issue. note: not necessary after saas-16 fixes odoo#17445 opw-751360 closes odoo#19313 * [FIX] im_livechat: unsupported locale - Set the browser to language 'Spanish (Latin America)' ('es-419') - As a public user, open a livechat session. The session doesn't open. The root cause is the creation of a mail channel which contains translatable fields (e.g. name). This attempts to create translations in the 'es_419' language. However, this locale doesn't exist in Odoo, and it triggers the constraint 'lang_fkey_res_lang'. In this specific case, there is no real reason to translate the channel name. Therefore, we simply avoid it thanks to a context key. opw-766489 * [FIX] mrp: Unbuild order with serial number When unbuilding an order with serial number, the quant with the right serial number must be found in the system either it raises an UserError explaining what's the problem. PS: A problem was found when we tried to unbuild two times the same MO. After the first unbuild, we deleted it and recreated the same one. opw:748472 * [IMP] base_address_city: Improved way as append the city_id Like the address_format could be changed by each country, this method is required to append the field city_id in the views, to all country address formats. But if We need inherit the view to add a parameter in city or city_id, WE need overwrite this method. Now, with this change, We only inherit the view, and not all the method. * [FIX] web: Don't show buttons when model has readonly access PR odoo#19314 * [FIX] tools: fix amount to text in fr and nl Correct rendering of 70 and 90 in french And manage inversion [unit]-en-[tens] in nl opw 757048 closes odoo#19297 * [FIX] website_forum: fix display of images in a post Before this commit, the images were messing up the layout of the post, with text uglily lying on their right This commit solves the issue at rendering of the post, to ensure that current posts on prods be affected in a reversible manner. Also, we want this commit to have minimal impact OPW 769721 closes odoo#19322 * [FIX] mrp_repair: default location in multi-company 1. Create a new company 2. Create a user with access to this company and with access to repair 3. Connect as the new user 4. Try to create a new repair and the stock.warehouse access error should appear opw-769160 * [FIX] http/db: handle case when `db_filter` is empty in the config file In such a case the db filtering won't be applied on an empty regex so we use the list of databases passed to `db_name` (--database) as the database list (and we also avoid to list all the databases present on the postgresql cluster) As a side effect, this patch allows to strengthen the postgresql security by preventing Odoo to list all the databases present on the cluster. * [I18N] Update translation terms from Transifex * [I18N] Update translation terms from Transifex * [FIX] calendar, web_calendar: change date - Change the date of an event through the form view => a mail is sent to the attendees. - Change the date of an event thanks to the drag and drop of an event => the mail is not sent. It is necessary to introduce a context key in the write call so we can make the distinction between the write triggered from the drag and drop and the write triggered by a recomputation of fields. Indeed, when the form view is used to change the date, `write` is called several times. We should avoid sending the same email each time. opw-766295 * [FIX] account: future payment - Create a vendor bill - Register a payment in the future (e.g. Bank payment) On the dashboard, this payment in the future is taken into account, while it shows a graph up to today. Moreover, when clicking on "Difference", the report is opened at today's date. opw-768155 * [FIX] mrp: Singleton expected in action_unbuild In some cases, the consumed quants can be more than one. In this case the check for the lot must be done just on the first consumed quant. Courtesy of @jco. opw:748472 * [FIX] report: paper format Make paper format mandatory on the company. If no paper format is defined, the PDF created may have an unexpected format. opw-770173 * [FIX] prevent calling costful methods on empty recordset Some methods are called on empty recordset causing lacking of performance. opw:769720 * [FIX] account_asset: deferred revenue account - Associate a product with a "Deferred Revenue Type" - Create a customer invoice and add the product => the account of the deferred revenue is used. - Create a SO with the same product, and generate the invoice => the account of the deferred revenue is NOT used. opw-769254 * [FIX] account: handling of text domains in _query_get 1df72cb added a stringification of the domain parameter to handle situations where an actual domain (list/tuple) is being provided rather than a string, however this causes issues when the string input is text (unicode) containing non-ascii data as in Python 2 `str()` will then raise a UnicodeEncodeError. Rather than stringify the input, bypass safe_eval when the input is already a proper domain. Closes odoo#19367 * [FIX] account_tax_python: empty code If the user somewhat removes the 'Applicable Code' text, the call to `safe_eval` will crash. opw-769267 * [FIX] purchase: missing data in tax computation - Create a purchase tax computed with Python code. - The Python code must use an attribute of the product, e.g. `product.price`. - Create a PO using the created purchase tax. It crashes, because the product (as well as the partner) is not sent to the `compute_all` method. opw-770078 * [FIX] crm: columns and tables in upper cases The module studio gives the abality to name columns or tables with upper cases. So making the SQL case sensitive avoids problems with studio. opw:770022 * [FIX] account: mark as reconciled - Create 2 companies: - Company A and check VIES VAT Check - Company B and do not check VIES VAT Check - Set current company of admin to Company A and do not allow Company B - Create a demo user on Company B and give him Adviser group in Accounting. - Log in with the demo user. - Create a Customer A as a company with: Country = Spain TIN = ES85847955H - Create a contact on Customer A: "Contact Sample" - Create a Customer invoice on "Contact Sample" partner - Through the menu Accounting/Payments, create a new payment on "Contact Sample" partner with the total amount of the invoice. - Open the menu Manual Payments and invoicing matching. The invoice and the payment should be proposed for reconciliation. Do CTRL+ENTER. An error message appears: 'The VAT number [ES85847955H] for partner [Contact Sample] either failed the VIES VAT validation check or did not respect the expected format ESA12345674.' This message should not appear as the current user is on Company B which doesn't have the flag "VIES VAT Check" checked. The issue comes from the `sudo` in `mark_as_reconciled`, which will lead to `self.env.user` to be the admin in the VAT check, and therefore `self.env.user.company_id` will be Company A. Closes odoo#19274 opw-770018 * [FIX] account_voucher: default currency - Go to Accounting > Configuration > Journals. - In the form view of a journal, click on Action > Voucher Entries - Click on Create => traceback opw-771415 * [FIX] account: mark as reconciled `last_time_entries_checked` is a commercial field, so bypassing the write won't sync it. Closes odoo#19274 opw-770018 * [FIX] purchase: PO state when validated When nothing has been invoiced and the PO is validated with nothing to invoice then the state of the PO must be "Nothing to invoice" opw:769919 * [FIX]sale_stock: copy devolution move without decreasing respective SO values -Make a return picking from a SO, and condigure the items to be refunded on SO(in the wizard) -Copy the return picking. -Validate it. Without this fix, it would just keep decreasing the delivered value on SO. opw:767429 * [CLA] signature for D4N Closes odoo#19425 * [FIX] google_calendar: do not create an event with an invalid id The id is useful to update existing events but sometimes we are getting some ids that are not accepted by Google Getting an error: odoo.addons.google_account.models.google_service: Bad google request : { "error": { "errors": [ { "domain": "global", "reason": "invalid", "message": "Invalid resource id value." } ], "code": 400, "message": "Invalid resource id value." } } Looks like existing events can have a _ in their id but new one, no longer. It seems that these events are created by outlook calendar when synchronized with Google Calendar. opw-749752 opw-751294 opw-751348 * [FIX] account_tax_python: correctly forward-port 7eb7e9f * [FIX] mass_mailing: add missing statistics index Indexing `mail_mail_id_int` is useful for locating the statistics entry that should be updated (bounced/opened/replied) * [FIX] website_quote: images of acquirer should be dynamic Echoes commit c255342 Before this commit, the image that was fetched for the quotes was the static one, preventing it to be changed Now, the image is dynamically fetched OPW 769701 closes odoo#19417 * [FIX] account, invoice analysis: negative amounts for in_invoice-like Before this commit, the invoice analysis report summed the amount of invoices regardless of whether they were in or out, as if it were an absolute sum. This commit corrects the behavior back to v9's, where in_invoice have the minus sign and are hence subtracted opw 769409. Was PR odoo#19413 * [FIX] account: Register a payment with no sequence for account.payment When registring a supplier invoice, if no sequence exists for code "account.payment.supplier.invoice" then it failed for the creation of the counterpart lines because a name is required to create an account move line. ps: check function "_get_liquidity_move_line_vals" for the condition. opw:767224 * [FIX] purchase: multiple backorders Avoid crash if multiple backorders are found. Closes odoo#19452 opw-771732 * [FIX] payment_sips: allow to override the default atos url. Sips is generic, and others services that Atos use the same protocol. It is not user-friendly, but that allow user to use alternative service like 'Sogenactif'. In next version, we need to add field on config to specify it and the InterfaceVersion that can differ according to the provider. * [FIX] payment_sips, payment_ogone: remove call to partner_reference. This field has been removed on transaction model in commit f8a98d9. * [I18N] Update translation terms from Transifex * [FIX] point_of_sale: format date on receipt The date printed on the receipt is not printed according to the language settings. opw-769862 * [FIX] payment: onchange partner - Go in Accounting > Sales > Payment - Fill the mandatory info, and create a "Payment Transaction" - On the form view, change the Partner - The Customer Details are empty, and saving is not possible since the country (mandatory) is not filled in Closes odoo#15708 opw-771753
luistriana28
pushed a commit
to Jarsa/odoo
that referenced
this pull request
Oct 11, 2017
* [FIX] account: multi-currency reconciliation Reconcile the following entries : D C Amount currency 3.655,52€ +3.872,45$ 3.436,80€ -3.872,45$ What Odoo does when I reconcile the 2 entries above using the "Reconcile" button: D C Amount currency 3.655,52€ +3.872,45$ 3.436,80€ -3.872,45$ 0€ 218,72€ -236,61$ 0€ 0€ +236,61$ What Odoo should do : D C Amount currency 3.655,52€ +3.872,45$ 3.436,80€ -3.872,45$ 0€ 218,72€ 0$ opw-687481 * [FIX] sale: Making a downpayment with a fiscal position When creating a SO line and an invoice line for a downpayment, the fiscal position set on the SO must be taken into account to map the right taxes. opw:688611 * [FIX] report_intrastat: Not allowed to delete record It's not allowed to delete record from the tree view of intrastat report. opw:692016 * [I18N] export saas-10 source terms * [I18N] update saas-10 translations by merging 9.0 and 10.0 * [FIX] account: refunding an invoice with two payment terms Step to reproduce the bug: Create a payment term with two separated due type: -Due type 1: percent , value 30, numbers of days: 0 days after the invoice date -Due type 2: Balance; value 0, Number of days 0: Last day of following month Create an invoice with the payment term Refund the invoice with the option "cancel: create refund and reconcile" or "Modify: create refund, reconcile and create a new draft invoice". Error message: "You are trying to reconcile some entries that are already reconciled!" But no payment had been received and the receivable accounts were still open. opw:694386 * [FIX] crm: Use an address that google knows of. Forward-port of 154a125 Needed for geo localisation tests. * [FIX] tools: verify path before opening * Forward-port c6b9b69 * [MERGE] Forward-port of 9.0 up to e40a4ba More specificically, cherry-pick of e3a52a9 to e40a4ba * [FIX] mail, website_(blog/forum/slides): correctly redirect users on backend/frontend /mail/view controller is a generic controller that redirects to a view on a document either on backend or frontend depending on the module, user and some model specific conditions. However currently url computation is not always correct as you may end up on frontend view even when you are a regular user that should land on backend views. In this stable version we introduced a key in the returned action that indicates the action is a pure front-end (public) action or not. This way people are correctly redirected to the backend or the frontend when going through the controller. * [I18N] Update translation terms from Transifex * [I18N] Update translation terms from Transifex * [I18N] Update translation terms from Transifex * [FIX] hr_expense: prevent deletion of posted expense Prevent the deletion of expense or expense sheet if they are linked to a journal entry. Closes odoo#19128 Closes odoo#19044 opw-767549 * [FIX] hr_attendance: only if the check_out is later than the check_in You can not create a check-in at 09:00 in case you have an attendance where you checked out at 09:00. Complement of bfa55e4 Closes odoo#19226 opw-769773 * [FIX] mrp: generating raw move based on bom line should copy sequence Closes odoo#19182 opw-769259 * [FIX] website_sale: archived products Archived products still published on the website will trigger a traceback when accessed (the link might still exist in a search engine results). opw-767740 * [FIX] website_sale_delivery: disable 'Pay Now' button - Enable several shippers - Enable Paypal acquier - Buy a product on the eCommerce, go to payment page - Change the shipper While the page is reloading, the user has time to click on the 'Pay Now' button. opw-748467 * [FIX] website_sale: product category tree not clickable in eCommerce When the last selected category or search criteria in eCommerce had no products(No product defined), the website category tree was not clickable. opw:767021 * [FIX] website_crm: fix lead creation through website_form Before this commit, a message received through the contact us form did create a Lead, but any notification was impossible (even if a user was a follower of the relevant sales team. This was because the default sales team is integrated in the values for create in models.py, which mail_thread can't see, but needs in order to notify This commit corrects the behavior which now converge with standard lead creation by adding the default sales_team earlier in the values for create OPW 762651 closes odoo#19180 * [FIX] crm: expected closing Complement of commit 9d2f48d opw-724375 * [FIX] website_sale: correct images of product and variants Before this commit, when trying to edit through the website editor the product image, it was in fact the product variant that we edited. This commit corrects it and when an image is displayed, the model it comes from is reliable OPW 767539 closes odoo#19168 * [FIX] l10n_fr: migrate tags on taxes Closes odoo#19231 * [FIX] ir_model: Don't prefetch unnecessary fields Do not prefetch unnecessary fields during the uninstallation of modules. Previous to this commit, prefetching of unnecessary fields would cause server crashes on some modules that add a field on ir_model_fields. i.e. website_form * [FIX] ir_model: Don't prefetch unnecessary fields Do not prefetch unnecessary fields during the uninstallation of modules. Previous to this commit, prefetching of unnecessary fields would cause server crashes on some modules that add a field on ir_model_fields. i.e. website_form * [FIX] doc: mention psycogreen dependency for gevent worker * [FIX] base: remove early size limit on author field The default size limits set in base.sql are eventually superseded by the actual limits (or absence of) when the DB schema is synchronized with the Python model definitions. However the list of modules (name, authors, descriptions, dependencies) is loaded before this can happen. The length of the author field is one case that can easily crash the database bootstrap process at that point, should a module with a long author name be present in the addons path. After schema sync, that size limit is lifted entirely (although Odoo Apps does limit the max author name length to 512 at the moment, to prevent abuse). Fixes odoo#5850 * [FIX] point_of_sale: control if a cashier is in localstorage Before this commit, we could temporarily change cashier from A to B, and back to A seamlessly just by refreshing the page. This could be a security issue for a cashier is held responsible for its sales. This commit stores the cashier in localstorage, and with the right sets of methods, corrects the issue. OPW 767827 closes odoo#19207 * [FIX] calendar: all day event - Set the TZ as 'America/Martinique' - In the calendar (month view), click on a date D. - Fill in the topic, then click on "Edit" The date is set to D-1. Commit 09066fb makes the date consistent when the user sets an event as an all day event by taking into account the appropriate timezone. However, in the case of an event created from the month view, this TZ modification should not be applied. opw-766638 * [FIX] base_import: headerless import - Import a CSV file without header - Untick the option 'The first row contains the label of the column' An error is reported. If no header, the method `_match_headers` should return consistent object types. opw-769117 * [FIX] base_import: Specified Date Format in Import Statment is not recognized Steps to reproduce the bug: 1. Import a bank statement with the shown dateformad DDMMYYYY (without headers) 2. Specify this date format in the advanced options 3. Try to find the date column to assign. Bug: The date format is not suggested for the fields with format DDMMYYYY. opw:769118 * [FIX] web_editor, website_forum: allow to post videos on the forum The commit 8749410 corrected the way the iframe was rendered to display a video in v9.0. In v10 though, the html sanitizer is a bit more severe and cleans data-src attributes, preventing the iframe to have a src This commit works around that and allows the src of the video to be saved in db OPW 761424 closes odoo#19125 * [FIX] web: Setting ir.values for computed fields Setting ir.values for computed fields is useless as the function onchange in models.py will set to False all the computed fields with a modified dependence. opw:767942 * [FIX] stock: performance issue Commit 6a366b2 introduces a subquery when fetching translations in order to avoid fetching duplicates. On large a `ir.translation` table (~500000 records), this can cause a major performance degradation when the user is not using the English language. A typical example is a `read_group` call such as: ``` self.env['stock.quant'].with_context(lang='fr_BE').read_group([ ('location_id', 'child_of', self.env.ref('stock.stock_location_stock').id)], ['product_id', 'qty'], ['product_id'], limit=80) ``` When no `orderby` parameter is used, the `groupby` fields are implicitly used for ordering. While this makes sense for direct calls from the web client, this implicit order might be problematic for programmatic calls (such as computed fields). Indeed, in case of grouping by product, the subquery mentioned earlier is used to sort by product name. This is costly, and in most of the cases useless. The workaround is to explicitely order by `id`, to avoid the use of the subquery. For the upcoming version, a cleaner fix should be made in order to prevent duplicated translations, and get rid of the subquery. opw-767532 * [FIX] delivery: zip code comparison Some countries, such as Canada, are using letters in their zip code. When we check if the zip code is within the accepted range, we should make sure to normalize it by making it case insensitive. opw-767866 * [FIX] web_editor: enter remove or duplicate node There is some odd behavior especially inside a editable containing newlines. For example in the sale description on an ecommerce item, lines could contain newline (it is editable from backend) but as an effect of other use case, pressing enter could have a range of unwanted side effects: - removing all the content, - duplicating the editable (should never happen, if we have one field "description_sale" we don't want to duplicate it, this has no sense) In a product name which is in the same use case, there is no newline so the problem is not apparent, and ENTER do nothing. This is the behavior we should want in every instance. If we still want a newline, we have to force it with SHIFT + ENTER key, also this is regarding field that may or could be present in the backend views, so it could also be edited in backend. This change make ENTER ignored when we are editing a node directly child of an node being edited. A second part of the issue was that dom.removeBetween (used to remove content inside a range) could remove the ancestor node that was an editable. This is not wanted. For example if we did CTRL + A inside a field with `<br />` then ENTER or pasting something, the field would be removed and not just emptied and could not be gotten back without editing the template manually. This was sometimes mitigated because if a `<br />` was at the end of an element, it would stay in this use case avoiding the issue. note: not necessary after saas-16 fixes odoo#17445 opw-751360 closes odoo#19313 * [FIX] im_livechat: unsupported locale - Set the browser to language 'Spanish (Latin America)' ('es-419') - As a public user, open a livechat session. The session doesn't open. The root cause is the creation of a mail channel which contains translatable fields (e.g. name). This attempts to create translations in the 'es_419' language. However, this locale doesn't exist in Odoo, and it triggers the constraint 'lang_fkey_res_lang'. In this specific case, there is no real reason to translate the channel name. Therefore, we simply avoid it thanks to a context key. opw-766489 * [FIX] mrp: Unbuild order with serial number When unbuilding an order with serial number, the quant with the right serial number must be found in the system either it raises an UserError explaining what's the problem. PS: A problem was found when we tried to unbuild two times the same MO. After the first unbuild, we deleted it and recreated the same one. opw:748472 * [IMP] base_address_city: Improved way as append the city_id Like the address_format could be changed by each country, this method is required to append the field city_id in the views, to all country address formats. But if We need inherit the view to add a parameter in city or city_id, WE need overwrite this method. Now, with this change, We only inherit the view, and not all the method. * [FIX] web: Don't show buttons when model has readonly access PR odoo#19314 * [FIX] tools: fix amount to text in fr and nl Correct rendering of 70 and 90 in french And manage inversion [unit]-en-[tens] in nl opw 757048 closes odoo#19297 * [FIX] website_forum: fix display of images in a post Before this commit, the images were messing up the layout of the post, with text uglily lying on their right This commit solves the issue at rendering of the post, to ensure that current posts on prods be affected in a reversible manner. Also, we want this commit to have minimal impact OPW 769721 closes odoo#19322 * [FIX] mrp_repair: default location in multi-company 1. Create a new company 2. Create a user with access to this company and with access to repair 3. Connect as the new user 4. Try to create a new repair and the stock.warehouse access error should appear opw-769160 * [FIX] http/db: handle case when `db_filter` is empty in the config file In such a case the db filtering won't be applied on an empty regex so we use the list of databases passed to `db_name` (--database) as the database list (and we also avoid to list all the databases present on the postgresql cluster) As a side effect, this patch allows to strengthen the postgresql security by preventing Odoo to list all the databases present on the cluster. * [I18N] Update translation terms from Transifex * [I18N] Update translation terms from Transifex * [FIX] calendar, web_calendar: change date - Change the date of an event through the form view => a mail is sent to the attendees. - Change the date of an event thanks to the drag and drop of an event => the mail is not sent. It is necessary to introduce a context key in the write call so we can make the distinction between the write triggered from the drag and drop and the write triggered by a recomputation of fields. Indeed, when the form view is used to change the date, `write` is called several times. We should avoid sending the same email each time. opw-766295 * [FIX] account: future payment - Create a vendor bill - Register a payment in the future (e.g. Bank payment) On the dashboard, this payment in the future is taken into account, while it shows a graph up to today. Moreover, when clicking on "Difference", the report is opened at today's date. opw-768155 * [FIX] mrp: Singleton expected in action_unbuild In some cases, the consumed quants can be more than one. In this case the check for the lot must be done just on the first consumed quant. Courtesy of @jco. opw:748472 * [FIX] report: paper format Make paper format mandatory on the company. If no paper format is defined, the PDF created may have an unexpected format. opw-770173 * [FIX] prevent calling costful methods on empty recordset Some methods are called on empty recordset causing lacking of performance. opw:769720 * [FIX] account_asset: deferred revenue account - Associate a product with a "Deferred Revenue Type" - Create a customer invoice and add the product => the account of the deferred revenue is used. - Create a SO with the same product, and generate the invoice => the account of the deferred revenue is NOT used. opw-769254 * [FIX] account: handling of text domains in _query_get 1df72cb added a stringification of the domain parameter to handle situations where an actual domain (list/tuple) is being provided rather than a string, however this causes issues when the string input is text (unicode) containing non-ascii data as in Python 2 `str()` will then raise a UnicodeEncodeError. Rather than stringify the input, bypass safe_eval when the input is already a proper domain. Closes odoo#19367 * [FIX] account_tax_python: empty code If the user somewhat removes the 'Applicable Code' text, the call to `safe_eval` will crash. opw-769267 * [FIX] purchase: missing data in tax computation - Create a purchase tax computed with Python code. - The Python code must use an attribute of the product, e.g. `product.price`. - Create a PO using the created purchase tax. It crashes, because the product (as well as the partner) is not sent to the `compute_all` method. opw-770078 * [FIX] crm: columns and tables in upper cases The module studio gives the abality to name columns or tables with upper cases. So making the SQL case sensitive avoids problems with studio. opw:770022 * [FIX] account: mark as reconciled - Create 2 companies: - Company A and check VIES VAT Check - Company B and do not check VIES VAT Check - Set current company of admin to Company A and do not allow Company B - Create a demo user on Company B and give him Adviser group in Accounting. - Log in with the demo user. - Create a Customer A as a company with: Country = Spain TIN = ES85847955H - Create a contact on Customer A: "Contact Sample" - Create a Customer invoice on "Contact Sample" partner - Through the menu Accounting/Payments, create a new payment on "Contact Sample" partner with the total amount of the invoice. - Open the menu Manual Payments and invoicing matching. The invoice and the payment should be proposed for reconciliation. Do CTRL+ENTER. An error message appears: 'The VAT number [ES85847955H] for partner [Contact Sample] either failed the VIES VAT validation check or did not respect the expected format ESA12345674.' This message should not appear as the current user is on Company B which doesn't have the flag "VIES VAT Check" checked. The issue comes from the `sudo` in `mark_as_reconciled`, which will lead to `self.env.user` to be the admin in the VAT check, and therefore `self.env.user.company_id` will be Company A. Closes odoo#19274 opw-770018 * [FIX] account_voucher: default currency - Go to Accounting > Configuration > Journals. - In the form view of a journal, click on Action > Voucher Entries - Click on Create => traceback opw-771415 * [FIX] account: mark as reconciled `last_time_entries_checked` is a commercial field, so bypassing the write won't sync it. Closes odoo#19274 opw-770018 * [FIX] purchase: PO state when validated When nothing has been invoiced and the PO is validated with nothing to invoice then the state of the PO must be "Nothing to invoice" opw:769919 * [FIX]sale_stock: copy devolution move without decreasing respective SO values -Make a return picking from a SO, and condigure the items to be refunded on SO(in the wizard) -Copy the return picking. -Validate it. Without this fix, it would just keep decreasing the delivered value on SO. opw:767429 * [CLA] signature for D4N Closes odoo#19425 * [FIX] google_calendar: do not create an event with an invalid id The id is useful to update existing events but sometimes we are getting some ids that are not accepted by Google Getting an error: odoo.addons.google_account.models.google_service: Bad google request : { "error": { "errors": [ { "domain": "global", "reason": "invalid", "message": "Invalid resource id value." } ], "code": 400, "message": "Invalid resource id value." } } Looks like existing events can have a _ in their id but new one, no longer. It seems that these events are created by outlook calendar when synchronized with Google Calendar. opw-749752 opw-751294 opw-751348 * [FIX] account_tax_python: correctly forward-port 7eb7e9f * [FIX] mass_mailing: add missing statistics index Indexing `mail_mail_id_int` is useful for locating the statistics entry that should be updated (bounced/opened/replied) * [FIX] account_extra_reports: empty partner name in sales/purchase journal Before this commit, since a partner's name can be empty, a traceback was thrown while opening the report in such a case. Now, if the partner's name is falsy we don't try to do operations on it OPW 769835 closes odoo#19400 * [FIX] website_quote: images of acquirer should be dynamic Echoes commit c255342 Before this commit, the image that was fetched for the quotes was the static one, preventing it to be changed Now, the image is dynamically fetched OPW 769701 closes odoo#19417 * [FIX] account, invoice analysis: negative amounts for in_invoice-like Before this commit, the invoice analysis report summed the amount of invoices regardless of whether they were in or out, as if it were an absolute sum. This commit corrects the behavior back to v9's, where in_invoice have the minus sign and are hence subtracted opw 769409. Was PR odoo#19413 * [FIX] account: Register a payment with no sequence for account.payment When registring a supplier invoice, if no sequence exists for code "account.payment.supplier.invoice" then it failed for the creation of the counterpart lines because a name is required to create an account move line. ps: check function "_get_liquidity_move_line_vals" for the condition. opw:767224 * [FIX] crm: expected closing Backport of commit abea8d3 opw-771843 * [FIX] purchase: multiple backorders Avoid crash if multiple backorders are found. Closes odoo#19452 opw-771732 * [FIX] payment_sips: allow to override the default atos url. Sips is generic, and others services that Atos use the same protocol. It is not user-friendly, but that allow user to use alternative service like 'Sogenactif'. In next version, we need to add field on config to specify it and the InterfaceVersion that can differ according to the provider. * [FIX] payment_sips, payment_ogone: remove call to partner_reference. This field has been removed on transaction model in commit f8a98d9. * [I18N] Update translation terms from Transifex * [I18N] Update translation terms from Transifex * [FIX] point_of_sale: format date on receipt The date printed on the receipt is not printed according to the language settings. opw-769862 * [FIX] payment: onchange partner - Go in Accounting > Sales > Payment - Fill the mandatory info, and create a "Payment Transaction" - On the form view, change the Partner - The Customer Details are empty, and saving is not possible since the country (mandatory) is not filled in Closes odoo#15708 opw-771753 * [FIX] account, website_portal_sale: _generate_and_pay_invoice in other currency When paying in other currency that the one defined in the company, it generates a payment which has to be in the currency of the transaction. Otherwise it will generate an invoice which won't be completely paid. opw:769278 * [FIX] account: due date On an invoice: - Select a partner with payment term defined => due date D1 is set - Change to a partner withour payment term defined The due date D1 is kept. opw-772063 * [FIX] bus: compatibility with Odoo's PAAS external long polling handler Only start the bus events dispatcher when needed (lazy starting). On Odoo PAAS it's never started because the platform has its own event dispatcher. Cherry-pick of rev. a2ed3d3 * [FIX] bus: compatibility with Odoo's PAAS external long polling handler Add a `peek` option in the bus event dispatcher polling in order to let an external event dispatcher fetch the notifications and their corresponding channels. Cherry-pick of rev. f2f99dc * [IMP] doc: add test classes documentation Closes odoo#13902 * [FIX] stock: procurements must be confirmed with the right company The method _procure_orderpoint_confirm in stock/procurement is calld in sudo() by run_scheduler. Even if this method receives the company as parameter, the company is not enforced for all the processes trigerred into the method. i.e. If a PO is generated by the run of the procurements the sequence used is the one of the admin's company and not the one for the given company. To enforce the company to use, we force the company into the context if it's not the same as the user's company. opw:771851 * [FIX] web: modifiers computed when x2many ready Modifiers (eg. required, readonly, ... on a field) are computed after a record has been changed. When loading a record they could be computed based on x2many in a inconsistent state. eg. on res.partner form, by defaut the email is required depending on: [('user_ids','!=', [])] but when switching from one record to another this was computed wrongly based on the difference between the two records. This change make the x2many when loading a record ready to be used as soon as it is set to solve this issue. forward-port: not needed after saas-15 thanks to framework views rewrite fix odoo#18239 opw-749483 closes odoo#18815 * [FIX] stock: UoM on return lot - Create a product with: Product UoM: kg Purchase UoM: lb(s) Tracking: By lot(s) - Purchase 100 lb(s), validate and receive picking (set lot 001) - Return the picking - Set the lot The quantity to do is 45.36 instead of 100. We make sure to convert the quant UoM (=Product UoM) into the appropriate UoM. opw-771930 * [FIX] base: prevent bin_size/binary visual defect Changing the address type of a contact in the "Contact & Addresses" tab could in some instance lead to a dead image (just visually, saving it would not change it) because the image is set to something like "data:image/png;base64,5.23 Kb" because of a combination of kanba/form x2many view, onchange, the differences of field present. In 9.0 this did not happen because the image was not a field in the form view corresponding to a contact of the kanban contacts view. In saa-15 thanks to bf26445 the image_small is different than image in the kanban view and this got us out of the issue. In saas-16 it is solved even further because new views only load missing fields. This commit just get out of the issue by preventing an update of the records field (with bin_size which caused the issue of the image) when opening the modal form view of a contact's contact. Ideally we should solve this more deeply but this is dangerous code to change (eg. removing the bin_size would solve it but this was done for a reason and could affect performances) and the effect is just visual in a very particular set of factors (if we save the form after the image is dead, the previous image reappeared). opw-765952 closes odoo#19491 * [FIX] account, point_of_sale, purchase, sale, website_sale: correctly set included tax in multi-company A product can have multiple included taxes (i.e. one by company). When computing the product price with function _fix_tax_included_price, only the taxes of the company should be considered. Otherwise it could remove all the included taxes of all companies. ps: When no company is set on the SO, all the taxes visible from the company of the user are set for the product of the line. Same behavior as in _compute_tax_id. Closes odoo#19566 opw:770464 * [FIX] hr_expense: Make expense sheet report multi currency coherent Purpose ======= Currently, if we want to print an expense report that has several currencies in its expense lines, the total amount is hidden on the report. Otherwise, it is simply summed. That could lead to confusing uses cases. Example. 1 expense line of 92 dollars. 1 expense report expressed in euros. In the report we will have - 1 line of 92 dollars - Total amount: 92 euros Which is obviously wrong. Specification ============= Always display the amount + Compute the amount in the expense report currency, by converting the amount with the rate at the day the expense has been made. * [FIX] account: Register a payment with no sequence for account.payment Fine tuning of this commit: ce2d00f opw:767224 * [I18N] Update translation terms from Transifex * [I18N] Update translation terms from Transifex * [FIX] Correct Algerian currency symbol While the currency code of the Algerian Dinar is DZD, (latin) currency symbol is DA. * [FIX] website_event_track: allow to edit tracks' info in frontend Before this commit, the track description and partner biography were not able to be edited after proposal. * [CLA] Signature for Niboo opw:774104 * [FIX] sale_mrp: Wrong call of _compute_quantity The signature of the function _compute_quantity is _compute_quantity(self, qty, to_unit, round=True, rounding_method='UP') With courtesy of @PierreFaniel Closes odoo#19682 opw:774104 * [FIX] calendar: Fix unicode reminders Before this commit, if a reminder was created and the dates being formatted contained unicode characters the whole thing would break because python + unicode is hard. Example: Japanese with Asia/Tokyo timezone and creating reminders of 1 day, see support ticket 771674 * [I18N] Update translation terms from Transifex * [FIX] website_slides: allow upload of >20MB files (as limit is 25MB) There is a double-check (on client and on server) to prevent the user to upload a >25 MB document. The client checks the actual file size while the server guesses it from the total received payload. This server guess is wrong as the extra payload is quite huge (5-10MB). Now the server checks the real file size as it should have from the beginning. * [FIX] preventing context.get('lang') The lang in the context can be None or False To avoid similar error as revealed at ede29e6, correctly retrieve the context * [FIX] web: fix translate icon position on chrome On chrome only, the translate icon was over the <input/> element but below the <input/> text... this commit fixes this by forcing relative positioning on the icon so that it is always rendered after the <input/> (which seems to solve the chrome bug). * [FIX] crm_partner_assign: safer geolocalization test Backport & adapt commits afd4b68 & 2778726 As google starts to refuse to answer to our geocode requests, we need to mock results in tests. * [FIX] base: tests, reflect unaccent behavior of 5e3de76 Since the revision 5e3de76 The `::text` is included within the `unaccent` call The expession tests have never been changed according to this change of behavior in the building of the unaccented queries. This has never been detected by runbot because you need to start the Odoo server with the option `--unaccent` and to create the database with the unaccent extension `CREATE EXTENSION unaccent` to be able to fail the former tests, and this is not the case on runbot. * [FIX] test_assetsbundle: handle readonly files If the Odoo server runs with its sources read-only for itself, this is not possible for the server to touch the files contained in the assets. In such a case, instead of touching the file, we alter the attachment checksum, to simulate a change within the modified date. However, in such a case, we can only test that the bundle is well generated again. We can no longer check the change of version and modified date, since the modified date of the files have not changed, and therefore the checksum (which is based on the files modified date, among others) neither. * [FIX] website_slides: restore drive video embedding The google 'video.google.com/get_player' URL seems to be deprecated so the URL used by website_slides had to be updated. Also when switching a slide URL from a drive URL to a youtube URL, odoo still kept thinking it was a drive URL. opw-773984 * [FIX] web: traceback on line graphs with only one data Graph tooltip destruction was fixed with commit odoo@8625242#diff-5de06eee7a2eeae066aa1348a1528fe9L100. Unfortunately, the commit supposed that the 'display_' methods always returned a graph, which is wrong. opw-773759 * [I18N] Update translation terms from Transifex * [I18N] Update translation terms from Transifex * [FIX] typo in guidelines file * [IMP] lunch: "recurrence" instead of "recurrency" in field labels, templates and comments * [FIX] calendar: validation error when moving some events back Observed via google sync, for some events being moved around during sync the stop_datetime ends up being before the start_datetime failing the sync. Not (explicitly) reading the computed fields from the old record properly recomputes them during copy. Underlying issue linked to (stored) computed fields when multiple fields are computed by the same method *and* the creation provides a subset of these fields explicitly: depending on the order in which *recompute* iterates the fields, it's possible that some of the fields provided explicitly get extracted (from the cache) before fields not-provided trigger a recomputation (and overwrite) of computed fields. In this case `recompute` iterates [start_datetime, start_date, stop_date, stop_datetime], if `start_datetime` and `stop_datetime` are provided explicitly to create, first recompute will check for `start_datetime`, find it in the cache and extract it, then it checks for `start_date`, does not find it in the cache, calls `_compute_dates` which writes all four fields, then it extracts the recomputed `start_datetime`, creating an incoherence: `start_datetime` is the one from the old event while `stop_datetime` is the one from the update/computation. This may lead to invisible corruption if the event is moved forwards (e.g. creates a multi-day event) and triggers a validation error if the event is moved backwards (stop_datetime is now before start_datetime). ping @rco-odoo multi-field computes may need some special handling with respect to invalidations & sequencing & the like (e.g. check their caching as a unit or something). OPW-771886 * [IMP] calendar, lunch: "recurrence" instead of "recurrency" in field labels, templates and comments * [FIX] l10n_nl: Missing letter 'e' Typo missing 'e'. Algemen --> Algemene. Closes odoo#19837 * [CLA] signature for danger89 Done at odoo#19837 * [CLA] add egrivero to Vauxoo's CLA Closes odoo#19779 * [FIX] web: allow to group on more groupable fields with the searchview Some fields are groupable even though they are not stored (e.g. an inherited field, by example the 'date' field of 'fleet.vehicle.log.fuel'). * [IMP] website_mail_channel: unsubscribing unsubscribed address Before this fix, if a (non-registered) user tried to unsubscribe an address *not registered*, they'd get an unsub link, click on it, and get a "Invalid or expired confirmation link." message, usually wondering what the bloody hell happened. Provide a clearer message in that case. * [I18N] add VAT es_MX translations To use RFC (Mexico) instead of NIF (Spain) Closes odoo#19142 * [FIX] calendar: don't read start_date(time) in read It seems to randomly save a bad value into the cache for star_date(time) field. For already impacted database, it can be easily fixed with a simple update. update calendar_event set start_datetime=start, stop_datetime=stop where allday = 'f'; update calendar_event set start_date=start, stop_date=stop where allday = 't'; Than can cause errors for google synchro. * [FIX] base: change position of IDR currency Currency position of IDR must before symbol Closes odoo#19178 * [CLA] add signature for tutran81 and emilyha Done at odoo#19189 * [CLA] signature for XOE and blaggacao Done at odoo#19210 * [CLA] signature for hansmi Done at odoo#19503 * [CLA] Quartile Limited signs the CCLA Done at odoo#19516 * [CLA] update the contributors list in Syleam's CLA Closes odoo#19838 * [I18N] Update translation terms from Transifex * [I18N] Update translation terms from Transifex * [CLA] signature for bazemoreb Closes odoo#19825 * [CLA] sewisoft UG signs CCLA Closes odoo#19915 * [CLA] signature for Equitania Software GmbH Closes odoo#19386 * [FIX] sale: action methods with no return values Returns apparently lost during salepocalypse, leads to errors when calling them over XML-RPC (cannot marshal None). Fixes odoo#19889 * [IMP] project: ability to xpath by page name Closes odoo#17972 * [FIX] fields: performance issue in `copy_cache` (odoo#19963) That function is called when computing related fields in onchange mode. The new implementation makes a direct access to the cache's implementation. opw-772303 * [CLA] add member to merchise CCLA Closes odoo#19568 * [FIX] mrp: states are sufficient for Update link in mo fixes odoo#19962 * [FIX] account: payment communication - Set up a journal which only accepts SEPA payments - Import a CAMT file which contains a statement containing: No "Ustrd" data A "AddtlNtryInf" description longer than 140 characters - Reconcile the bank statement A contrain is raised because the communication of the SEPA payment is longer than 140 characters. From commit https://github.com/odoo/enterprise/commit/ff84f8b7, "AddtlNtryInf" is used if "Ustrd" is empty. However, "AddtlNtryInf" and "Ustrd" do not have the same restrictions. "Ustrd" can have a maximum of 140 characters, while "AddtlNtryInf" can have a maximum of 500 characters. opw-772009 * [FIX] fields: writing on a one2many with a domain should not remove all lines Specifically, the command `(6, 0, ids)` should only unlink/detach the lines that satisfy to the field's domain. Test from odoo#18440 opw-756983 * [FIX] stock: Decimal precision on weight can not be saved odoo issue: 774361 odoo#13784 * [FIX] account: invoice analysis - Create a customer invoice of 100, validate - Refund the invoice - Go to Accounting > Reports > Business Intelligence > Invoices - A total of 200 is shown, while it should be 0. - The same occurs with a vendor bill (-200 instead of 0) The invoice lines have their sign modified at two places when used in the report: - in method `_compute_price` of `account.invoice.line` - in method `_from` of `account.invoice.report` The signs are computed with the following combination: |Invoice type|`_compute_price`|`_from`|Report sign| |------------|----------------|-------|-----------| |out_invoice | +1| +1| +1| |in_invoice | +1| -1| -1| |out_refund | -1| -1| +1| |in_refund | -1| +1| -1| This is not correct: out_invoice and out_refund should have opposite signs. Same applies to in_invoice and in_refund. opw-772479 Closes odoo#19954 * [FIX] account: invoiced amount - Create 2 companies: A is parent of B. - Demo is in Company A - Create 2 invoices for a partner: one in A, one in B (100 each) - Validate the invoices Connected as Demo, the 'Invoiced' amount on the partner form view (stat button) is 100, while clicking on it shows both invoices (total of 200). There is no need to manually add the company in the `where` clause since the `_apply_ir_rules` will take care of adding the appropriate multi-company rules. opw-772479 * [FIX] stock: package transfer shows related pickings Use case to reproduce: - Create a picking with a package - Go to the source or destination package - Click on package transfers -> It displays all the pickings This happens because the package transfer button calls the all picking tree view that display them. This commit use an action instead that will add a domain on it in order to only display the pickings that used the selected package. opw-774013 * [FIX] website_quote: quotation template with visible discount on pricelist Steps to reproduce the bug: Let's consider a product A with a price of 100 Let's consider a pricelist P with a visible discount of 50% on product A. Let's consider a quotation template Q with one line with the product A with 50% of discount. Let's create a SO with pricelist P and set the quotation template Q on it. Bug: The unit price of A on SO is 50 instead of 100 and the visible discount is 50% instead of 75%. With the fix: The unit price is 100 and the discount is 75% opw:771996 * [FIX] models: in `create`, add translations after setting x2many fields. (odoo#19348) Otherwise if a record rule is defined on a x2many field on the model, the creation will fail because ir.translation creation check access rules on the model and in this case, the x2many relation are not set yet. * [FIX] mail: handle empty recordset when computing unread message count * [FIX] res_lang: Use a non-breaking space as thousand separator in fr_FR * [FIX] account: invoiced amount - Create 2 companies: A is parent of B. - Demo is in Company A - Create 2 invoices for a partner: one in A, one in B (100 each) - Validate the invoices Connected as Demo, the 'Invoiced' amount on the partner form view (stat button) is 100, while clicking on it shows both invoices (total of 200). There is no need to manually add the company in the `where` clause since the `_apply_ir_rules` will take care of adding the appropriate multi-company rules. opw-772479 * [FIX] website_sale: improve microdata opw-774350 * [FIX] hr_expense: included tax and round globally - Set 'Tax calculation rounding method' to 'Round Globally' - Create a expense product with a tax of 20% included in the price - Create a expense of 19.99 - Submit the expense in a expense sheet - Validate the expense - Post the expense - Register a payment of 19.99 The expense is not set as paid. The source of the issue is that the tax line is created without being rounded. In the specific example, two lines are created with amounts: - 16.658 - 3.33166667 (Tax) This introduces rounding error in the computation of the matched percentage, and the expense is not set as paid. We force the rounding of the taxes since the 'Round Globally' option has no impact on an expense report. opw-773908 * [FIX] fields: performance optimization Add a shortcut in `copy_cache`, to avoid iterating on all fields. * [CLA] update jarsa's CCLA contributors list Closes odoo#19983 * [FIX] fields: prefetching of related fields (odoo#20017) Prefetching is underused when all fields are traversed one record at a time. So instead, traverse all records one field at a time. This guarantees batch prefetching/computation on every field being accessed. * [FIX] website_sale: allow to properly click on mobile checkout button Part of the button was hidden by the (invisible) right column content when using some particular themes. This is because of a messy XML structure that cannot be safely repaired in a stable version. This commit fixes the bug with CSS. Note: this may need to be backported to 9.0 and the XML structure should be improved in master.
luistriana28
pushed a commit
to Jarsa/odoo
that referenced
this pull request
Oct 17, 2017
* [FIX] account: multi-currency reconciliation Reconcile the following entries : D C Amount currency 3.655,52€ +3.872,45$ 3.436,80€ -3.872,45$ What Odoo does when I reconcile the 2 entries above using the "Reconcile" button: D C Amount currency 3.655,52€ +3.872,45$ 3.436,80€ -3.872,45$ 0€ 218,72€ -236,61$ 0€ 0€ +236,61$ What Odoo should do : D C Amount currency 3.655,52€ +3.872,45$ 3.436,80€ -3.872,45$ 0€ 218,72€ 0$ opw-687481 * [FIX] sale: Making a downpayment with a fiscal position When creating a SO line and an invoice line for a downpayment, the fiscal position set on the SO must be taken into account to map the right taxes. opw:688611 * [FIX] report_intrastat: Not allowed to delete record It's not allowed to delete record from the tree view of intrastat report. opw:692016 * [I18N] export saas-10 source terms * [I18N] update saas-10 translations by merging 9.0 and 10.0 * [FIX] account: refunding an invoice with two payment terms Step to reproduce the bug: Create a payment term with two separated due type: -Due type 1: percent , value 30, numbers of days: 0 days after the invoice date -Due type 2: Balance; value 0, Number of days 0: Last day of following month Create an invoice with the payment term Refund the invoice with the option "cancel: create refund and reconcile" or "Modify: create refund, reconcile and create a new draft invoice". Error message: "You are trying to reconcile some entries that are already reconciled!" But no payment had been received and the receivable accounts were still open. opw:694386 * [FIX] crm: Use an address that google knows of. Forward-port of 154a12501781e0c14d15e42d9a7d714807a12cae Needed for geo localisation tests. * [FIX] tools: verify path before opening * Forward-port c6b9b69f6a483e7ccebf0b823240b71a8f426fd3 * [MERGE] Forward-port of 9.0 up to e40a4baf41b3b833af37d0086a3251ae52d4ad1b More specificically, cherry-pick of e3a52a9 to e40a4ba * [FIX] mail, website_(blog/forum/slides): correctly redirect users on backend/frontend /mail/view controller is a generic controller that redirects to a view on a document either on backend or frontend depending on the module, user and some model specific conditions. However currently url computation is not always correct as you may end up on frontend view even when you are a regular user that should land on backend views. In this stable version we introduced a key in the returned action that indicates the action is a pure front-end (public) action or not. This way people are correctly redirected to the backend or the frontend when going through the controller. * [I18N] Update translation terms from Transifex * [I18N] Update translation terms from Transifex * [I18N] Update translation terms from Transifex * [FIX] hr_expense: prevent deletion of posted expense Prevent the deletion of expense or expense sheet if they are linked to a journal entry. Closes #19128 Closes #19044 opw-767549 * [FIX] hr_attendance: only if the check_out is later than the check_in You can not create a check-in at 09:00 in case you have an attendance where you checked out at 09:00. Complement of bfa55e42f9eab21c9 Closes #19226 opw-769773 * [FIX] mrp: generating raw move based on bom line should copy sequence Closes #19182 opw-769259 * [FIX] website_sale: archived products Archived products still published on the website will trigger a traceback when accessed (the link might still exist in a search engine results). opw-767740 * [FIX] website_sale_delivery: disable 'Pay Now' button - Enable several shippers - Enable Paypal acquier - Buy a product on the eCommerce, go to payment page - Change the shipper While the page is reloading, the user has time to click on the 'Pay Now' button. opw-748467 * [FIX] website_sale: product category tree not clickable in eCommerce When the last selected category or search criteria in eCommerce had no products(No product defined), the website category tree was not clickable. opw:767021 * [FIX] website_crm: fix lead creation through website_form Before this commit, a message received through the contact us form did create a Lead, but any notification was impossible (even if a user was a follower of the relevant sales team. This was because the default sales team is integrated in the values for create in models.py, which mail_thread can't see, but needs in order to notify This commit corrects the behavior which now converge with standard lead creation by adding the default sales_team earlier in the values for create OPW 762651 closes #19180 * [FIX] crm: expected closing Complement of commit 9d2f48dc7fa9d5de3e850ff7ac82d9b31cf188cd opw-724375 * [FIX] website_sale: correct images of product and variants Before this commit, when trying to edit through the website editor the product image, it was in fact the product variant that we edited. This commit corrects it and when an image is displayed, the model it comes from is reliable OPW 767539 closes #19168 * [FIX] l10n_fr: migrate tags on taxes Closes #19231 * [FIX] ir_model: Don't prefetch unnecessary fields Do not prefetch unnecessary fields during the uninstallation of modules. Previous to this commit, prefetching of unnecessary fields would cause server crashes on some modules that add a field on ir_model_fields. i.e. website_form * [FIX] ir_model: Don't prefetch unnecessary fields Do not prefetch unnecessary fields during the uninstallation of modules. Previous to this commit, prefetching of unnecessary fields would cause server crashes on some modules that add a field on ir_model_fields. i.e. website_form * [FIX] doc: mention psycogreen dependency for gevent worker * [FIX] base: remove early size limit on author field The default size limits set in base.sql are eventually superseded by the actual limits (or absence of) when the DB schema is synchronized with the Python model definitions. However the list of modules (name, authors, descriptions, dependencies) is loaded before this can happen. The length of the author field is one case that can easily crash the database bootstrap process at that point, should a module with a long author name be present in the addons path. After schema sync, that size limit is lifted entirely (although Odoo Apps does limit the max author name length to 512 at the moment, to prevent abuse). Fixes #5850 * [FIX] point_of_sale: control if a cashier is in localstorage Before this commit, we could temporarily change cashier from A to B, and back to A seamlessly just by refreshing the page. This could be a security issue for a cashier is held responsible for its sales. This commit stores the cashier in localstorage, and with the right sets of methods, corrects the issue. OPW 767827 closes #19207 * [FIX] calendar: all day event - Set the TZ as 'America/Martinique' - In the calendar (month view), click on a date D. - Fill in the topic, then click on "Edit" The date is set to D-1. Commit 09066fbbd5db makes the date consistent when the user sets an event as an all day event by taking into account the appropriate timezone. However, in the case of an event created from the month view, this TZ modification should not be applied. opw-766638 * [FIX] base_import: headerless import - Import a CSV file without header - Untick the option 'The first row contains the label of the column' An error is reported. If no header, the method `_match_headers` should return consistent object types. opw-769117 * [FIX] base_import: Specified Date Format in Import Statment is not recognized Steps to reproduce the bug: 1. Import a bank statement with the shown dateformad DDMMYYYY (without headers) 2. Specify this date format in the advanced options 3. Try to find the date column to assign. Bug: The date format is not suggested for the fields with format DDMMYYYY. opw:769118 * [FIX] web_editor, website_forum: allow to post videos on the forum The commit 8749410b1033ddec1207ce1db42d1889a0d2ea33 corrected the way the iframe was rendered to display a video in v9.0. In v10 though, the html sanitizer is a bit more severe and cleans data-src attributes, preventing the iframe to have a src This commit works around that and allows the src of the video to be saved in db OPW 761424 closes #19125 * [FIX] web: Setting ir.values for computed fields Setting ir.values for computed fields is useless as the function onchange in models.py will set to False all the computed fields with a modified dependence. opw:767942 * [FIX] stock: performance issue Commit 6a366b216b3d1 introduces a subquery when fetching translations in order to avoid fetching duplicates. On large a `ir.translation` table (~500000 records), this can cause a major performance degradation when the user is not using the English language. A typical example is a `read_group` call such as: ``` self.env['stock.quant'].with_context(lang='fr_BE').read_group([ ('location_id', 'child_of', self.env.ref('stock.stock_location_stock').id)], ['product_id', 'qty'], ['product_id'], limit=80) ``` When no `orderby` parameter is used, the `groupby` fields are implicitly used for ordering. While this makes sense for direct calls from the web client, this implicit order might be problematic for programmatic calls (such as computed fields). Indeed, in case of grouping by product, the subquery mentioned earlier is used to sort by product name. This is costly, and in most of the cases useless. The workaround is to explicitely order by `id`, to avoid the use of the subquery. For the upcoming version, a cleaner fix should be made in order to prevent duplicated translations, and get rid of the subquery. opw-767532 * [FIX] delivery: zip code comparison Some countries, such as Canada, are using letters in their zip code. When we check if the zip code is within the accepted range, we should make sure to normalize it by making it case insensitive. opw-767866 * [FIX] web_editor: enter remove or duplicate node There is some odd behavior especially inside a editable containing newlines. For example in the sale description on an ecommerce item, lines could contain newline (it is editable from backend) but as an effect of other use case, pressing enter could have a range of unwanted side effects: - removing all the content, - duplicating the editable (should never happen, if we have one field "description_sale" we don't want to duplicate it, this has no sense) In a product name which is in the same use case, there is no newline so the problem is not apparent, and ENTER do nothing. This is the behavior we should want in every instance. If we still want a newline, we have to force it with SHIFT + ENTER key, also this is regarding field that may or could be present in the backend views, so it could also be edited in backend. This change make ENTER ignored when we are editing a node directly child of an node being edited. A second part of the issue was that dom.removeBetween (used to remove content inside a range) could remove the ancestor node that was an editable. This is not wanted. For example if we did CTRL + A inside a field with `<br />` then ENTER or pasting something, the field would be removed and not just emptied and could not be gotten back without editing the template manually. This was sometimes mitigated because if a `<br />` was at the end of an element, it would stay in this use case avoiding the issue. note: not necessary after saas-16 fixes #17445 opw-751360 closes #19313 * [FIX] im_livechat: unsupported locale - Set the browser to language 'Spanish (Latin America)' ('es-419') - As a public user, open a livechat session. The session doesn't open. The root cause is the creation of a mail channel which contains translatable fields (e.g. name). This attempts to create translations in the 'es_419' language. However, this locale doesn't exist in Odoo, and it triggers the constraint 'lang_fkey_res_lang'. In this specific case, there is no real reason to translate the channel name. Therefore, we simply avoid it thanks to a context key. opw-766489 * [FIX] mrp: Unbuild order with serial number When unbuilding an order with serial number, the quant with the right serial number must be found in the system either it raises an UserError explaining what's the problem. PS: A problem was found when we tried to unbuild two times the same MO. After the first unbuild, we deleted it and recreated the same one. opw:748472 * [IMP] base_address_city: Improved way as append the city_id Like the address_format could be changed by each country, this method is required to append the field city_id in the views, to all country address formats. But if We need inherit the view to add a parameter in city or city_id, WE need overwrite this method. Now, with this change, We only inherit the view, and not all the method. * [FIX] web: Don't show buttons when model has readonly access PR #19314 * [FIX] tools: fix amount to text in fr and nl Correct rendering of 70 and 90 in french And manage inversion [unit]-en-[tens] in nl opw 757048 closes #19297 * [FIX] website_forum: fix display of images in a post Before this commit, the images were messing up the layout of the post, with text uglily lying on their right This commit solves the issue at rendering of the post, to ensure that current posts on prods be affected in a reversible manner. Also, we want this commit to have minimal impact OPW 769721 closes #19322 * [FIX] mrp_repair: default location in multi-company 1. Create a new company 2. Create a user with access to this company and with access to repair 3. Connect as the new user 4. Try to create a new repair and the stock.warehouse access error should appear opw-769160 * [FIX] http/db: handle case when `db_filter` is empty in the config file In such a case the db filtering won't be applied on an empty regex so we use the list of databases passed to `db_name` (--database) as the database list (and we also avoid to list all the databases present on the postgresql cluster) As a side effect, this patch allows to strengthen the postgresql security by preventing Odoo to list all the databases present on the cluster. * [I18N] Update translation terms from Transifex * [I18N] Update translation terms from Transifex * [FIX] calendar, web_calendar: change date - Change the date of an event through the form view => a mail is sent to the attendees. - Change the date of an event thanks to the drag and drop of an event => the mail is not sent. It is necessary to introduce a context key in the write call so we can make the distinction between the write triggered from the drag and drop and the write triggered by a recomputation of fields. Indeed, when the form view is used to change the date, `write` is called several times. We should avoid sending the same email each time. opw-766295 * [FIX] account: future payment - Create a vendor bill - Register a payment in the future (e.g. Bank payment) On the dashboard, this payment in the future is taken into account, while it shows a graph up to today. Moreover, when clicking on "Difference", the report is opened at today's date. opw-768155 * [FIX] mrp: Singleton expected in action_unbuild In some cases, the consumed quants can be more than one. In this case the check for the lot must be done just on the first consumed quant. Courtesy of @jco. opw:748472 * [FIX] report: paper format Make paper format mandatory on the company. If no paper format is defined, the PDF created may have an unexpected format. opw-770173 * [FIX] prevent calling costful methods on empty recordset Some methods are called on empty recordset causing lacking of performance. opw:769720 * [FIX] account_asset: deferred revenue account - Associate a product with a "Deferred Revenue Type" - Create a customer invoice and add the product => the account of the deferred revenue is used. - Create a SO with the same product, and generate the invoice => the account of the deferred revenue is NOT used. opw-769254 * [FIX] account: handling of text domains in _query_get 1df72cb01b9c6de0e417bdafb60b46d0276b7888 added a stringification of the domain parameter to handle situations where an actual domain (list/tuple) is being provided rather than a string, however this causes issues when the string input is text (unicode) containing non-ascii data as in Python 2 `str()` will then raise a UnicodeEncodeError. Rather than stringify the input, bypass safe_eval when the input is already a proper domain. Closes #19367 * [FIX] account_tax_python: empty code If the user somewhat removes the 'Applicable Code' text, the call to `safe_eval` will crash. opw-769267 * [FIX] purchase: missing data in tax computation - Create a purchase tax computed with Python code. - The Python code must use an attribute of the product, e.g. `product.price`. - Create a PO using the created purchase tax. It crashes, because the product (as well as the partner) is not sent to the `compute_all` method. opw-770078 * [FIX] crm: columns and tables in upper cases The module studio gives the abality to name columns or tables with upper cases. So making the SQL case sensitive avoids problems with studio. opw:770022 * [FIX] account: mark as reconciled - Create 2 companies: - Company A and check VIES VAT Check - Company B and do not check VIES VAT Check - Set current company of admin to Company A and do not allow Company B - Create a demo user on Company B and give him Adviser group in Accounting. - Log in with the demo user. - Create a Customer A as a company with: Country = Spain TIN = ES85847955H - Create a contact on Customer A: "Contact Sample" - Create a Customer invoice on "Contact Sample" partner - Through the menu Accounting/Payments, create a new payment on "Contact Sample" partner with the total amount of the invoice. - Open the menu Manual Payments and invoicing matching. The invoice and the payment should be proposed for reconciliation. Do CTRL+ENTER. An error message appears: 'The VAT number [ES85847955H] for partner [Contact Sample] either failed the VIES VAT validation check or did not respect the expected format ESA12345674.' This message should not appear as the current user is on Company B which doesn't have the flag "VIES VAT Check" checked. The issue comes from the `sudo` in `mark_as_reconciled`, which will lead to `self.env.user` to be the admin in the VAT check, and therefore `self.env.user.company_id` will be Company A. Closes #19274 opw-770018 * [FIX] account_voucher: default currency - Go to Accounting > Configuration > Journals. - In the form view of a journal, click on Action > Voucher Entries - Click on Create => traceback opw-771415 * [FIX] account: mark as reconciled `last_time_entries_checked` is a commercial field, so bypassing the write won't sync it. Closes #19274 opw-770018 * [FIX] purchase: PO state when validated When nothing has been invoiced and the PO is validated with nothing to invoice then the state of the PO must be "Nothing to invoice" opw:769919 * [FIX]sale_stock: copy devolution move without decreasing respective SO values -Make a return picking from a SO, and condigure the items to be refunded on SO(in the wizard) -Copy the return picking. -Validate it. Without this fix, it would just keep decreasing the delivered value on SO. opw:767429 * [CLA] signature for D4N Closes #19425 * [FIX] google_calendar: do not create an event with an invalid id The id is useful to update existing events but sometimes we are getting some ids that are not accepted by Google Getting an error: odoo.addons.google_account.models.google_service: Bad google request : { "error": { "errors": [ { "domain": "global", "reason": "invalid", "message": "Invalid resource id value." } ], "code": 400, "message": "Invalid resource id value." } } Looks like existing events can have a _ in their id but new one, no longer. It seems that these events are created by outlook calendar when synchronized with Google Calendar. opw-749752 opw-751294 opw-751348 * [FIX] account_tax_python: correctly forward-port 7eb7e9fd6e72764f28df19ab8803e1cceff38b4d * [FIX] mass_mailing: add missing statistics index Indexing `mail_mail_id_int` is useful for locating the statistics entry that should be updated (bounced/opened/replied) * [FIX] account_extra_reports: empty partner name in sales/purchase journal Before this commit, since a partner's name can be empty, a traceback was thrown while opening the report in such a case. Now, if the partner's name is falsy we don't try to do operations on it OPW 769835 closes #19400 * [FIX] website_quote: images of acquirer should be dynamic Echoes commit c255342e8fa1902852b17f39bedccfb698471546 Before this commit, the image that was fetched for the quotes was the static one, preventing it to be changed Now, the image is dynamically fetched OPW 769701 closes #19417 * [FIX] account, invoice analysis: negative amounts for in_invoice-like Before this commit, the invoice analysis report summed the amount of invoices regardless of whether they were in or out, as if it were an absolute sum. This commit corrects the behavior back to v9's, where in_invoice have the minus sign and are hence subtracted opw 769409. Was PR #19413 * [FIX] account: Register a payment with no sequence for account.payment When registring a supplier invoice, if no sequence exists for code "account.payment.supplier.invoice" then it failed for the creation of the counterpart lines because a name is required to create an account move line. ps: check function "_get_liquidity_move_line_vals" for the condition. opw:767224 * [FIX] crm: expected closing Backport of commit abea8d3513e0d6383088c738523425be0cc04dc7 opw-771843 * [FIX] purchase: multiple backorders Avoid crash if multiple backorders are found. Closes #19452 opw-771732 * [FIX] payment_sips: allow to override the default atos url. Sips is generic, and others services that Atos use the same protocol. It is not user-friendly, but that allow user to use alternative service like 'Sogenactif'. In next version, we need to add field on config to specify it and the InterfaceVersion that can differ according to the provider. * [FIX] payment_sips, payment_ogone: remove call to partner_reference. This field has been removed on transaction model in commit f8a98d9. * [I18N] Update translation terms from Transifex * [I18N] Update translation terms from Transifex * [FIX] point_of_sale: format date on receipt The date printed on the receipt is not printed according to the language settings. opw-769862 * [FIX] payment: onchange partner - Go in Accounting > Sales > Payment - Fill the mandatory info, and create a "Payment Transaction" - On the form view, change the Partner - The Customer Details are empty, and saving is not possible since the country (mandatory) is not filled in Closes #15708 opw-771753 * [FIX] account, website_portal_sale: _generate_and_pay_invoice in other currency When paying in other currency that the one defined in the company, it generates a payment which has to be in the currency of the transaction. Otherwise it will generate an invoice which won't be completely paid. opw:769278 * [FIX] account: due date On an invoice: - Select a partner with payment term defined => due date D1 is set - Change to a partner withour payment term defined The due date D1 is kept. opw-772063 * [FIX] bus: compatibility with Odoo's PAAS external long polling handler Only start the bus events dispatcher when needed (lazy starting). On Odoo PAAS it's never started because the platform has its own event dispatcher. Cherry-pick of rev. a2ed3d3d5bdb6025a1ba14ad557a115a86413e65 * [FIX] bus: compatibility with Odoo's PAAS external long polling handler Add a `peek` option in the bus event dispatcher polling in order to let an external event dispatcher fetch the notifications and their corresponding channels. Cherry-pick of rev. f2f99dc091947c0799b17c767a6ad923cd535025 * [IMP] doc: add test classes documentation Closes #13902 * [FIX] stock: procurements must be confirmed with the right company The method _procure_orderpoint_confirm in stock/procurement is calld in sudo() by run_scheduler. Even if this method receives the company as parameter, the company is not enforced for all the processes trigerred into the method. i.e. If a PO is generated by the run of the procurements the sequence used is the one of the admin's company and not the one for the given company. To enforce the company to use, we force the company into the context if it's not the same as the user's company. opw:771851 * [FIX] web: modifiers computed when x2many ready Modifiers (eg. required, readonly, ... on a field) are computed after a record has been changed. When loading a record they could be computed based on x2many in a inconsistent state. eg. on res.partner form, by defaut the email is required depending on: [('user_ids','!=', [])] but when switching from one record to another this was computed wrongly based on the difference between the two records. This change make the x2many when loading a record ready to be used as soon as it is set to solve this issue. forward-port: not needed after saas-15 thanks to framework views rewrite fix #18239 opw-749483 closes #18815 * [FIX] stock: UoM on return lot - Create a product with: Product UoM: kg Purchase UoM: lb(s) Tracking: By lot(s) - Purchase 100 lb(s), validate and receive picking (set lot 001) - Return the picking - Set the lot The quantity to do is 45.36 instead of 100. We make sure to convert the quant UoM (=Product UoM) into the appropriate UoM. opw-771930 * [FIX] base: prevent bin_size/binary visual defect Changing the address type of a contact in the "Contact & Addresses" tab could in some instance lead to a dead image (just visually, saving it would not change it) because the image is set to something like "data:image/png;base64,5.23 Kb" because of a combination of kanba/form x2many view, onchange, the differences of field present. In 9.0 this did not happen because the image was not a field in the form view corresponding to a contact of the kanban contacts view. In saa-15 thanks to bf26445 the image_small is different than image in the kanban view and this got us out of the issue. In saas-16 it is solved even further because new views only load missing fields. This commit just get out of the issue by preventing an update of the records field (with bin_size which caused the issue of the image) when opening the modal form view of a contact's contact. Ideally we should solve this more deeply but this is dangerous code to change (eg. removing the bin_size would solve it but this was done for a reason and could affect performances) and the effect is just visual in a very particular set of factors (if we save the form after the image is dead, the previous image reappeared). opw-765952 closes #19491 * [FIX] account, point_of_sale, purchase, sale, website_sale: correctly set included tax in multi-company A product can have multiple included taxes (i.e. one by company). When computing the product price with function _fix_tax_included_price, only the taxes of the company should be considered. Otherwise it could remove all the included taxes of all companies. ps: When no company is set on the SO, all the taxes visible from the company of the user are set for the product of the line. Same behavior as in _compute_tax_id. Closes #19566 opw:770464 * [FIX] hr_expense: Make expense sheet report multi currency coherent Purpose ======= Currently, if we want to print an expense report that has several currencies in its expense lines, the total amount is hidden on the report. Otherwise, it is simply summed. That could lead to confusing uses cases. Example. 1 expense line of 92 dollars. 1 expense report expressed in euros. In the report we will have - 1 line of 92 dollars - Total amount: 92 euros Which is obviously wrong. Specification ============= Always display the amount + Compute the amount in the expense report currency, by converting the amount with the rate at the day the expense has been made. * [FIX] account: Register a payment with no sequence for account.payment Fine tuning of this commit: ce2d00f3467e616de2e75a445bb6f2cb76d30495 opw:767224 * [I18N] Update translation terms from Transifex * [I18N] Update translation terms from Transifex * [FIX] Correct Algerian currency symbol While the currency code of the Algerian Dinar is DZD, (latin) currency symbol is DA. * [FIX] website_event_track: allow to edit tracks' info in frontend Before this commit, the track description and partner biography were not able to be edited after proposal. * [CLA] Signature for Niboo opw:774104 * [FIX] sale_mrp: Wrong call of _compute_quantity The signature of the function _compute_quantity is _compute_quantity(self, qty, to_unit, round=True, rounding_method='UP') With courtesy of @PierreFaniel Closes #19682 opw:774104 * [FIX] calendar: Fix unicode reminders Before this commit, if a reminder was created and the dates being formatted contained unicode characters the whole thing would break because python + unicode is hard. Example: Japanese with Asia/Tokyo timezone and creating reminders of 1 day, see support ticket 771674 * [I18N] Update translation terms from Transifex * [FIX] website_slides: allow upload of >20MB files (as limit is 25MB) There is a double-check (on client and on server) to prevent the user to upload a >25 MB document. The client checks the actual file size while the server guesses it from the total received payload. This server guess is wrong as the extra payload is quite huge (5-10MB). Now the server checks the real file size as it should have from the beginning. * [FIX] preventing context.get('lang') The lang in the context can be None or False To avoid similar error as revealed at ede29e6d, correctly retrieve the context * [FIX] web: fix translate icon position on chrome On chrome only, the translate icon was over the <input/> element but below the <input/> text... this commit fixes this by forcing relative positioning on the icon so that it is always rendered after the <input/> (which seems to solve the chrome bug). * [FIX] crm_partner_assign: safer geolocalization test Backport & adapt commits afd4b68acc1c60152776e0fffd99c4e567c6058f & 27787265ddcbc3383652129a69de362884a94ea6 As google starts to refuse to answer to our geocode requests, we need to mock results in tests. * [FIX] base: tests, reflect unaccent behavior of 5e3de76f363d5effb426e3a14e84a3b8e53681b4 Since the revision 5e3de76f363d5effb426e3a14e84a3b8e53681b4 The `::text` is included within the `unaccent` call The expession tests have never been changed according to this change of behavior in the building of the unaccented queries. This has never been detected by runbot because you need to start the Odoo server with the option `--unaccent` and to create the database with the unaccent extension `CREATE EXTENSION unaccent` to be able to fail the former tests, and this is not the case on runbot. * [FIX] test_assetsbundle: handle readonly files If the Odoo server runs with its sources read-only for itself, this is not possible for the server to touch the files contained in the assets. In such a case, instead of touching the file, we alter the attachment checksum, to simulate a change within the modified date. However, in such a case, we can only test that the bundle is well generated again. We can no longer check the change of version and modified date, since the modified date of the files have not changed, and therefore the checksum (which is based on the files modified date, among others) neither. * [FIX] website_slides: restore drive video embedding The google 'video.google.com/get_player' URL seems to be deprecated so the URL used by website_slides had to be updated. Also when switching a slide URL from a drive URL to a youtube URL, odoo still kept thinking it was a drive URL. opw-773984 * [FIX] web: traceback on line graphs with only one data Graph tooltip destruction was fixed with commit https://github.com/odoo/odoo/commit/86252428846607cd5f4b18cef8de49a8cd0b151a#diff-5de06eee7a2eeae066aa1348a1528fe9L100. Unfortunately, the commit supposed that the 'display_' methods always returned a graph, which is wrong. opw-773759 * [I18N] Update translation terms from Transifex * [I18N] Update translation terms from Transifex * [FIX] typo in guidelines file * [IMP] lunch: "recurrence" instead of "recurrency" in field labels, templates and comments * [FIX] calendar: validation error when moving some events back Observed via google sync, for some events being moved around during sync the stop_datetime ends up being before the start_datetime failing the sync. Not (explicitly) reading the computed fields from the old record properly recomputes them during copy. Underlying issue linked to (stored) computed fields when multiple fields are computed by the same method *and* the creation provides a subset of these fields explicitly: depending on the order in which *recompute* iterates the fields, it's possible that some of the fields provided explicitly get extracted (from the cache) before fields not-provided trigger a recomputation (and overwrite) of computed fields. In this case `recompute` iterates [start_datetime, start_date, stop_date, stop_datetime], if `start_datetime` and `stop_datetime` are provided explicitly to create, first recompute will check for `start_datetime`, find it in the cache and extract it, then it checks for `start_date`, does not find it in the cache, calls `_compute_dates` which writes all four fields, then it extracts the recomputed `start_datetime`, creating an incoherence: `start_datetime` is the one from the old event while `stop_datetime` is the one from the update/computation. This may lead to invisible corruption if the event is moved forwards (e.g. creates a multi-day event) and triggers a validation error if the event is moved backwards (stop_datetime is now before start_datetime). ping @rco-odoo multi-field computes may need some special handling with respect to invalidations & sequencing & the like (e.g. check their caching as a unit or something). OPW-771886 * [IMP] calendar, lunch: "recurrence" instead of "recurrency" in field labels, templates and comments * [FIX] l10n_nl: Missing letter 'e' Typo missing 'e'. Algemen --> Algemene. Closes #19837 * [CLA] signature for danger89 Done at #19837 * [CLA] add egrivero to Vauxoo's CLA Closes #19779 * [FIX] web: allow to group on more groupable fields with the searchview Some fields are groupable even though they are not stored (e.g. an inherited field, by example the 'date' field of 'fleet.vehicle.log.fuel'). * [IMP] website_mail_channel: unsubscribing unsubscribed address Before this fix, if a (non-registered) user tried to unsubscribe an address *not registered*, they'd get an unsub link, click on it, and get a "Invalid or expired confirmation link." message, usually wondering what the bloody hell happened. Provide a clearer message in that case. * [I18N] add VAT es_MX translations To use RFC (Mexico) instead of NIF (Spain) Closes #19142 * [FIX] calendar: don't read start_date(time) in read It seems to randomly save a bad value into the cache for star_date(time) field. For already impacted database, it can be easily fixed with a simple update. update calendar_event set start_datetime=start, stop_datetime=stop where allday = 'f'; update calendar_event set start_date=start, stop_date=stop where allday = 't'; Than can cause errors for google synchro. * [FIX] base: change position of IDR currency Currency position of IDR must before symbol Closes #19178 * [CLA] add signature for tutran81 and emilyha Done at #19189 * [CLA] signature for XOE and blaggacao Done at #19210 * [CLA] signature for hansmi Done at #19503 * [CLA] Quartile Limited signs the CCLA Done at #19516 * [CLA] update the contributors list in Syleam's CLA Closes #19838 * [I18N] Update translation terms from Transifex * [I18N] Update translation terms from Transifex * [CLA] signature for bazemoreb Closes #19825 * [CLA] sewisoft UG signs CCLA Closes #19915 * [CLA] signature for Equitania Software GmbH Closes #19386 * [FIX] sale: action methods with no return values Returns apparently lost during salepocalypse, leads to errors when calling them over XML-RPC (cannot marshal None). Fixes #19889 * [IMP] project: ability to xpath by page name Closes #17972 * [FIX] fields: performance issue in `copy_cache` (#19963) That function is called when computing related fields in onchange mode. The new implementation makes a direct access to the cache's implementation. opw-772303 * [CLA] add member to merchise CCLA Closes #19568 * [FIX] mrp: states are sufficient for Update link in mo fixes #19962 * [FIX] account: payment communication - Set up a journal which only accepts SEPA payments - Import a CAMT file which contains a statement containing: No "Ustrd" data A "AddtlNtryInf" description longer than 140 characters - Reconcile the bank statement A contrain is raised because the communication of the SEPA payment is longer than 140 characters. From commit https://github.com/odoo/enterprise/commit/ff84f8b7, "AddtlNtryInf" is used if "Ustrd" is empty. However, "AddtlNtryInf" and "Ustrd" do not have the same restrictions. "Ustrd" can have a maximum of 140 characters, while "AddtlNtryInf" can have a maximum of 500 characters. opw-772009 * [FIX] fields: writing on a one2many with a domain should not remove all lines Specifically, the command `(6, 0, ids)` should only unlink/detach the lines that satisfy to the field's domain. Test from #18440 opw-756983 * [FIX] stock: Decimal precision on weight can not be saved odoo issue: 774361 https://github.com/odoo/odoo/issues/13784 * [FIX] account: invoice analysis - Create a customer invoice of 100, validate - Refund the invoice - Go to Accounting > Reports > Business Intelligence > Invoices - A total of 200 is shown, while it should be 0. - The same occurs with a vendor bill (-200 instead of 0) The invoice lines have their sign modified at two places when used in the report: - in method `_compute_price` of `account.invoice.line` - in method `_from` of `account.invoice.report` The signs are computed with the following combination: |Invoice type|`_compute_price`|`_from`|Report sign| |------------|----------------|-------|-----------| |out_invoice | +1| +1| +1| |in_invoice | +1| -1| -1| |out_refund | -1| -1| +1| |in_refund | -1| +1| -1| This is not correct: out_invoice and out_refund should have opposite signs. Same applies to in_invoice and in_refund. opw-772479 Closes #19954 * [FIX] account: invoiced amount - Create 2 companies: A is parent of B. - Demo is in Company A - Create 2 invoices for a partner: one in A, one in B (100 each) - Validate the invoices Connected as Demo, the 'Invoiced' amount on the partner form view (stat button) is 100, while clicking on it shows both invoices (total of 200). There is no need to manually add the company in the `where` clause since the `_apply_ir_rules` will take care of adding the appropriate multi-company rules. opw-772479 * [FIX] stock: package transfer shows related pickings Use case to reproduce: - Create a picking with a package - Go to the source or destination package - Click on package transfers -> It displays all the pickings This happens because the package transfer button calls the all picking tree view that display them. This commit use an action instead that will add a domain on it in order to only display the pickings that used the selected package. opw-774013 * [FIX] website_quote: quotation template with visible discount on pricelist Steps to reproduce the bug: Let's consider a product A with a price of 100 Let's consider a pricelist P with a visible discount of 50% on product A. Let's consider a quotation template Q with one line with the product A with 50% of discount. Let's create a SO with pricelist P and set the quotation template Q on it. Bug: The unit price of A on SO is 50 instead of 100 and the visible discount is 50% instead of 75%. With the fix: The unit price is 100 and the discount is 75% opw:771996 * [FIX] models: in `create`, add translations after setting x2many fields. (#19348) Otherwise if a record rule is defined on a x2many field on the model, the creation will fail because ir.translation creation check access rules on the model and in this case, the x2many relation are not set yet. * [FIX] mail: handle empty recordset when computing unread message count * [FIX] res_lang: Use a non-breaking space as thousand separator in fr_FR * [FIX] account: invoiced amount - Create 2 companies: A is parent of B. - Demo is in Company A - Create 2 invoices for a partner: one in A, one in B (100 each) - Validate the invoices Connected as Demo, the 'Invoiced' amount on the partner form view (stat button) is 100, while clicking on it shows both invoices (total of 200). There is no need to manually add the company in the `where` clause since the `_apply_ir_rules` will take care of adding the appropriate multi-company rules. opw-772479 * [FIX] website_sale: improve microdata opw-774350 * [FIX] hr_expense: included tax and round globally - Set 'Tax calculation rounding method' to 'Round Globally' - Create a expense product with a tax of 20% included in the price - Create a expense of 19.99 - Submit the expense in a expense sheet - Validate the expense - Post the expense - Register a payment of 19.99 The expense is not set as paid. The source of the issue is that the tax line is created without being rounded. In the specific example, two lines are created with amounts: - 16.658 - 3.33166667 (Tax) This introduces rounding error in the computation of the matched percentage, and the expense is not set as paid. We force the rounding of the taxes since the 'Round Globally' option has no impact on an expense report. opw-773908 * [FIX] fields: performance optimization Add a shortcut in `copy_cache`, to avoid iterating on all fields. * [CLA] update jarsa's CCLA contributors list Closes #19983 * [FIX] fields: prefetching of related fields (#20017) Prefetching is underused when all fields are traversed one record at a time. So instead, traverse all records one field at a time. This guarantees batch prefetching/computation on every field being accessed. * [FIX] website_sale: allow to properly click on mobile checkout button Part of the button was hidden by the (invisible) right column content when using some particular themes. This is because of a messy XML structure that cannot be safely repaired in a stable version. This commit fixes the bug with CSS. Note: this may need to be backported to 9.0 and the XML structure should be improved in master. * [FIX] website_sale: Avoid compute tax for every company When a product has multiple company taxes and b2c prices is enabled, price is not computed properly and adds to the base price every company tax present. This patch filters the company set on the company so taxes are computed just for that company. * [FIX] website_portal: improve mobile layout This commit closes odoo/odoo#19267 * [I18N] web: fix bad translation The languages are not on Transifex so manually correcting the files. opw-776115 * [FIX] account, hr_expense: registering a payment for a multiple lines expense sheet When registering a payment for an expense sheet with several expense lines, only the first line of the expense sheet was linked to the account move line of the payment. So the payment was considered as partially reconciled. Now when a payment is registered for an expense sheet with several expense lines, the user is redirected to the manual reconciliation widget to link the move line of the payment to all the expense lines. In this way, the payment will be considered as fully reconciled. DO NOT FORWARD-PORT! ONLY FOR v10 opw:772505 * [FIX] ir_qweb: t-esc escape the content only if don't use widget trusts widgets who must return safe html content * [FIX] website_hr_recruitment: Avoid exponential sitemap generation Purpose ======= Currently all the possible routes for /jobs are put in the sitemap. Each time you create a job, you add at least 250 links in the sitmap (The country can be set on the route) Specification ============= This commit backports the behavior of this commit in v11.0 (https://github.com/odoo/odoo/commit/1b52b00d2aa96b9360d50a0f0960f1febb5e607e) Don't generate sitemap entries for other routes than /jobs/ * [FIX] web_calendar: Instantiate moment correctly Without instantiating the moment it will throw errors to some users. Desired behavior after PR is merged: No longer undefined errors for end users Fixes #18994 Fixes #18618 * [FIX] sale: layout sequence - Create 2 companies A & B (not linked) - Create a user Demo allowed in both companies - Create a Sale Layout Category ('TEST') - In company A, create a SO and add 'TEST' to the line - Switch to company B, create a SO and add 'TEST' to the line - In the Sale Layout Category, change the sequence of 'TEST' An access error appears. On a SO, `layout_category_sequence` is a stored related. It means that when we change the sequence of the layout, all SO are updated, including the SO to which we don't have access (in this case, the SO of company A, since our user has switched to company B). While it seems that `layout_category_sequence` was intended to be used in order to keep the historic value of the sequence, this is not the actual behavior. Indeed, the method `order_lines_layouted` uses the SO lines in their original order, which doesn't use `layout_category_sequence`. In summary, this related field causing an access error is never used. opw-774787 * [FIX] account: Field total_invoiced in res.partner doesn't include archived children * [10.0][FIX] pos_cache: unable to refresh cache in a multi-company context * [FIX] base_import: parse date and float for relational fields Use case to reproduce: -> Import a file with a float using a coma related to the model (for example the product.supplierinfo/price) It happens because the method that parse the date and float field only compare them to the main imported model. This commit complete the method by using a recursion on relational model in order to also parse the relational subfields. * [FIX] tools: correctly export the non-module translations 8ac39287 introdcude a way to export the source terms not located inside an addons module (e.g. error messages in openerp/service/models.py) 0529a7f9 fixed a bug in the get_module_from_path with addons path with similar names. The above commit introduced a regression making files located outside of an addons path to be wrongly considered as a module e.g. openerp/service/models.py used not to match any module and was considered correctly as belonging to base module After, 0529a7f9, '~/openerp/service' being different than '~/openerp/service/' the module was considered as 'models.py' (which is incorrect). Compare correctly both parent path to have a correct match Fixes # 19907 * [FIX] crm: remove duplicate filter in seach bar of pipeline report The search bar of the pipeline report page had duplicate filters. For each, there was one with "selection" widget and one without the widget. opw-771298 * [FIX] base: change width by default for apps description * [FIX] website_forum: add missing karma_answer field in form view This commit closes #19672 * [FIX] base_import_module: retrieve message from exception (#20101) * [FIX] mrp: no propagation of stock moves when destination is a component of an mo When you cancel or split a move, it will check the propagation setting to see if it needs to cancel or split the next move too. If this next move is a raw material in a manufacturing order however, it does not make sense to do this as a lot of logic is also on these moves related to bill of material lines, workorders, ... opw-770062 * [IMP] base_import: Defer parent computation after record creation/update Currently when importing files, the parent left and right are recomputed on each record creation/update, which could lead to a lot a request. This commit will defer the parent field recomputation to the end on the `load` function by recomputing the values from the MPTT and inserting directly the new values on the records. Tested on a customer instance, this will reduce the execution time when importing a thousand stock.location from 15 minutes to several seconds. * [FIX] odoo: Temporal patch to`support` spanish Latin America (es_419) lang (#248) It was decided to do this patch when talking to @moylop260 FIX https://github.com/odoo/odoo/issues/18363 - [ ] TODO- Remove this ugly fix after issue https://github.com/odoo/odoo/issues/19920 be solved Odoo Ticket 775568 Also reverted commit [FIX] im_livechat: unsupported locale https://github.com/odoo/odoo/commit/6879409723184ed360043b7a2da11fcd725e5c4f * [FIX] account: Duplicating journal entries When duplictating a Journal Entry that has been created from a new payment (accounting/purchases/payments/create), the new copy of the Journal Entry also duplicated the already existent relationship (link) to the payment, causing possible future conflicts in functionalities like reports, payments, reconciliations, among others. opw:775151 * [FIX] account: fix complex tax computations (multiple price included taxes, etc.) Suppose the correct computation: seq | amount | incl | incl_base | base | amount ---------------------------------------------------- 1 | 10% | t | t | 100.0 | 10.0 2 | 10% | | | 110.0 | 11.0 3 | 10% | t | | 110.0 | 11.0 4 | 10% | | | 110.0 | 11.0 5 | 10% | t | | 110.0 | 11.0 ---------------------------------------------------- with an initial amount of 132. Without this commit, the base amount was computed by: 132 / 1.1 / 1.1 = 109.09 instead of: 132 / 1.2 = 110.0 see task: https://www.odoo.com/web#id=34471&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720 Was PR #18275 * [FIX] account_invoice: Wrong default uom The UOM by default should be the purchase UOM opw-775105 * [FIX] stock: procurement generated by scheduler truncate datetime When purchase order are created from a scheduler they always have the same hours even if they were created at different time. Also the procurement order that generate the purchase order line have the same problem. It happens because the transformation from datetime to string use a date format and thus truncate the DEFAULT_SERVER_TIME_FORMAT This commit use a datetime format instead the dateformat. opw-775833 * [FIX] mrp: Unbuild multi serial number components Use case to reproduce: - Create a product with a BOM that use at least twice the same component tracked by SN - Build this product with SN 'A' and SN 'B' - Unbuild it -> Constraint error on duplicate SN It happens because the unbuild order will create only one stock.move.lots for SN A with a quantity of 2. This commit create a stock.move.lots by quant used, for example if the MO used 2 quants with a qty of 1 and one with lot 'A' and the other with lot 'B'. It will create 2 stock.move.lots with lots 'A' and 'B'. Still a know issue: If the user try to unbuild twice the same MO it will reuse the same unbuilded componenets than the first unbuild order. * [FIX] web_editor: do not break <p/> when pasting a <p/> element This fixes a bug when pasting text in a paragraph, it was always creating a new paragraph for no reason. * [FIX] web_editor: do not break labels' texts into <p/> When editing the content of a <label/> which has XML branding (first DOM element which is editable in its hierarchy), a <p/> element was added inside. This behavior is there to automatically add <p/> elements in empty editable <div/> / <section/> elements on edition. This should however not apply on <label/> elements. * [FIX] web_editor: properly save multi-edited elements When an element is placed multiple times in a page, it is saved only once. Unfortunately, when a view was divided in multiple editable parts (XML branding), only one of those parts were saved. * [FIX] crm: mark(lost|won) routes calls removed crm.lead functions (opw: 773907) crm.lead#case_mark_won and case_mark_lost have been removed in 1414b3e56eb784cef935cdbf33c85a62ebcb1b0b merged in saas-12 but later commit 0b87f7662892d60e03f1016e4150d53aef979a06 reference those function and was merged in saas-11 This fix also improved logging in the controllers in order to log unexpected exception. * [FIX] website_slides: avoid NULL characters in text field OPW 772560 * [FIX] point_of_sale: rounding error when create picking When a return picking is created from a POS order, the methods check that the value rounded to the unit of measure is not null. The problem is that a rounding is passed to the function 'float_is_zero' in the parameter precision_digits instead of precision rounding. This bug has been introduced in rev: https://github.com/odoo/odoo/commit/61304087e7f48c677837dabdc8f1f8aeb18fb52e opw-771282 * [FIX] sale: pricelist price base When setting a pricelist to show the public price discount, it ignored the pricelist item's base field (if not 'Other Pricelist') and set it by default on the lst_price instead. This did not work when you based your discount on the standard_price (= cost price) with public price discount. Now it does. opw: 775275 * [FIX] hr_timesheet_sheet: set domain on action to see timesheet only Analytic lines should not be included when showing the timesheet line of a given sheet. A domain is thus needed on the action. opw-772517 * [FIX] hr_timesheet_attendance: only include timesheet in attendance/timesheet report Report mixed analytic line and timesheet, but only timesheet should be included. Since a timesheet is an analytic line with a project, this fix do the job. opw-772517 * [FIX] account: fix balance = 0 in dashboard In some case, user set a currency on the journal which is the same as the company currency. In that case, the field taken was amount_currency which should not be the case. OPW 775123 * [FIX] mass_mailing: background snippet option outlook compatible (#20137) Origin of the fix: the snippet background image did not change the background image. This was due to commit a14f89c which wraps the snippet's content into a table for outlook display compliance This issue is fixed here, with the modificaion of the background snippet option. OPW 772442 * [FIX] stock: use method return In case MRP is used with kits (phantom BOMs), the method `action_explode` is called through the override of `action_confirm`. However, `action_explode` modifies the recordset by deleting the move with the original product since it is not relevant anymore. We take this use case into account by reusing the return value of `action_confirm`. opw-772644 * [FIX] crm: stage auto-probability not taken into account when creating an opportunity from kanban view (#20209) 1. on CRM module -> Select Pipeline -> Create a column (e.g. 'Test') 2. Edit this Stage 3. Toggle on the field 'Change Probability Automatically' 4. Set a stage probability (e.g. 50%) 5. Create an opportunity on this stage, using the quick create widget of the kanban view => The probability of the newly created opportunity is not 50%, as it should be expected It takes the default_probability, using a default_stage_id, which is the 'New' column having initially a probability of 10%. The stage_id is correctly assigned to the newly created opportunity thanks to environment variable 'default_stage_id', but not the probability. We solved this bug by updating the probability of the opportunity, after creating the object. We cannot do it at the same time, because BaseObject.create parse the missing fields in an order where probability comes before stage_id. This fix is limited to the quick creation of opportunity by means of its name only. In particular, it doesn't overwrite the input of the user in the form view. opw-772310 * [FIX] Fix canadian province state_ca_NL name
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the issue/feature this PR addresses: SAVE and DISCARD buttons still appear in form in popup window even if model is set to read only access.
Current behavior before PR: SAVE and DISCARD buttons still appear in form in popup window even if model is set to read only access.
Desired behavior after PR is merged: The buttons are hidden if the model has read only access.
Fixes #17051 (courtesy of celm1990)
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr