Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
3371 Prikazi

Hi!

Hope you could help me with this error, I'm trying to install a custom model, it adds a function to open a wizard when an invoice is cancel, the .py file of the wizard is:

from odoo import models, fields, api

class AccountInvoiceReasonCancel(models.TransientModel):
_name = "account.invoice.reason.cancel"
_description = "Motivo de cancelacion de Factura"
...

and the xml file is:






account.invoice.reason.cancel.wizard.form
account.invoice.reason.cancel













Motivo cancelacion factura
ir.actions.act_window
account.invoice.reason.cancel
form
form

new








As you can see, I added the model name in both the form view and the action in the view file, but when I install this module throws:

Modelo no encontrado: account.invoice.reason.cancel

Contexto del error:
Vista `account.invoice.reason.cancel.wizard.form`
[view_id: 2058, xml_id: n/a, model: account.invoice.reason.cancel, parent_id: n/a]
None" while parsing /mnt/extra-addons/account_invoice_cancel_description/wizard/account_invoice_reason_cancel_view.xml:5, near

account.invoice.reason.cancel.wizard.form
account.invoice.reason.cancel


Another detail, both files are inside wizard directory of the module containing with a __init__.py file in it, the content is:

from . import account_invoice_reason_cancel


The structure is:

__init__.py

__manifest__.py

models/account_invoice_extra.py

models/__init__.py

views/account_invoice_cancel_description.xml

wizard/__init__.py

wizard/account_invoice_reason_cancel_view.xml

wizard/account_invoice_reason_cancel.py


Could anyone tell me whats wrong with those files?

Thanks in advance!




Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
mar. 25
774
1
jun. 25
24944
2
jul. 22
4132
1
sep. 21
3766
3
sep. 21
8537