On 02/03/12 10:19 -0300, Felipe Alvarez Harnecker wrote:
> On Viernes 02 Marzo 2012 09:45:07 Cédric Krier escribió:
> > On 02/03/12 09:36 -0300, Felipe Alvarez Harnecker wrote:
> > > Hi,
> > >
> > > i wonder if context is inherited between views, i mean
> > >
> > > i defined one ir.action.act_window with context {'out_invoice_no_vat':
> > > True} that works well, but a child form ( a many2one widget ) opens if
> > > it doesn't know about the parent context.
> >
> > Of course it doesn't.
> >
> > > so i wonder how could be this implemented because i need the child form
> > > to be modified depending of type of invoice.
> > >
> > > i've tried to alter parent form with <field ....
> > > context="{'out_invoice_no_vat': True}"> but context attribute is no
> > > accepted as valid.
> >
> > You can not. A target record opens from a Many2One is not linked to the
> > origin record. By the way I can not imaging what could be different as
> > if I open the same record from somewhere else.
>
>
> sorry, it's a One2Many field, anyway i need to implement an invoice type that
> has no taxes ( here we
> call it "factura excenta" ). So the idea is to hide all fields related to
> taxes in the interface.
>
> Is that possible in tryton??Add a states['invisible'] to the taxes field of the line to make it invisible in our case and add a check on the invoice to ensure taxes are always empty in this case. -- Cédric Krier B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email/Jabber: [email protected] Website: http://www.b2ck.com/
pgpoVpNPsRXM4.pgp
Description: PGP signature
