Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
3381 Ansichten

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
0
März 25
776
1
Juni 25
24948
2
Juli 22
4136
1
Sept. 21
3770
3
Sept. 21
8540