Tuesday, June 27, 2023
37 changes · master
Enhancements to existing features
Point of Sale model components now have direct access to the shared application environment, making related customizations and integrations easier to maintain. This internal improvement supports smoother development across POS payments, loyalty, restaurant, sales, and payment terminal features without changing the user experience directly.
Original PR description
*: pos_adyen, pos_loyalty, pos_restaurant, pos_sale, pos_six, pos_stripe At the moment, the `pos` models don't have access to the `env` variable. This makes using `env` inside a model rather awkward. This PR makes it so all the pos models have access directly to `env` Task: 3358456 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Point of Sale-related modules now let their internal models access the environment context directly. This simplifies future maintenance and reduces awkward workarounds across connected POS features, with little direct impact on day-to-day users.
Original PR description
*: pos_iot, pos_l10n_se, pos_preparation_display, l10n_de_pos_cert, l10n_de_pos_res_cert At the moment, the `pos` models don't have access to the `env` variable. This makes using `env` inside a model rather awkward. This PR makes it so all the pos models have access directly to `env` Task: 3358456
The Documents app now shows a clear message when a workspace has no email alias configured, helping users understand the setup state. Several dialog labels and the spreadsheet creation window were refined to make actions and search easier to understand and use.
Original PR description
**The following improvements are done:** -When no alias is configured for the workspace, we will display a message "No alias configured". -The string of the cancel button is changed in various pop-ups. -The size of searchbar in the create spreadsheet dialog is reduced and shifted towards right. -The title of the create spreadsheet dialog is changed Task-3235745
Sales teams can now see changes to the referrer field in the order history chatter. This improves visibility when referrer information is added or updated on sales, rental, or subscription orders.
Original PR description
task-3289738
Rental report pages now show the related sales order reference in the navigation breadcrumb instead of a generic technical model name and ID. This makes it easier for users to recognize which rental order they are viewing and reduces confusion when moving through reports.
Original PR description
before this commit, rec_name was not given for the sale.rental.report model and thus in the breadcrump it is shown as model_name, id Before:  After:  after this commit, order_id is set as the rec_name for the model and order reference will be shown in the breadcrump.
Payslip worked-day descriptions now show the actual public holiday names instead of the generic work entry type. If several public holidays share the same type, their names are listed together, making payslips clearer for employees and payroll teams.
Original PR description
In this commit we have shown public holiday name in payslip description instead of work entry type name. When there are multiple public holidays of the same work entry type, it will be separated by a comma. task-3174829
Miscellaneous changes
Latams need more fields for VAT and Odoo Milk broke how these fields are displayed. opw-3382698 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#126351
Original PR description
Latams need more fields for VAT and Odoo Milk broke how these fields are displayed. opw-3382698 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#126351
This traceback raises when user not selected `Employee` and only selecting `Check In` and `Check Out`, while creating a new attendance. To reproduce the issue: 1) Install `hr_attendance` 2) Open Attendance and create a new record 3) Give values to only `Check In` and `Check Out` Error: ``` AttributeError: 'bool' object has no attribute 'upper' File "odoo/http.py", line 2123, in __call__ response = request._serve_db() File "odoo/http.py", line 1699, in _serve_db retur
Original PR description
This traceback raises when user not selected `Employee` and only selecting `Check In` and `Check Out`, while creating a new attendance. To reproduce the issue: 1) Install `hr_attendance` 2) Open…
This traceback raises when user not selected `Employee` and only selecting `Check In` and `Check Out`, while creating a new attendance.
To reproduce the issue:
1) Install `hr_attendance`
2) Open Attendance and create a new record
3) Give values to only `Check In` and `Check Out`
Error:
```
AttributeError: 'bool' object has no attribute 'upper'
File "odoo/http.py", line 2123, in __call__
response = request._serve_db()
File "odoo/http.py", line 1699, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1726, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1927, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 190, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 716, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 30, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 26, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "odoo/models.py", line 6695, in onchange
todo = [
File "odoo/models.py", line 6698, in <listcomp>
if name not in done and snapshot0.has_changed(name)
File "odoo/models.py", line 6495, in has_changed
return self[name] != record[name]
File "odoo/models.py", line 6122, in __getitem__
return self._fields[key].__get__(self, type(self))
File "odoo/fields.py", line 1155, in __get__
self.recompute(record)
File "odoo/fields.py", line 1365, in recompute
apply_except_missing(self.compute_value, recs)
File "odoo/fields.py", line 1338, in apply_except_missing
func(records)
File "odoo/fields.py", line 1387, in compute_value
records._compute_field_value(self)
File "odoo/models.py", line 4486, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 99, in determine
return needle(*args)
File "addons/hr_attendance/models/hr_attendance.py", line 60, in _compute_worked_hours
tz = timezone(calendar.tz)
File "__init__.py", line 183, in timezone
if zone.upper() == 'UTC':
```
On `_compute_worked_hours` method `calendar` variable is getting value from `employee_id` and that calendar timezone is used to get timezone.
https://github.com/odoo/odoo/blob/937d207028ab9bc1d3d332dc6dfe25f0de045026/addons/hr_attendance/models/hr_attendance.py#L50-L60
Therefore in the above use case, when triggering the compute method, because of `calendar` is depending on `employee_id` and when employee is not selected, it will leads to the above traceback.
Sentry-4274226351
Forward-Port-Of: odoo/odoo#126369Adding base translation files for l10n_sa_edi as well as arabic translation Description of the issue/feature this PR addresses: Adding arabic translation to the l10n_sa_edi Current behavior before PR: No translations Desired behavior after PR is merged: Adding arabic translation to the l10n_sa_edi --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#125201
Original PR description
Adding base translation files for l10n_sa_edi as well as arabic translation Description of the issue/feature this PR addresses: Adding arabic translation to the l10n_sa_edi Current behavior before PR: No translations Desired behavior after PR is merged: Adding arabic translation to the l10n_sa_edi --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#125201
Description of the issue/feature this PR addresses: sign CLA Current behavior before PR: CLA not signed Desired behavior after PR is merged: CLA is signed --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#126109
Original PR description
Description of the issue/feature this PR addresses: sign CLA Current behavior before PR: CLA not signed Desired behavior after PR is merged: CLA is signed --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#126109
Currently, it's not possible to check the 'Peppol Bis 3' option on the journals of Italian companies, since Italy is not present in our mapping `COUNTRY_EAS`. The EAS for Italian companies may be the codice fiscal (code: 0210) or the VAT number (code: 0211). See https://peppol.agid.gov.it/en/news/expiration-validity-codes/ Use the VAT number by default, and add it in our mapping such that the option now appears for Italian companies. opw-3346572 Forward-Port-Of: odoo/odoo#126383 F
Original PR description
Currently, it's not possible to check the 'Peppol Bis 3' option on the journals of Italian companies, since Italy is not present in our mapping `COUNTRY_EAS`. The EAS for Italian companies may be the codice fiscal (code: 0210) or the VAT number (code: 0211). See https://peppol.agid.gov.it/en/news/expiration-validity-codes/ Use the VAT number by default, and add it in our mapping such that the option now appears for Italian companies. opw-3346572 Forward-Port-Of: odoo/odoo#126383 Forward-Port-Of: odoo/odoo#126168
When parsing an email containing an xml attachment, the `email` python module will decode the base64 attachment using the charset or ascii if the charset is missing. In some cases, the payload is in UTF-8 but the charset is omitted. This results in replacement characters for the non ASCII characters. The solution is to force the charset to UTF-8, since it is a superset of ASCII that should not be a problem. NB1: Omitting the charset for text/xml is not recommended. See the RFC (sec
Original PR description
When parsing an email containing an xml attachment, the `email` python module will decode the base64 attachment using the charset or ascii if the charset is missing. In some cases, the payload is in UTF-8 but the charset is omitted. This results in replacement characters for the non ASCII characters. The solution is to force the charset to UTF-8, since it is a superset of ASCII that should not be a problem. NB1: Omitting the charset for text/xml is not recommended. See the RFC (section 6.4): https://www.ietf.org/rfc/rfc2376.txt opw-3144519 Forward-Port-Of: odoo/odoo#126418 Forward-Port-Of: odoo/odoo#125628
Before this commit: When importing `stock.quant` with two lines with the same product and different counted quantities, only the last line is taken. After this commit: Each line creates a `stock.quant`, even if a similar Quant exists. The records will be merged at a later time by `_merge_quants`. Steps to reproduce: 1. Create a storable product 2. Go to Inventory > Operations > Inventory Adjustments 3. Create a file with two lines with the same product, and different counted quantitie
Original PR description
Before this commit: When importing `stock.quant` with two lines with the same product and different counted quantities, only the last line is taken. After this commit: Each line creates a `stock.quant`, even if a similar Quant exists. The records will be merged at a later time by `_merge_quants`. Steps to reproduce: 1. Create a storable product 2. Go to Inventory > Operations > Inventory Adjustments 3. Create a file with two lines with the same product, and different counted quantities 5. Favourites > Import Records & upload the file OPW-3340017 Forward-Port-Of: odoo/odoo#125802 Forward-Port-Of: odoo/odoo#124185
sign to the odoo CLA --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#126038
Original PR description
sign to the odoo CLA --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#126038
Since [this other commit], initializing the color picker could trigger a traceback. The traceback was due to the fact that for users to be able to drag/move the color picker as they wished across different frames, we needed access to the document of all the frames on the page. Unfortunately, if one of these frames was not of the same origin, a traceback was displayed. This commit corrects how we collect documents from frames on the page, by only taking those whose document we have the right to s
Original PR description
Since [this other commit], initializing the color picker could trigger a traceback. The traceback was due to the fact that for users to be able to drag/move the color picker as they wished across…
Since [this other commit], initializing the color picker could trigger a traceback. The traceback was due to the fact that for users to be able to drag/move the color picker as they wished across different frames, we needed access to the document of all the frames on the page. Unfortunately, if one of these frames was not of the same origin, a traceback was displayed. This commit corrects how we collect documents from frames on the page, by only taking those whose document we have the right to see (which do not raise a cross origin error). I didn't succeed to reproduce the bug locally, but I got it on the runbot with theme Nursery / Kiddo by dropping the block banner on the page, the error appears because the block contains a vimeo video. In fact, you just need to have embedded content (youtube / vimeo / ... video for example) start edit mode, click on the block containing the video and the error is displayed. [this other commit]: https://github.com/odoo/odoo/commit/63bf363d302fe9f93a824fa6f1ff3bbe21f98088 runbot-22573 Forward-Port-Of: odoo/odoo#126391 Forward-Port-Of: odoo/odoo#126240
Steps to reproduce: =================== - Go to Quality -> Quality Control -> Quality Points. - Create new Quality point, using `Receipt` operation, control per operation. - Go to Inventory -> Operations -> Receipt -> New - Add whatever product with a quantity. Issue: ====== The validate button is displayed even when the quality checks are not done. Added back the `show_validate` condition as this field's compute is overridden in `quality_control` to also check whether there are
Original PR description
Steps to reproduce: =================== - Go to Quality -> Quality Control -> Quality Points. - Create new Quality point, using `Receipt` operation, control per operation. - Go to Inventory -> Operations -> Receipt -> New - Add whatever product with a quantity. Issue: ====== The validate button is displayed even when the quality checks are not done. Added back the `show_validate` condition as this field's compute is overridden in `quality_control` to also check whether there are still quality checks to perform. task: 3376811 Forward-Port-Of: odoo/odoo#125700
We would like: (for facets with a domain) - some nice color change on facet_label when hovering the facet itself (for a comparison facet) (available in graph after having selected a date filter) - the facet_label should have some background color - the facet_label should not receive the role "button" Forward-Port-Of: odoo/odoo#122848
Original PR description
We would like: (for facets with a domain) - some nice color change on facet_label when hovering the facet itself (for a comparison facet) (available in graph after having selected a date filter) - the facet_label should have some background color - the facet_label should not receive the role "button" Forward-Port-Of: odoo/odoo#122848
The menus added in the server data which are used in mockServer did not reflect a realistic menu configuration. This was brought to light when trying to fix the addition of links to ir.ui.menu inside a spreadsheet. See task 2821480 Related ENT pr: https://github.com/odoo/enterprise/pull/42885 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 w
Original PR description
The menus added in the server data which are used in mockServer did not reflect a realistic menu configuration. This was brought to light when trying to fix the addition of links to ir.ui.menu inside a spreadsheet. See task 2821480 Related ENT pr: https://github.com/odoo/enterprise/pull/42885 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#126106 Forward-Port-Of: odoo/odoo#126050
If the user change a location type of the 'Production' from inventory locations and installs the 'MRP' module, the traceback will appear. Steps to produce: - Install Stock module. - Inventory > Configuration > Settings > enable the Storage Locations. - Inventory > Configuration > Locations > Remove the filter 'Internal'. - Open the 'Production' location and change the Location Type to 'View'. - Now install the 'Manufacturing' module. Error: A traceback appears: 'ParseError: while parsing
Original PR description
If the user change a location type of the 'Production' from inventory locations and installs the 'MRP' module, the traceback will appear. Steps to produce: - Install Stock module. - Inventory >…
If the user change a location type of the 'Production' from inventory locations and installs the 'MRP' module, the traceback will appear.
Steps to produce:
- Install Stock module.
- Inventory > Configuration > Settings > enable the Storage Locations.
- Inventory > Configuration > Locations > Remove the filter 'Internal'.
- Open the 'Production' location and change the Location Type to 'View'.
- Now install the 'Manufacturing' module. Error: A traceback appears: 'ParseError: while parsing /home/odoo/src/odoo/saas-16.2/addons/mrp/data/mrp_data.xml:17, somewhere inside'
At the time of installing the MRP module, it will search for the production location using the location type as the production here - https://github.com/odoo/odoo/blob/f65a9bffe2cbc03b2efc969dc205c9ba01ee9ab5/addons/mrp/models/stock_warehouse.py#L65 If the production location is not found it will raise an userError. In this commit, the production location is created based on the company if not found. It will lead to the above traceback.
sentry-4215564628
Traceback:
```
UserError: لم يتم العثور على أي موقع إنتاج.
File "odoo/tools/convert.py", line 550, in _tag_root
f(rec)
File "odoo/tools/convert.py", line 451, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "odoo/models.py", line 4455, in _load_records
data['record']._load_records_write(data['values'])
File "odoo/models.py", line 4386, in _load_records_write
self.write(values)
File "addons/mrp/models/stock_warehouse.py", line 282, in write
return super(StockWarehouse, self).write(vals)
File "addons/stock/models/stock_warehouse.py", line 163, in write
warehouses._create_missing_locations(vals)
File "addons/stock/models/stock_warehouse.py", line 667, in _create_missing_locations
warehouse.write(missing_location)
File "addons/mrp/models/stock_warehouse.py", line 282, in write
return super(StockWarehouse, self).write(vals)
File "addons/stock/models/stock_warehouse.py", line 206, in write
global_rules = warehouse._get_global_route_rules_values()
File "addons/mrp/models/stock_warehouse.py", line 108, in _get_global_route_rules_values
rules = super(StockWarehouse, self)._get_global_route_rules_values()
File "addons/stock/models/stock_warehouse.py", line 396, in _get_global_route_rules_values
rule = self.get_rules_dict()[self.id][self.delivery_steps]
File "addons/mrp/models/stock_warehouse.py", line 47, in get_rules_dict
production_location_id = self._get_production_location()
File "addons/mrp/models/stock_warehouse.py", line 68, in _get_production_location
raise UserError(_('Can\'t find any production location.'))
ParseError: while parsing /home/odoo/src/odoo/saas-16.2/addons/mrp/data/mrp_data.xml:17, somewhere inside
<record id="stock.warehouse0" model="stock.warehouse">
<field name="manufacture_to_resupply" eval="True"/>
</record>
File "odoo/http.py", line 2115, in __call__
response = request._serve_db()
File "odoo/http.py", line 1698, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1725, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1922, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 715, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 28, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 24, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "home/odoo/src/custom/trial/saas_trial/models/module.py", line 80, in button_immediate_install
return super(IrModuleModule, self).button_immediate_install()
File "<decorator-gen-73>", line 2, in button_immediate_install
File "odoo/addons/base/models/ir_module.py", line 76, in check_and_log
return method(self, *args, **kwargs)
File "odoo/addons/base/models/ir_module.py", line 472, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "home/odoo/src/custom/trial/saas_trial/models/module.py", line 52, in _button_immediate_function
res = super(IrModuleModule, self)._button_immediate_function(function)
File "odoo/addons/base/models/ir_module.py", line 596, in _button_immediate_function
registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "<decorator-gen-14>", line 2, in new
File "odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "odoo/modules/registry.py", line 90, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "odoo/modules/loading.py", line 481, in load_modules
processed_modules += load_marked_modules(env, graph,
File "odoo/modules/loading.py", line 365, in load_marked_modules
loaded, processed = load_module_graph(
File "odoo/modules/loading.py", line 226, in load_module_graph
load_data(env, idref, mode, kind='data', package=package)
File "odoo/modules/loading.py", line 71, in load_data
tools.convert_file(env, package.name, filename, idref, mode, noupdate, kind)
File "odoo/tools/convert.py", line 613, in convert_file
convert_xml_import(env, module, fp, idref, mode, noupdate)
File "odoo/tools/convert.py", line 679, in convert_xml_import
obj.parse(doc.getroot())
File "odoo/tools/convert.py", line 599, in parse
self._tag_root(de)
File "odoo/tools/convert.py", line 550, in _tag_root
f(rec)
File "odoo/tools/convert.py", line 563, in _tag_root
raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
```
Forward-Port-Of: odoo/odoo#125143This commit ensures that the unsplash beacon calls home when an unsplash image appears on a page. To achieve this it patches the RPC call when the test URL contains the test name as parameter. The patch cancels the actual beacon call to avoid polluting data during the test, but marks the image as having had its beacon message sent. The test then simply checks if this marker appears on the image. task-3360109 Forward-Port-Of: odoo/odoo#126413 Forward-Port-Of: odoo/odoo#125028
Original PR description
This commit ensures that the unsplash beacon calls home when an unsplash image appears on a page. To achieve this it patches the RPC call when the test URL contains the test name as parameter. The patch cancels the actual beacon call to avoid polluting data during the test, but marks the image as having had its beacon message sent. The test then simply checks if this marker appears on the image. task-3360109 Forward-Port-Of: odoo/odoo#126413 Forward-Port-Of: odoo/odoo#125028
on this case: 1. Reorderning rule with company 1 and related product and product template is shared mean no company selected and related product template contain multiple bom with different company. so using this line bom = (product.variant_bom_ids or product.bom_ids)[:1] from this : `product.bom_ids` as product is inherits by template, it's tried to read all the bom of different company and different variant too for same template. and that will raise multi-company issue. so I think that sh
Original PR description
on this case: 1. Reorderning rule with company 1 and related product and product template is shared mean no company selected and related product template contain multiple bom with different company. so using this line bom = (product.variant_bom_ids or product.bom_ids)[:1] from this : `product.bom_ids` as product is inherits by template, it's tried to read all the bom of different company and different variant too for same template. and that will raise multi-company issue. so I think that should be same company as related stock rules company. see : https://github.com/odoo/odoo/commit/6825c440d54e38ebee13a5c184aec1a40586de0d this was generated during upgrade database. 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#122895
When we have a long course name or we update the font size to something big (24 px) for example the course name and the progress bar will overflow outside its container. Steps to reproduce the error : 1- go to one of the courses and update it's name to make it a bit long 2- click on one of it's content and got website preview 3- you can see that the progress bar is outside the container 4- if not : click edit -> theme -> change font size to 24 px 5- You can see now clearly that there is over
Original PR description
When we have a long course name or we update the font size to something big (24 px) for example the course name and the progress bar will overflow outside its container. Steps to reproduce the error : 1- go to one of the courses and update it's name to make it a bit long 2- click on one of it's content and got website preview 3- you can see that the progress bar is outside the container 4- if not : click edit -> theme -> change font size to 24 px 5- You can see now clearly that there is overflow from the container. The origin of the problem was because the container has fixed height equals 80px Before the fix :  After the fix :  opw-3191888 Forward-Port-Of: odoo/odoo#126200 Forward-Port-Of: odoo/odoo#122859
task-3337932 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#126196 Forward-Port-Of: odoo/odoo#122444
Original PR description
task-3337932 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#126196 Forward-Port-Of: odoo/odoo#122444
**Description of the issue/feature this PR addresses:** - create a custom view by UI to display pos.order.line - select some pos.order lines (related to paid orders) - click on unlink **Current behavior before PR:** - the pos.order.lines are deleted. **Desired behavior after PR is merged:** - A blocking error is displayed. **Note** : this patch is a "should have" for Odoo Point of Sale, and a "must have" if french certification is installed. (otherwise, the certification cha
Original PR description
**Description of the issue/feature this PR addresses:** - create a custom view by UI to display pos.order.line - select some pos.order lines (related to paid orders) - click on unlink **Current behavior before PR:** - the pos.order.lines are deleted. **Desired behavior after PR is merged:** - A blocking error is displayed. **Note** : this patch is a "should have" for Odoo Point of Sale, and a "must have" if french certification is installed. (otherwise, the certification chain is broken). CC : @rafaelbn, @carmenbianca closes: https://github.com/OCA/pos/pull/989 Forward-Port-Of: odoo/odoo#119777
The issue happens when we have a really small percentage of tasks with a certain state and it’s very difficult to filter them by clicking on the respective color in the progress bar. To fix this issue there was defined a minimum of 5% for each color and make sure that in the end the sum of values is exactly 100%. To solve this issue, it was necessary to set a minimum of 5% for the width for every non-empty bar, also it was defined a max-width of 100 - (# non-empty bars -1)*5 % because we also
Original PR description
The issue happens when we have a really small percentage of tasks with a certain state and it’s very difficult to filter them by clicking on the respective color in the progress bar. To fix this issue there was defined a minimum of 5% for each color and make sure that in the end the sum of values is exactly 100%. To solve this issue, it was necessary to set a minimum of 5% for the width for every non-empty bar, also it was defined a max-width of 100 - (# non-empty bars -1)*5 % because we also have to ensure the sum of 100% at the end. How to reproduce: 1. Go to Project -> tasks -> create a huge number of tasks in the same project (you can do it using interactive shell) 2. Change one of these tasks to another state (eg: done) OPW - 3299363 Forward-Port-Of: odoo/odoo#126483 Forward-Port-Of: odoo/odoo#124677
In safari, copying an appointment share link to the clipboard raises an error Steps to reproduce: 1. Install Appointments 2. Open Calendar 3. Click on the "Share Availabilities" button 4. Drag and create a box in the calendar 5. Click on "Get Share Link" 6. An error is thrown Solution: Use a timeout to copy the text to the clipboard opw-3354871 Forward-Port-Of: odoo/enterprise#42919
Original PR description
In safari, copying an appointment share link to the clipboard raises an error Steps to reproduce: 1. Install Appointments 2. Open Calendar 3. Click on the "Share Availabilities" button 4. Drag and create a box in the calendar 5. Click on "Get Share Link" 6. An error is thrown Solution: Use a timeout to copy the text to the clipboard opw-3354871 Forward-Port-Of: odoo/enterprise#42919
Steps to reproduce ==================== - Create a product with BOM having a kit as component - add component to kit's BOM - add product to Master Production Schedule - change forecasted demand of product - [BUG] indirect demand of the kit's component is not updated This occurs because the kit is not found in the initial _bom_find(self.product_id) since it doesn't contain the kit but its components. This commit fixes this issue by finding the kit bom afterwards. It also adds a test
Original PR description
Steps to reproduce ==================== - Create a product with BOM having a kit as component - add component to kit's BOM - add product to Master Production Schedule - change forecasted demand of product - [BUG] indirect demand of the kit's component is not updated This occurs because the kit is not found in the initial _bom_find(self.product_id) since it doesn't contain the kit but its components. This commit fixes this issue by finding the kit bom afterwards. It also adds a test for this case. task - 3335587 Forward-Port-Of: odoo/enterprise#41617
Steps to reproduce: - Create a default analytic distribution model for company A specific to a Product A - Create a default analytic distribution model for company B specific to a Product A - Activate Inter-Company Transactions - Synchronize invoices/bills for bith companies - With Company A, create an invoice with Product A -> analytic is set - Confirm the invoice Issue: - The bill in company B does not have an analytic distribution set for the line Cause: During the preparation of
Original PR description
Steps to reproduce: - Create a default analytic distribution model for company A specific to a Product A - Create a default analytic distribution model for company B specific to a Product A -…
Steps to reproduce: - Create a default analytic distribution model for company A specific to a Product A - Create a default analytic distribution model for company B specific to a Product A - Activate Inter-Company Transactions - Synchronize invoices/bills for bith companies - With Company A, create an invoice with Product A -> analytic is set - Confirm the invoice Issue: - The bill in company B does not have an analytic distribution set for the line Cause: During the preparation of the date for the invoice line: https://github.com/odoo/enterprise/blob/33c03e5f62cad2f23b1f6b9a36384ae3330f3a21/account_inter_company_rules/models/account_move.py#L109-L114 the analytic distribution defined for the bill in company B is an analytic distribution specific for Company A Therefore no analytic distribution will be set for theh Bill in Company B since the analytic distribution is not available for Company B. Solution: We keep both analytic accounts if available in Company B. That is: - Default analytic distribution defined for company B (if exists) - Analytic Distribution set for the line in Company A's document which can be set automatically or manually (if exists and available in Company B) opw-3128794 Forward-Port-Of: odoo/enterprise#42809 Forward-Port-Of: odoo/enterprise#40296
The column labels in the "Rte IVA" withholding report. It seems that the labels for "Total Operación" and "Retenido Consignado" have been switched mistakenly. We need to fix this so that "Retenido Consignado" is correctly labeled as "Total Operación," and vice versa. This mix-up is causing confusion among users because the values in the rows don't match the labels in the columns. Additionally, there's an error in the percentage column where it currently displays "0.15." However, the expected
Original PR description
The column labels in the "Rte IVA" withholding report. It seems that the labels for "Total Operación" and "Retenido Consignado" have been switched mistakenly. We need to fix this so that "Retenido Consignado" is correctly labeled as "Total Operación," and vice versa. This mix-up is causing confusion among users because the values in the rows don't match the labels in the columns. Additionally, there's an error in the percentage column where it currently displays "0.15." However, the expected value should be "15" to reflect a 15% withholding over the 19% VAT. Forward-Port-Of: odoo/enterprise#42745
Purpose: When you try to edit a menu in the prompt dropdown, new selection is not taken into account even if you clear the first menu. Specification: This issue is solved by taking into account the id of selected menu instead of props menuId. Also, `updateWidget` is triggered only if nextProps.menuId exists to ensure that dropdown still opens when the input is cleared. Task ID : 2821480 Forward-Port-Of: odoo/enterprise#43016 Forward-Port-Of: odoo/enterprise#41948
Original PR description
Purpose: When you try to edit a menu in the prompt dropdown, new selection is not taken into account even if you clear the first menu. Specification: This issue is solved by taking into account the id of selected menu instead of props menuId. Also, `updateWidget` is triggered only if nextProps.menuId exists to ensure that dropdown still opens when the input is cleared. Task ID : 2821480 Forward-Port-Of: odoo/enterprise#43016 Forward-Port-Of: odoo/enterprise#41948
If applied, this commit will prevent the TypeError when the user removes the date from Period field. Steps to reproduce the error: - Go to Payroll > Payslips > All Payslips > Create new Employee Payslips - Remove date from date_from field > Save. - Error will be generated. See- ```TypeError: unsupported operand type(s) for +: 'bool' and 'relativedelta' File "odoo/http.py", line 2114, in __call__ response = request._serve_db() File "odoo/http.py", line 1699, in _serve_db
Original PR description
If applied, this commit will prevent the TypeError when the user removes the date from Period field. Steps to reproduce the error: - Go to Payroll > Payslips > All Payslips > Create new Employee…
If applied, this commit will prevent the TypeError when the user removes the date from Period field.
Steps to reproduce the error:
- Go to Payroll > Payslips > All Payslips > Create new Employee Payslips
- Remove date from date_from field > Save.
- Error will be generated.
See-
```TypeError: unsupported operand type(s) for +: 'bool' and 'relativedelta'
File "odoo/http.py", line 2114, in __call__
response = request._serve_db()
File "odoo/http.py", line 1699, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1726, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1921, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 190, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 716, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 30, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 26, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "odoo/models.py", line 6670, in onchange
record.modified(todo)
File "odoo/models.py", line 6263, in modified
for field, records, create in tocompute:
File "odoo/models.py", line 6315, in _modified_triggers
records = self[invf.name]
File "odoo/models.py", line 6122, in __getitem__
return self._fields[key].__get__(self, type(self))
File "odoo/fields.py", line 4301, in __get__
return super().__get__(records, owner)
File "odoo/fields.py", line 2801, in __get__
return super().__get__(records, owner)
File "odoo/fields.py", line 1155, in __get__
self.recompute(record)
File "odoo/fields.py", line 1365, in recompute
apply_except_missing(self.compute_value, recs)
File "odoo/fields.py", line 1338, in apply_except_missing
func(records)
File "odoo/fields.py", line 1387, in compute_value
records._compute_field_value(self)
File "addons/mail/models/mail_thread.py", line 396, in _compute_field_value
return super()._compute_field_value(field)
File "odoo/models.py", line 4486, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 99, in determine
return needle(*args)
File "home/odoo/src/enterprise/saas-16.3/hr_payroll/models/hr_payslip.py", line 930, in _compute_worked_days_line_ids
generate_to = max(p.date_to for p in self)
File "home/odoo/src/enterprise/saas-16.3/hr_payroll/models/hr_payslip.py", line 930, in <genexpr>
generate_to = max(p.date_to for p in self)
File "odoo/fields.py", line 1155, in __get__
self.recompute(record)
File "odoo/fields.py", line 1365, in recompute
apply_except_missing(self.compute_value, recs)
File "odoo/fields.py", line 1338, in apply_except_missing
func(records)
File "odoo/fields.py", line 1387, in compute_value
records._compute_field_value(self)
File "addons/mail/models/mail_thread.py", line 396, in _compute_field_value
return super()._compute_field_value(field)
File "odoo/models.py", line 4486, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 99, in determine
return needle(*args)
File "home/odoo/src/enterprise/saas-16.3/hr_payroll/models/hr_payslip.py", line 212, in _compute_date_to
payslip.date_to = payslip.date_from + payslip._get_schedule_timedelta()
```
sentry-4228660224
Forward-Port-Of: odoo/enterprise#43141
Forward-Port-Of: odoo/enterprise#41998ValueError IMAP4.error `command CLOSE illegal in state AUTH, only allowed in states SELECTED` while evaluating`model._fetch_mails()` This error arises when attempting to close an IMAP server for incoming mail using the `imap_server.close()` method. Occasionally, it encounters difficulty in establishing communication with the remote server to properly close the IMAP server, so it throws an Error. see stack trace: ``` IMAP4.error: command CLOSE illegal in state AUTH, only allowed in st
Original PR description
ValueError IMAP4.error `command CLOSE illegal in state AUTH, only allowed in states SELECTED` while evaluating`model._fetch_mails()` This error arises when attempting to close an IMAP server for…
ValueError IMAP4.error `command CLOSE illegal in state AUTH, only allowed in states SELECTED` while evaluating`model._fetch_mails()`
This error arises when attempting to close an IMAP server for incoming mail using the `imap_server.close()` method.
Occasionally, it encounters difficulty in establishing communication with the remote server to properly close the IMAP server, so it throws an Error.
see stack trace:
```
IMAP4.error: command CLOSE illegal in state AUTH, only allowed in states SELECTED
File "odoo/tools/safe_eval.py", line 362, in safe_eval
return unsafe_eval(c, globals_dict, locals_dict)
File "ir.actions.server(126,)", line 1, in <module>
File "addons/mail/models/fetchmail.py", line 186, in _fetch_mails
return self.search([('state', '=', 'done'), ('server_type', '!=', 'local')]).fetch_mail()
File "home/odoo/src/enterprise/saas-16.2/l10n_cl_edi/models/fetchmail_server.py", line 109, in fetch_mail
imap_server.close()
File "imaplib.py", line 475, in close
typ, dat = self._simple_command('CLOSE')
File "imaplib.py", line 1230, in _simple_command
return self._command_complete(name, self._command(name, *args))
File "imaplib.py", line 968, in _command
raise self.error("command %s illegal in state %s, "
ValueError: <class 'imaplib.IMAP4.error'>: "command CLOSE illegal in state AUTH, only allowed in states SELECTED" while evaluating
'model._fetch_mails()'
File "odoo/addons/base/models/ir_cron.py", line 373, in _callback
self.env['ir.actions.server'].browse(server_action_id).run()
File "odoo/addons/base/models/ir_actions.py", line 688, in run
res = runner(run_self, eval_context=eval_context)
File "addons/website/models/ir_actions_server.py", line 61, in _run_action_code_multi
res = super(ServerAction, self)._run_action_code_multi(eval_context)
File "odoo/addons/base/models/ir_actions.py", line 558, in _run_action_code_multi
safe_eval(self.code.strip(), eval_context, mode="exec", nocopy=True, filename=str(self)) # nocopy allows to return 'action'
File "odoo/tools/safe_eval.py", line 376, in safe_eval
raise ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr))
```
After applying this commit will fix this issue.
sentry - 4186714092
Forward-Port-Of: odoo/enterprise#41259This commit follows df093649c016944744723ba4a58b974eafc3f1e4 which already tried to make that test more stable. Only it was partial as when we collapse/show a node in the report editor sidebar, the active element of the bootstrap collapse framework does the reciprocal action. That is: - have a node active - activate another one - the active node hides AND the activated one shows. This commit accounts for this by waiting for both events, as they are asynchronous in the bootstrap frame
Original PR description
This commit follows df093649c016944744723ba4a58b974eafc3f1e4 which already tried to make that test more stable. Only it was partial as when we collapse/show a node in the report editor sidebar, the active element of the bootstrap collapse framework does the reciprocal action. That is: - have a node active - activate another one - the active node hides AND the activated one shows. This commit accounts for this by waiting for both events, as they are asynchronous in the bootstrap framework. runbot-error-20792 Forward-Port-Of: odoo/enterprise#43139
…destroyed Steps to reproduce ================== - Go to Invoices - Open studio - Toggle "Show invisible" - Enable "Set Approval Rules" on the Confirm button - Enable "Set Approval Rules" on the Register Payment button opw-3304506 Forward-Port-Of: odoo/enterprise#43163 Forward-Port-Of: odoo/enterprise#42475
Original PR description
…destroyed Steps to reproduce ================== - Go to Invoices - Open studio - Toggle "Show invisible" - Enable "Set Approval Rules" on the Confirm button - Enable "Set Approval Rules" on the Register Payment button opw-3304506 Forward-Port-Of: odoo/enterprise#43163 Forward-Port-Of: odoo/enterprise#42475
If a user prints a 'Yearly Salary by Head' or 'Yearly Salary by Employee' report without selecting a Layout. Traceback will appear To reproduce the issue: - Make debugger mode ON. - Go to Settings > General Settings >Companies and make sure that layout is not selected. - Install the 'l10n_in_hr_payroll' Module. - Go to the Employees > Reporting > 'Yearly Salary by Head' or Yearly Salary by Employee' report. - Click on 'Add a line' and add an employee, Then after clicking on the 'PRINT
Original PR description
If a user prints a 'Yearly Salary by Head' or 'Yearly Salary by Employee' report without selecting a Layout. Traceback will appear To reproduce the issue: - Make debugger mode ON. - Go to Settings >…
If a user prints a 'Yearly Salary by Head' or 'Yearly Salary by Employee' report without selecting a Layout. Traceback will appear
To reproduce the issue:
- Make debugger mode ON.
- Go to Settings > General Settings >Companies and make sure that layout is not selected.
- Install the 'l10n_in_hr_payroll' Module.
- Go to the Employees > Reporting > 'Yearly Salary by Head' or Yearly Salary by Employee' report.
- Click on 'Add a line' and add an employee, Then after clicking on the 'PRINT' button 'Configure your document layout ' is open.
- Now click on the 'SAVE' button.
Traceback on sentry:
```
KeyError: 'start_date'
File "<1749>", line 454, in template_1749
File "<1749>", line 436, in template_1749_content
File "<1749>", line 419, in template_1749_t_call_0
File "<1749>", line 37, in template_1749_t_call_1
File "odoo/addons/base/models/ir_qweb.py", line 2365, in _get_field
field = record._fields[field_name]
QWebException: Error while render the template
KeyError: 'start_date'
Template: l10n_in_hr_payroll.report_hrsalarybymonth
Path: /t/t/t/t/div/div/p/u[1]/span
Node: <span t-field="o.start_date"/>
File "addons/web/controllers/report.py", line 120, in report_download
response = self.report_routes(reportname, converter=converter, context=context, **data)
File "odoo/http.py", line 716, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/report.py", line 42, in report_routes
pdf = report.with_context(context)._render_qweb_pdf(reportname, docids, data=data)[0]
File "addons/account/models/ir_actions_report.py", line 57, in _render_qweb_pdf
return super()._render_qweb_pdf(report_ref, res_ids=res_ids, data=data)
File "odoo/addons/base/models/ir_actions_report.py", line 810, in _render_qweb_pdf
collected_streams = self._render_qweb_pdf_prepare_streams(report_ref, data, res_ids=res_ids)
File "addons/account_edi/models/ir_actions_report.py", line 14, in _render_qweb_pdf_prepare_streams
collected_streams = super()._render_qweb_pdf_prepare_streams(report_ref, data, res_ids=res_ids)
File "addons/account/models/ir_actions_report.py", line 20, in _render_qweb_pdf_prepare_streams
return super()._render_qweb_pdf_prepare_streams(report_ref, data, res_ids=res_ids)
File "odoo/addons/base/models/ir_actions_report.py", line 711, in _render_qweb_pdf_prepare_streams
html = self.with_context(**additional_context)._render_qweb_html(report_ref, res_ids_wo_stream, data=data)[0]
File "odoo/addons/base/models/ir_actions_report.py", line 887, in _render_qweb_html
return self._render_template(report.report_name, data), 'html'
File "odoo/addons/base/models/ir_actions_report.py", line 626, in _render_template
return view_obj._render_template(template, values).encode()
File "addons/website/models/ir_ui_view.py", line 440, in _render_template
return super()._render_template(template, values=values)
File "odoo/addons/base/models/ir_ui_view.py", line 2164, in _render_template
return self.env['ir.qweb']._render(template, values)
File "odoo/tools/profiler.py", line 292, in _tracked_method_render
return method_render(self, template, values, **options)
File "odoo/addons/base/models/ir_qweb.py", line 588, in _render
result = ''.join(rendering)
File "<1749>", line 460, in template_1749
```
When printing a 'Yearly Salary by Head' or 'Yearly Salary by Employee' report for the first time, we have to select a 'Layout' for the report and after a save 'Layout' it will pass the incorrect 'active_model'. As a result, we must pass a current 'active_model' through the 'with_context'.
sentry-4247628606
Forward-Port-Of: odoo/enterprise#42787* delivery_bpost, delivery_dhl, delivery_easypost, delivery_fedex, delivery_ups, delivery_usps before this commit, on neutralizing the database the delivery carriers are not neutralized. after this commit, on neutralizing a database, the delivery carriers will be neutralized and dummy values will be set in credential field Forward-Port-Of: odoo/enterprise#43018 Forward-Port-Of: odoo/enterprise#42665
Original PR description
* delivery_bpost, delivery_dhl, delivery_easypost, delivery_fedex, delivery_ups, delivery_usps before this commit, on neutralizing the database the delivery carriers are not neutralized. after this commit, on neutralizing a database, the delivery carriers will be neutralized and dummy values will be set in credential field Forward-Port-Of: odoo/enterprise#43018 Forward-Port-Of: odoo/enterprise#42665
This commit fixes multi-editing on Quality Alert when stage_id is not in the vals and alerts have different stages. The issue comes from self.stage_id.done, when self.stage_id is not a singleton. By simply inversing the order of the check (and so by checking first that 'stage_id' is in the vals), we ensure that self.stage_id will be a singleton (as the check is located after the super.write call). Steps to reproduce: - multi-edit quality alerts without changing the stage Current behav
Original PR description
This commit fixes multi-editing on Quality Alert when stage_id is not in the vals and alerts have different stages. The issue comes from self.stage_id.done, when self.stage_id is not a singleton. By simply inversing the order of the check (and so by checking first that 'stage_id' is in the vals), we ensure that self.stage_id will be a singleton (as the check is located after the super.write call). Steps to reproduce: - multi-edit quality alerts without changing the stage Current behavior: - a ValueError is thrown: a singleton is expected Expected behavior: - No error, the user can multi-edit without changing the stage Forward-Port-Of: odoo/enterprise#42008