On 02 Mar 13:39, Jean C wrote:
> 2015-03-02 13:19 GMT+01:00 Cédric Krier <[email protected]>:
> 
> > > I would like that when the user changes the bank account, the mandate
> > > be set (if one matching exists),
> >
> > This can be done.
> >
> 
> And it is.
> 
> > or a default one created.
> >
> > This has to be managed in the create method.
> > But I find it is a very bad design choice to create stuffs *automatically*.
> 
> 
> I know that. That's why I feel like something is missing. The problem with
> using the create method is that it does not give the user a chance to
> modify the mandate before saving.

It will never because a many2one is a link so the target must be created
before doing the link.

> So currently my solutions are :
>   - auto-create a mandate on every bank account / party relation

That's sound stupid.

>   - Use some twisted O2M Function field with a setter to be able to
> create the mandate via on_change.

I don't understand.

> I like none of those, so that's why I would like to discuss another way
> to do what I want to.

The good way: let the user create what he wants.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: [email protected]
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Reply via email to