I've added new fields in stock.picking and would like them to appear in the form view as a new page in the Delivery Orders notebook.
I think I'm having trouble because the model used in the Delivery Orders is stock.picking.out, which inherits stock.picking.
As far as I can see, the form view used is stock.view_picking_out_form, which inherits stock.view_picking_form.
I've tried many things in OpenERP 7 and none of them worked.
In version 6.1 it was working like this...
.py:
class stock_picking(osv.osv):
_inherit = "stock.picking"
_columns = {
'hash': fields.char('Assinatura', size=200),
'hash_control': fields.char('Chave', size=40),
'system_entry_date': fields.datetime('Data de confirmação'),
'write_date': fields.datetime('Data de alteração'),
'hashcode': fields.char('Assinatura do Documento', size=5),
'doc_guia': fields.boolean('Este documento é do tipo Guia?',
help='Se o documento for do tipo Guia (e.g.: Guia de Transporte, Guia de Remessa, etc) assinale este campo.'),
'journal_id': fields.many2one('account.journal', 'Tipo de Guia', domain=[('type', '=', 'guia')], readonly=True),
'guia_number': fields.char('Número da Guia', size=40, readonly=True),
'at_code': fields.char('Nº Autorização AT', size=200, readonly=True),
'data_hora_inicio': fields.datetime('Data/Hora Inicio'),
'data_hora_fim': fields.datetime('Data/Hora Fim'),
'at_reject': fields.char('Motivo de Rejeição', size=200, readonly=True),
'tipo_biling': fields.selection([('P', 'Documento criado nesta aplicação'),
('I', 'Documento criado noutra aplicação e integrada nesta aplicação'),
('M', 'Documento proveniente de um documento manual')],
"Origem do Documento", readonly=True),
'nota_breve': fields.char('Referência', size=128),
}
stock_picking()
xml:
<record model="ir.ui.view" id="stock_picking_saft_inherit">
<field name="name">stock.picking.saft.inherit</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_out_form"/>
<field name="arch" type="xml">
<field name="backorder_id" position="after">
<group col="6" fill="1" colspan="6">
<separator colspan="6" string="Dados da Guia"/>
<newline/>
<field name="journal_id" colspan="3"/>
<field name="guia_number" colspan="3"/>
<field name="data_entrega" colspan="3"/>
<field name="matricula_id" colspan="3"/>
<field name="local_carga" colspan="3"/>
<field name="tipo_biling" colspan="3"/>
<field name="doc_guia" invisible="True"/>
<field name="nota_breve" colspan="6"/>
<newline/>
<separator colspan="6" string="Comunicação AT"/>
<newline/>
<field name="at_code" colspan="6"/>
<field name="at_reject" colspan="6"/>
</group>
</field>
<tree string="Stock Moves" position="inside">
<field name="name" />
</tree>
<form string="Stock Moves" position="inside" >
<newline/>
<separator colspan="8" string="Descrição do Produto"/>
<field name="name" />
</form>
</field>
</record>
Can anyone help?
Thanks.
.py
and.xml
file how you do that ? – Bhavesh Odedra