Il giorno mercoledì 20 dicembre 2017 10:26:51 UTC+1, Sergi Almacellas Abellana 
ha scritto:
> El 19/12/17 a les 18:07, Cato Nano ha escrit:
> > I d like to establish a relation between my entity (Bolletta) and the 
> > parties represented by the Party module
> 
> You can have a look at the party_relationship module which have the 
> model for storing relationships between parties.

I managed to connect my entity (bolletta) to the parties defined in the Party 
module

It' s simpler than I thought, I was just confused and thought that something 
more was necessary

This is almost all I used

party = fields.Many2One('party.party', 'Party', required=True, select=True,)

and I shamelessly copied this from the sale module

It works ! :-)

Now the views are a bit awkward, I will refine them in the next few days but 
you can take a look, if you want !

Here
http://52.59.227.113:8000/index.html

user admin
pwd tryton



> > I m not sure I undertsand how to do that
> > 
> > The manual doesn t mention the possibility it seems. Does it ?
> > 
> > The "sale" module has a model like this
> > 
> > class PartyReplace:
> >      __metaclass__ = PoolMeta
> >      __name__ = 'party.replace'
> > 
> >      @classmethod
> >      def fields_to_replace(cls):
> >          return super(PartyReplace, cls).fields_to_replace() + [
> >              ('sale.sale', 'party'),
> >              ('sale.sale', 'shipment_party'),
> >              ]
> > 
> > 
> > but I m not sure what this is and what it does
> On the party module there is a wizard to replace on party with another. 
> This wizard is designed to be extended by other modules in order to move 
> the documents related to the old party to the new party.
> 
> That's what this code do.

Thank you

I still haven't considered Wizards and state transitions

Merry Christmas !

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/f7273b00-c218-4565-8ef8-54104a250fda%40googlegroups.com.

Reply via email to