I get this error while import the module:
Error while importing module 'pos_margin_sale'.
Module loading pos_margin_sale failed:
file /tmp/tmp5bby2hp9/pos_margin_sale/security/ir.model.access.csv could not be processed:
No matching record found for external id 'model_sale_confirmation_wizard' in field 'Model'
No matching record found for external id 'model_wizard_margin_product' in field 'Model'
Missing required value for the field 'Model' (model_id)
Missing required value for the field 'Model' (model_id)
Here is my CSV security file:
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_sale_confirmation_wizard,sale_confirmation_wizard,pos_margin_sale.model_sale_confirmation_wizard,,1,1,1,1
access_wizard_margin_product,wizard_margin_product,pos_margin_sale.model_wizard_margin_product,,1,1,1,1
Here is my model pseudo code :
model sale_confirmation_wizard
class SaleConfirmationWizard(models.TransientModel):
_name = 'sale.confirmation.wizard'
_description = "Sale confirmation wizard"
message = fields.Text(string="Message")
model wizard_margin_product
class WizardMarginProduct(models.TransientModel):
_name = 'wizard.margin.product'
_description = 'Set margin on every product'
I have added it in manifest file and also in init of the model. I also have double checked the sequence and typo error. All was right but still I am getting this server error.
and my manifest.py like this :
...
'data': [
'security/ir.model.access.csv',
'wizard/sale_confirmation.xml',
'wizard/wizard_margin_product.xml',
...
],
...
On that module doesn’t have any xml file related to security group
I try to import whole module for ODOO 17 but this is happen. I expected the module successfully exported.
This is probably an unexpected behavior when processing the CSV file. Models from the module of the file do not have to be specified with the full external ID.
Just remove the module name from the model_id
entries of your csv:
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_sale_confirmation_wizard,sale_confirmation_wizard,model_sale_confirmation_wizard,,1,1,1,1
access_wizard_margin_product,wizard_margin_product,model_wizard_margin_product,,1,1,1,1
2