[14.0][MIG] purchase_order_line_description
Supersedes:
- [x] https://github.com/OCA/purchase-workflow/pull/1349
Tests are failing because of access rights issues
Detail:
odoo.addons.purchase_order_line_description.tests.test_purchase_order_line_description: ERROR: TestPurchaseOrderLineDescription.test_translated_description
(...)
odoo.exceptions.AccessError: Due to security restrictions, you are not allowed to access 'Purchase Order Line' (purchase.order.line) records.
@grindtildeath Please check the CI error already mentioned above
2024-07-22T19:47:22.8424048Z 2024-07-22 19:47:22,841 674 [1;31m[1;49mERROR[0m odoo odoo.addons.purchase_order_line_description.tests.test_purchase_order_line_description: ERROR: TestPurchaseOrderLineDescription.test_translated_description
2024-07-22T19:47:22.8425897Z Traceback (most recent call last):
2024-07-22T19:47:22.8426788Z File "/opt/odoo/odoo/api.py", line 807, in get
2024-07-22T19:47:22.8427573Z return field_cache[record._ids[0]]
2024-07-22T19:47:22.8428253Z KeyError: 61
2024-07-22T19:47:22.8428611Z
2024-07-22T19:47:22.8429931Z During handling of the above exception, another exception occurred:
2024-07-22T19:47:22.8450109Z
2024-07-22T19:47:22.8450307Z Traceback (most recent call last):
2024-07-22T19:47:22.8502523Z File "/opt/odoo/odoo/fields.py", line 994, in __get__
2024-07-22T19:47:22.8503456Z value = env.cache.get(record, self)
2024-07-22T19:47:22.8504117Z File "/opt/odoo/odoo/api.py", line 810, in get
2024-07-22T19:47:22.8504833Z raise CacheMiss(record, field)
2024-07-22T19:47:22.8505760Z odoo.exceptions.CacheMiss: 'purchase.order.line(61,).company_id'
2024-07-22T19:47:22.8506384Z
2024-07-22T19:47:22.8506787Z During handling of the above exception, another exception occurred:
2024-07-22T19:47:22.8507457Z
2024-07-22T19:47:22.8507660Z Traceback (most recent call last):
2024-07-22T19:47:22.8508343Z File "/opt/odoo/odoo/fields.py", line 1020, in __get__
2024-07-22T19:47:22.8509012Z recs._fetch_field(self)
2024-07-22T19:47:22.8510154Z File "/opt/odoo/odoo/models.py", line 3085, in _fetch_field
2024-07-22T19:47:22.8510836Z self._read(fnames)
2024-07-22T19:47:22.8511350Z File "/opt/odoo/odoo/models.py", line 3205, in _read
2024-07-22T19:47:22.8512288Z raise self.env['ir.rule']._make_access_error('read', forbidden)
2024-07-22T19:47:22.8513898Z odoo.exceptions.AccessError: Due to security restrictions, you are not allowed to access 'Purchase Order Line' (purchase.order.line) records.
2024-07-22T19:47:22.8514948Z
2024-07-22T19:47:22.8515252Z Contact your administrator to request access if necessary.
2024-07-22T19:47:22.8515794Z
2024-07-22T19:47:22.8516219Z During handling of the above exception, another exception occurred:
2024-07-22T19:47:22.8516834Z
2024-07-22T19:47:22.8517031Z Traceback (most recent call last):
2024-07-22T19:47:22.8518803Z File "/__w/purchase-workflow/purchase-workflow/purchase_order_line_description/tests/test_purchase_order_line_description.py", line 77, in test_translated_description
2024-07-22T19:47:22.8520923Z self.assertEqual(line.name, "descripción para compras")
2024-07-22T19:47:22.8521860Z File "/opt/odoo/odoo/tests/common.py", line 1996, in __exit__
2024-07-22T19:47:22.8522598Z self.save()
2024-07-22T19:47:22.8523167Z File "/opt/odoo/odoo/tests/common.py", line 2013, in save
2024-07-22T19:47:22.8523847Z r.write(values)
2024-07-22T19:47:22.8525099Z File "/__w/purchase-workflow/purchase-workflow/purchase_order_line_deep_sort/models/purchase_order.py", line 57, in write
2024-07-22T19:47:22.8526356Z res = super().write(values)
2024-07-22T19:47:22.8527184Z File "/opt/odoo/addons/purchase_stock/models/purchase.py", line 74, in write
2024-07-22T19:47:22.8528118Z res = super(PurchaseOrder, self).write(vals)
2024-07-22T19:47:22.8529417Z File "/opt/odoo/addons/purchase_requisition/models/purchase.py", line 101, in write
2024-07-22T19:47:22.8530461Z result = super(PurchaseOrder, self).write(vals)
2024-07-22T19:47:22.8531402Z File "/opt/odoo/addons/purchase/models/purchase.py", line 204, in write
2024-07-22T19:47:22.8532248Z res = super().write(vals)
2024-07-22T19:47:22.8532985Z File "/opt/odoo/addons/mail/models/mail_thread.py", line 322, in write
2024-07-22T19:47:22.8533888Z result = super(MailThread, self).write(values)
2024-07-22T19:47:22.8534798Z File "/opt/odoo/addons/mail/models/mail_activity.py", line 788, in write
2024-07-22T19:47:22.8535759Z return super(MailActivityMixin, self).write(vals)
2024-07-22T19:47:22.8536520Z File "/opt/odoo/odoo/models.py", line 3694, in write
2024-07-22T19:47:22.8537188Z field.write(self, vals[fname])
2024-07-22T19:47:22.8537814Z File "/opt/odoo/odoo/fields.py", line 3056, in write
2024-07-22T19:47:22.8538529Z return self.write_batch([(records, value)])
2024-07-22T19:47:22.8539362Z File "/opt/odoo/odoo/fields.py", line 3077, in write_batch
2024-07-22T19:47:22.8540195Z return self.write_real(records_commands_list, create)
2024-07-22T19:47:22.8541043Z File "/opt/odoo/odoo/fields.py", line 3261, in write_real
2024-07-22T19:47:22.8541949Z flush()
2024-07-22T19:47:22.8542452Z File "/opt/odoo/odoo/fields.py", line 3223, in flush
2024-07-22T19:47:22.8543107Z comodel.create(to_create)
2024-07-22T19:47:22.8543880Z File "<decorator-gen-209>", line 2, in create
2024-07-22T19:47:22.8544696Z File "/opt/odoo/odoo/api.py", line 333, in _model_create_single
2024-07-22T19:47:22.8545633Z return self.browse().concat(*(create(self, vals) for vals in arg))
2024-07-22T19:47:22.8546516Z File "/opt/odoo/odoo/api.py", line 333, in <genexpr>
2024-07-22T19:47:22.8547381Z return self.browse().concat(*(create(self, vals) for vals in arg))
2024-07-22T19:47:22.8548984Z File "/__w/purchase-workflow/purchase-workflow/purchase_order_line_deep_sort/models/purchase_order.py", line 78, in create
2024-07-22T19:47:22.8550188Z line = super().create(vals)
2024-07-22T19:47:22.8550848Z File "<decorator-gen-199>", line 2, in create
2024-07-22T19:47:22.8551434Z File "/opt/odoo/odoo/api.py", line 352, in _model_create_multi
2024-07-22T19:47:22.8552091Z return create(self, [arg])
2024-07-22T19:47:22.8552560Z File "/opt/odoo/addons/purchase_stock/models/purchase.py", line 313, in create
2024-07-22T19:47:22.8553136Z lines = super(PurchaseOrderLine, self).create(vals_list)
2024-07-22T19:47:22.8553616Z File "<decorator-gen-192>", line 2, in create
2024-07-22T19:47:22.8554071Z File "/opt/odoo/odoo/api.py", line 353, in _model_create_multi
2024-07-22T19:47:22.8554491Z return create(self, arg)
2024-07-22T19:47:22.8554926Z File "/opt/odoo/addons/purchase/models/purchase.py", line 962, in create
2024-07-22T19:47:22.8555415Z lines = super().create(vals_list)
2024-07-22T19:47:22.8555806Z File "<decorator-gen-66>", line 2, in create
2024-07-22T19:47:22.8556289Z File "/opt/odoo/odoo/api.py", line 353, in _model_create_multi
2024-07-22T19:47:22.8556712Z return create(self, arg)
2024-07-22T19:47:22.8557160Z File "/opt/odoo/odoo/addons/base/models/ir_fields.py", line 534, in create
2024-07-22T19:47:22.8557653Z recs = super().create(vals_list)
2024-07-22T19:47:22.8558043Z File "<decorator-gen-15>", line 2, in create
2024-07-22T19:47:22.8558489Z File "/opt/odoo/odoo/api.py", line 353, in _model_create_multi
2024-07-22T19:47:22.8558902Z return create(self, arg)
2024-07-22T19:47:22.8559249Z File "/opt/odoo/odoo/models.py", line 3899, in create
2024-07-22T19:47:22.8559640Z records = self._create(data_list)
2024-07-22T19:47:22.8560015Z File "/opt/odoo/odoo/models.py", line 4042, in _create
2024-07-22T19:47:22.8560481Z field._update_inverses(self.browse(record_ids), value)
2024-07-22T19:47:22.8560980Z File "/opt/odoo/odoo/fields.py", line 2781, in _update_inverses
2024-07-22T19:47:22.8561690Z valid_records = records.filtered_domain(invf.get_domain_list(corecord))
2024-07-22T19:47:22.8562255Z File "/opt/odoo/odoo/models.py", line 5378, in filtered_domain
2024-07-22T19:47:22.8562674Z data = rec.mapped(key)
2024-07-22T19:47:22.8563002Z File "/opt/odoo/odoo/models.py", line 5303, in mapped
2024-07-22T19:47:22.8563397Z recs = recs._fields[name].mapped(recs)
2024-07-22T19:47:22.8563788Z File "/opt/odoo/odoo/fields.py", line 1110, in mapped
2024-07-22T19:47:22.8564209Z self.__get__(first(remaining), type(remaining))
2024-07-22T19:47:22.8564639Z File "/opt/odoo/odoo/fields.py", line 2494, in __get__
2024-07-22T19:47:22.8565041Z return super().__get__(records, owner)
2024-07-22T19:47:22.8565438Z File "/opt/odoo/odoo/fields.py", line 1022, in __get__
2024-07-22T19:47:22.8565810Z record._fetch_field(self)
2024-07-22T19:47:22.8566176Z File "/opt/odoo/odoo/models.py", line 3085, in _fetch_field
2024-07-22T19:47:22.8566573Z self._read(fnames)
2024-07-22T19:47:22.8566880Z File "/opt/odoo/odoo/models.py", line 3205, in _read
2024-07-22T19:47:22.8567418Z raise self.env['ir.rule']._make_access_error('read', forbidden)
2024-07-22T19:47:22.8568385Z odoo.exceptions.AccessError: Due to security restrictions, you are not allowed to access 'Purchase Order Line' (purchase.order.line) records.
2024-07-22T19:47:22.8569057Z
2024-07-22T19:47:22.8569245Z Contact your administrator to request access if necessary.
/ocabot rebase
Congratulations, PR rebased to 14.0.
/ocabot migration purchase_order_line_description
@grindtildeath tests of this module are still failing :-(
@StefanRijnhart we did migrate the customer that was using this in v14, so IMO this can either be superseded or closed
@grindtildeath OK!