How can i import a func from another script in odoo?

195 Views Asked by At

I am trying to import a function from another script in odoo but when i run the odoo its returning me a error. After i refresh website its working okay. But when i run the odoo every time i have this error.

this is error

assert module.startswith('odoo.addons.'), \
AssertionError: Invalid import of custom_addons.invoice_integration.models.model.InheritAccountMove, it should start with 'odoo.addons'. - - -

-- coding: utf-8 --

from .xml_generator import start
from .bifatura_methods import send_invoice
from .numeric_to_string_price import numeric_to_string_price

from odoo import models, fields, api, SUPERUSER_ID, _
from odoo.exceptions import UserError, ValidationError, QWebException
from odoo.addons import decimal_precision as dp

this is how i am using the imports.

enter image description here

0

There are 0 best solutions below