Daily updates from Odoo
Navigate
Branch
Friday, October 25, 2019
31 changes
New functionality added to Odoo
Work Order tablet users now see a clear warning when they select an expired lot. This helps operators avoid using expired materials and supports better production quality control.
Original PR description
Adds a message aside the `lot_id` field of workorder in tablet view to inform the user when he/she wants to use an expired lot. Task #1938656
Enhancements to existing features
Accounting users can no longer create draft journal entries dated in closed fiscal years, preventing work that could never be posted. When duplicating an older entry from a closed year, the system now moves it to the first available open accounting date while preserving the original history in the chatter.
Original PR description
Task 2076182 It makes no sense to allow creating draft entries for closed periods as it will never be allowed to post them! Directly warn the user seems smart. At the same time, we should be able to duplicate entries from closed fiscal years without any errors. So, if we duplicate an entry from a closed period, we should replace the accounting date by the first "open" accounting date. In order to keep the audit trails, we should keep the history in the chatter. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Improves how users manage product expiration dates by making expiration options visible only when relevant, allowing dates to be set during receipt, and showing key dates on inventory lists and lot/serial number labels. This helps warehouse teams identify expired stock sooner and reduces mistakes when receiving or validating tracked products.
Original PR description
:black_medium_small_square: Adds boolean on `product.product` to user can use expiration dates on tracked product (otherwise the date section will be invisible). :black_medium_small_square: Changes label and tooltip of `product.product` and `stock.production.lot` date fields. :black_medium_small_square: Displays `removal_date` on quant list view. :black_medium_small_square: Can set the `life_date` on receipt. :black_medium_small_square: Displays *Best before* date and *Expiration Date* on LN/SN pdf.
Accounting users can now specify which journals are allowed for each account, helping ensure specialized accounts such as IFRS accounts are only used in the correct journal. The system also prevents journal configuration changes that would make existing accounting entries invalid under the new rules.
Original PR description
Task 2074811
Allow to specify on an account the journals that can be allowed
Example of use case :
I create an IFRS journal and some specific IFRS accounts
I want to make sure that the accounts I configured for the IFRS are only use to make entries in the IFRS journal
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prCourse cards now use their own description field instead of always relying on the course's short description. This keeps card text in sync by default while letting staff customize what appears on course cards without changing the main short description.
Original PR description
The Channel model contains the two following fields: `description` and `description_html`. The former is a short plain-text description that can be filled in the creation form. The latter is a long html-formatted description. When a course has no short description, a 75-character description is automatically created from the long description to put inside the short description. OPW: 2026165 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Website administrators can now choose separate header background and text colors for the live chat button and the chat window. This helps businesses better match live chat with their brand and create a more consistent visitor experience.
Original PR description
This commit allow users to set up different colors for both the live chat button for website visitors and the chat window once the live chat button has been clicked. For both, the header background color and the text color can be set up. Task #2030383
The SMS unsubscribe option has been moved to the Options tab so related settings are grouped together more clearly. This also removes extra blank space in SMS template forms, making the screens cleaner and easier to use.
Original PR description
Move the field ``sms_allow_unsubscribe`` to the ``options`` tab Task #2088305
Businesses can now choose to create one asset per item quantity on supplier bills for selected asset accounts. This makes asset tracking more accurate when buying multiple identical items, such as five laptops generating five separate assets instead of one combined asset.
Original PR description
Add a setting allowing to manage items. Newly created assets for this kind of account (with the checkbox checked) will generate 1 asset per quantity set on the bill. e.g. If the bill line quantity is 5 then Odoo will generate 5 assets (instead of 1 global asset) task : https://www.odoo.com/web?#id=2081662&action=327&model=project.task&view_type=form&menu_id=4720
A new asset-account setting lets businesses track purchased items individually instead of grouping them into one asset. When enabled, a bill line with a quantity greater than one will automatically create one asset per item, improving asset tracking and depreciation management.
Original PR description
Add a setting allowing to manage items. Newly created assets for this kind of account (with the checkbox checked) will generate 1 asset per quantity set on the bill. e.g. If the bill line quantity is 5 then Odoo will generate 5 assets (instead of 1 global asset) task : https://www.odoo.com/web?#id=2081662&action=327&model=project.task&view_type=form&menu_id=4720
Code cleanup and technical improvements
Inventory transfer validation has been reorganized so multiple transfers can be checked and completed together more consistently. This prepares the system for clearer confirmation steps around immediate transfers and backorders, reducing friction in warehouse workflows and making future enhancements easier.
Original PR description
preliminary work for - task 1938108 (which is adding a pre action done wizard) - task 1938656 (which is adding another pre action done wizard) - task 2069646 (which will rework all pre action done wizard to select to pickings to apply)
Miscellaneous changes
Add new CUIT number to Responsable Inscripto demo company different from Monotributo company. This help to make test in demo environment of Argentinian Localization re using this two partners. ### Description of the issue/feature this PR addresses: Add a new CUIT number to Responsable Inscripto Company (partner) ### Current behavior before PR: Both Monotributo and Responsable Inscripto company's partner has the same CUIT number ### Desired behavior after PR is merged: Now each
Original PR description
Add new CUIT number to Responsable Inscripto demo company different from Monotributo company. This help to make test in demo environment of Argentinian Localization re using this two partners. ### Description of the issue/feature this PR addresses: Add a new CUIT number to Responsable Inscripto Company (partner) ### Current behavior before PR: Both Monotributo and Responsable Inscripto company's partner has the same CUIT number ### Desired behavior after PR is merged: Now each company's partner has a different CUIT number. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39379
* web_editor Commit https://github.com/odoo/odoo/commit/7e2b0ebe7996c9fa35f75949b7fc8cd5a58d7c36 broke the website JS loading as it added a dependency to a lazy loaded JS module which was not even always lazy loaded. A test so that this does not happens anymore will be made in another commit. Related to task-2092386 Forward-Port-Of: odoo/odoo#39385
Original PR description
* web_editor Commit https://github.com/odoo/odoo/commit/7e2b0ebe7996c9fa35f75949b7fc8cd5a58d7c36 broke the website JS loading as it added a dependency to a lazy loaded JS module which was not even always lazy loaded. A test so that this does not happens anymore will be made in another commit. Related to task-2092386 Forward-Port-Of: odoo/odoo#39385
Another split of #30944 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39384 Forward-Port-Of: odoo/odoo#39139
Original PR description
Another split of #30944 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39384 Forward-Port-Of: odoo/odoo#39139
### Description of the issue/feature this PR addresses: Fix misspelling error that throw error when environment company need to be found because not force company in context ### Current behavior before PR: `self.env.company_id.id` does not exist ### Desired behavior after PR is merged: `self.env.company.id` does exist and do not throw errors -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39292
Original PR description
### Description of the issue/feature this PR addresses: Fix misspelling error that throw error when environment company need to be found because not force company in context ### Current behavior before PR: `self.env.company_id.id` does not exist ### Desired behavior after PR is merged: `self.env.company.id` does exist and do not throw errors -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39292
In e-commerce module, when you have a free product and 2 delivery methods: - Free - Any delivery method with a fixed price When you confirm your cart, you have to choose a payment method. If you select "free delivery" and "wire transfer": Before this commit: - You get an internal server error After this commit: - You are redirected to the wire transfer confirmation OPW-2083778 Description of the issue/feature this PR addresses: Current behavior before PR:
Original PR description
In e-commerce module, when you have a free product and 2 delivery
methods:
- Free
- Any delivery method with a fixed price
When you confirm your cart, you have to choose a payment method.
If you select "free delivery" and "wire transfer":
Before this commit:
- You get an internal server error
After this commit:
- You are redirected to the wire transfer confirmation
OPW-2083778
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#39304Description of the issue/feature this PR addresses: The state of the MR is not copied when duplicating the record. Fixes https://github.com/odoo/odoo/issues/38558 Current behavior before PR: The state of a maintenance request is copied when you duplicate the maintenance request, which shouldn't be the case. If you would duplicate a maintenance it would directly be in repaired, scrap or some other state Desired behavior after PR is merged: The state of the maintenance request starts in the
Original PR description
Description of the issue/feature this PR addresses: The state of the MR is not copied when duplicating the record. Fixes https://github.com/odoo/odoo/issues/38558 Current behavior before PR: The state of a maintenance request is copied when you duplicate the maintenance request, which shouldn't be the case. If you would duplicate a maintenance it would directly be in repaired, scrap or some other state Desired behavior after PR is merged: The state of the maintenance request starts in the default state of a new record without taking over the previous maintenance request its state. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39277 Forward-Port-Of: odoo/odoo#38573
In the leaves app, you can create an allocation request where you can select a leave type. Before this commit: - The leaves type order is not correct when you have a lot of them. You should have your remaining leaves on the top of the list. When you click on search more, the order is correct. After this commit: - The leaves type order is correct. Odony's comment: Leave types are reordered after each search(), based on some context-dependent, non-stored co
Original PR description
In the leaves app, you can create an allocation request where you can select a leave type. Before this commit: - The leaves type order is not correct when you have a lot of them. You should have your…
In the leaves app, you can create an allocation request where you can
select a leave type.
Before this commit:
- The leaves type order is not correct when you have a lot of them.
You should have your remaining leaves on the top of the list.
When you click on search more, the order is correct.
After this commit:
- The leaves type order is correct.
Odony's comment: Leave types are reordered after each search(), based on
some context-dependent, non-stored conditions. The problem is that the
initial search() applies the given *limit*, so the "post-sort" will only
sort a limited number of random result from the initial search,
rather than all types matching the domain.
If you have more than 7 leaves types matching the domain, you have a
chance that the m2o auto-completion on the leave request form will not
suggest the correct leave types, because the post-sort will not even
receive them. So you may not see a leave type for which you have
remaining leaves!
OPW-2089593
Co-authored-by: odony <odo@odoo.com>
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#39308Forward-Port-Of: odoo/odoo#39270
Original PR description
Forward-Port-Of: odoo/odoo#39270
Ref: https://en.wikipedia.org/wiki/Tanzanian_shilling opw-[2091857](https://www.odoo.com/web?debug#id=2091857&action=333&active_id=49&model=project.task&view_type=form&menu_id=4720) Forward-Port-Of: odoo/odoo#39253
Original PR description
Ref: https://en.wikipedia.org/wiki/Tanzanian_shilling opw-[2091857](https://www.odoo.com/web?debug#id=2091857&action=333&active_id=49&model=project.task&view_type=form&menu_id=4720) Forward-Port-Of: odoo/odoo#39253
Steps to reproduce the bug: - Go to Settings > Technical > IAP account > - Remove the access token - Go to Contact - Try to create a company called 'Proximus' and click on the autocomplete Bug: A traceback was raised because the IAP account token was not set. opw:2087607 Forward-Port-Of: odoo/odoo#38946
Original PR description
Steps to reproduce the bug: - Go to Settings > Technical > IAP account > - Remove the access token - Go to Contact - Try to create a company called 'Proximus' and click on the autocomplete Bug: A traceback was raised because the IAP account token was not set. opw:2087607 Forward-Port-Of: odoo/odoo#38946
- Install MRP and Accounting - Create a user with only 'Billing' as access right - Create a customer invoice - Add a line, type some text (e.g. 'desk'), then click on 'Search more...' An `AccessError` is raised. It arises because of this: https://github.com/odoo/odoo/blob/e2d7cf7898704c82f25556b0b0edb87c05ec5903/addons/mrp/models/product.py#L112 The user has no access to `mrp.bom`, leading to the error. Since the user has access to stock moves and pickings (thanks to the ru
Original PR description
- Install MRP and Accounting - Create a user with only 'Billing' as access right - Create a customer invoice - Add a line, type some text (e.g. 'desk'), then click on 'Search more...' An…
- Install MRP and Accounting - Create a user with only 'Billing' as access right - Create a customer invoice - Add a line, type some text (e.g. 'desk'), then click on 'Search more...' An `AccessError` is raised. It arises because of this: https://github.com/odoo/odoo/blob/e2d7cf7898704c82f25556b0b0edb87c05ec5903/addons/mrp/models/product.py#L112 The user has no access to `mrp.bom`, leading to the error. Since the user has access to stock moves and pickings (thanks to the rules `access_stock_picking_invoicing_payments` and `access_stock_move_invoicing_payments`, it makes sense to give him access to `mrp.bom` and `mrp.bom.line`. Moreover, adding a `sudo` on the mentioned line could cause issues since `_bom_find` performs a search which is company dependent. opw-2089556 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39331
*: website Inherited colorpicker were not used due to the context missing the website_id and the method call being used instead of call_kw. task-2092386 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39282
Original PR description
*: website Inherited colorpicker were not used due to the context missing the website_id and the method call being used instead of call_kw. task-2092386 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39282
The cart popover did not have any max length, now it will not go out of the page if there is a lot of products in it. Shop page link and popover use the same route which make a write on db to recompute coupon lines. Can lead to concurent updates if unlucky on timing. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39244 Forward-Port-Of: odoo/odoo#37141
Original PR description
The cart popover did not have any max length, now it will not go out of the page if there is a lot of products in it. Shop page link and popover use the same route which make a write on db to recompute coupon lines. Can lead to concurent updates if unlucky on timing. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39244 Forward-Port-Of: odoo/odoo#37141
Forward-Port-Of: odoo/odoo#39090
Original PR description
Forward-Port-Of: odoo/odoo#39090
Before, en_US was almost always the default in case of 'no language'. Now, that should be superseded by lang=None; yet still, en_US plays the role of source language. In a multilanguage database where en_US was not installed, writing a translation with lang=None would crash. This could prevent module installation. A test is added to cover that case. In the case where we write a record with lang=None, the source is the same as the record; in that case the cache contains the value fo
Original PR description
Before, en_US was almost always the default in case of 'no language'. Now, that should be superseded by lang=None; yet still, en_US plays the role of source language. In a multilanguage database where en_US was not installed, writing a translation with lang=None would crash. This could prevent module installation. A test is added to cover that case. In the case where we write a record with lang=None, the source is the same as the record; in that case the cache contains the value for the field.name under the context keys en_US and None, so we need to invalidate the cache to avoid getting back the old value. co-authored with mart-e opw 2088487 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39040
In studio app, you can edit a form view to add new smarts buttons. Before this commit: - An exception is raised when you add the button or access a form view with a broken smart button. After this commit: - The behavior works correctly, you can add smart buttons and access to form views with smart buttons. OPW-2093334 Forward-Port-Of: odoo/enterprise#6426
Original PR description
In studio app, you can edit a form view to add new smarts buttons.
Before this commit:
- An exception is raised when you add the button or access a form
view with a broken smart button.
After this commit:
- The behavior works correctly, you can add smart buttons and
access to form views with smart buttons.
OPW-2093334
Forward-Port-Of: odoo/enterprise#6426Since the products don't have a default company anymore and following the refactor of the documents settings system, there was no fallback for the company on which the settings were obtained. This commit fixes this issue and allows `product.products` and `product.templates` to generate documents based on the current company if they don't have a `company_id`. Task: #2092537 Forward-Port-Of: odoo/enterprise#6406
Original PR description
Since the products don't have a default company anymore and following the refactor of the documents settings system, there was no fallback for the company on which the settings were obtained. This commit fixes this issue and allows `product.products` and `product.templates` to generate documents based on the current company if they don't have a `company_id`. Task: #2092537 Forward-Port-Of: odoo/enterprise#6406
- Add a related field to a form view It crashes. Despite a warning, some random dude changed the behavior by introducing the following commit in a stable version: https://github.com/odoo/odoo/commit/9595dd06a1d349b2fb84969374d57c32a5faab74 From this commit, a creation now raises an error on non-existing fields, which is exactly what happens in this case. We filter out the fields before creation. Note that we could have done it here: https://github.com/odoo/enterprise/blob/
Original PR description
- Add a related field to a form view It crashes. Despite a warning, some random dude changed the behavior by introducing the following commit in a stable version: https://github.com/odoo/odoo/commit/9595dd06a1d349b2fb84969374d57c32a5faab74 From this commit, a creation now raises an error on non-existing fields, which is exactly what happens in this case. We filter out the fields before creation. Note that we could have done it here: https://github.com/odoo/enterprise/blob/b1442740fa73e001232314f076c6b9e00cbef01f/web_studio/static/src/js/views/view_editor_manager.js#L384 However, the fix is more generic at the Python level. opw-2093196 Forward-Port-Of: odoo/enterprise#6417
Was silently failing in 11.0 and 12.0, crashing in Odoo 13.0. Forward-Port-Of: odoo/enterprise#6364
Original PR description
Was silently failing in 11.0 and 12.0, crashing in Odoo 13.0. Forward-Port-Of: odoo/enterprise#6364
When exporting field data from studio, the dependencies between fields is considered in order to sort the fields in the resulting file to ensure a correct importation. However, monetary fields and their implicit dependency on a res.currency many2one field is not taken into account. This can lead to an incorrect order of the fields in the exportation file and therefore errors in the posterior importation of the data. opw 2070660 Co-authored-by: @rco-odoo Forward-Port-Of: odoo/enterpr
Original PR description
When exporting field data from studio, the dependencies between fields is considered in order to sort the fields in the resulting file to ensure a correct importation. However, monetary fields and their implicit dependency on a res.currency many2one field is not taken into account. This can lead to an incorrect order of the fields in the exportation file and therefore errors in the posterior importation of the data. opw 2070660 Co-authored-by: @rco-odoo Forward-Port-Of: odoo/enterprise#6257
Invalid fields cause an installation crash. opw-2093465 Forward-Port-Of: odoo/enterprise#6418
Original PR description
Invalid fields cause an installation crash. opw-2093465 Forward-Port-Of: odoo/enterprise#6418