On Sat, Feb 18, 2017 at 10:13 PM, Cédric Krier <cedric.kr...@b2ck.com> wrote:
> On 2017-02-17 20:37, Vincent Bastos wrote: > > Hi, > > > > I would like to create a Configuration form for a module that has a > > mandatory field for a product and I would like this form to force the > user > > to create a product with accounts being setup. > > > > Is this possible? How would I do this? > > This is a strange idea because product is referential data so it is > created prior to operations. > So with this in mind, the product should be created with the required > accounts depending of its configuration. This is like that sale (and > purchase) does, it adds a check box defining if the product can be used > for a sale and if checked the revenue account is required. > But this is not enough because we have this feature to inherit from the > accounting category. So we still have to check and raise an error when > we need an account from a product. > Thanks for your comment. It has made me rethink my design. For this module there is a function which automatically applies a charge based on certain conditions. So I guess the right way of implementing this is actually to create a product record in XML in the module already. -- *Vincent Bastos* *Lava Lab Software* -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/CACLX58D3X_WBMnxGrp_-yKZ382hyOaerevT5znppuND%2B2BQtQQ%40mail.gmail.com.