Hello,
I added new fields in invoice, but they are not being added at the table
and screen. For instance, field active:
1) invoice.py
# -*- coding: utf-8 -*-
from trytond.model import fields
from trytond.pool import PoolMeta
__metaclass__ = PoolMeta
__all__ = ['Invoice']
class Invoice:
__name__ = 'account.invoice'
active = fields.Boolean('Active', select=True)
2) invoice.xml
<?xml version="1.0"?>
<tryton>
<data>
<record model="ir.ui.view" id="view_invoice_nfse_form">
<field name="model">account_invoice.invoice</field>
<field name="inherit" ref="account_invoice.invoice_view_form"/>
<field name="type">form</field>
<field name="name">invoice_form</field>
</record>
</data>
</tryton>
3) __init__.py
from trytond.pool import Pool
from nfse_br import *
from company import *
from invoice import *
def register():
Pool.register(
NumeracaoRPS,
NFSe,
Company,
NumeracaoRPSLine,
Invoice,
module='nfse_br', type_='model'
)
4) invoice_form.xml
<?xml version="1.0"?>
<data>
<xpath expr="/form/field[@name='invoice_address']" position='after'>
<label name="active"/>
<field name="active"/>
</xpath>
</data>
5) tryton.cfg
[tryton]
version=2.9.0
depends:
company
currency
ir
party
res
digital_certificate
company_silex
account
account_br
xml:
nfse_br.xml
company.xml
invoice.xml
Can you help me, please?
--
Iasmini Gomes
SÃlex Sistemas
[email protected]
www.silexsistemas.com.br