Em 29/10/2013 15:03, Cédric Krier escreveu:
On 29/10/13 14:52 -0200, Gmail - Iasmini wrote:
Em 29/10/2013 13:35, Cédric Krier escreveu:
On 25/10/13 11:56 -0200, Gmail - Iasmini wrote:
I don't know why the field isn't shown on the screen.
On 29/10/13 06:19 -0700, igomes wrote:
I'm stucked, please help me!!
1. I inserted a new field on invoice.py
2. It was inserted on table, but it doesn't appears on screen
3. I know that is not calling the file invoice_line_form.xml, because I put
purposely an wrong name at the 'expr' and it raises no error when I use the
screen.
It is because on invoice form, it is not the invoice_line_view_form that
is used but invoice_line_view_tree_sequence.
Ok, I see. I changed the name of my xml view to:
invoice_line_tree_sequence.xml
It is not only about changing the name of file but also the id of the
view inherited.
Do I have to put the inheritance in invoice.xml?
I added these lines in this file:
...
<data>
<record model="ir.ui.view" id="view_invoice_line_nfse_form">
<field name="model">account.invoice</field>
<field name="inherit"
ref="account_invoice.invoice_line_view_tree_sequence"/>
<field name="type">tree</field>
<field name="name">invoice_line_tree_sequence</field>
</record>
</data>
...
But now it's raising this error:
trytond.exceptions.UserError: ('UserError', (u'Invalid XML for view
"account.invoice".', ''))
<?xml version="1.0"?>
<data>
<xpath expr="/tree/field[@name='unit_price']" position='after'>
<label name="slx_desconto"/>
<field name="slx_desconto"/>
</xpath>
</data>
And I changed the xpath according to the new file.
Since there is already a reference of invoice_line_view_tree_sequence
in original invoice_form.xml I do not have to add anything in my file
invoice_form.xml, right?
The field still not appears.
--
Iasmini Gomes
Sílex Sistemas
[email protected]
www.silexsistemas.com.br