For the view when creating an invoice in the app "Invoicing" in Odoo 15, a new field "Unit" should be added to the "Invoice Lines" after the field "Quantity".
The field is supposed to be freely writable for each new line in the invoice lines and allowed to contain a text about the unit (e.g. Quantity: 34, Unit: "Hours") Unfortunately, I seem to address it incorrectly via my add on or miss something. I don't understand the error message during the installation, because exactly this field, where it says it is not available, I just want to add:
views/unit.xml: Please see here, somehow ic ant post real links or images or full xml code: gist.github.com/mholthausen/456c54d1e398e3f70b2066d4d9fdb3a9
models/unit.py:
from odoo import fields, models
class Unit(models.Model):
_inherit = 'account.move'
unit_field = fields.Char('Unit')
This error message then appears when trying to install the add on:
Field "unit_field" does not exist in model "account.move.line"