On 29/05/10 10:52 +0200, Udo Spallek wrote:
> Hi,
> Am Freitag, den 28.05.2010, 08:40 +0200 schrieb Cédric Krier:
> > On 28/05/10 08:20 +0200, Udo Spallek wrote:
> > > Am Montag, den 24.05.2010, 20:19 +0200 schrieb Cédric Krier:
> > > > On 24/05/10 19:46 +0200, Udo Spallek wrote:
> > > > > For the moment it is hard to review proteus for me, I even can not 
> > > > > say 'looks good' 
> > > > > because I don't know the exactly targets of proteus.
> > > > For now, we need only codereview and ideas to add features. 
> > > Ideas:
> > > * An easy API for calling wizards.
> > Yes, it should but I don't know yet how.
> as a CLI example it could look like this:
> 
>     >>> import proteus 
>     >>> proteus.config.set_trytond('test')
>     >>> company = ...
>     >>> account_template = ...
> 
>     >>> # Next line gets a chart of accounts (coa) wizard object 
>     >>> # _and_ creates a new wizard id:
>     >>> coa_wizard = proteus.Wizard.get(
>     >>>         'account.account.create_chart_account')
> 
>     >>> # Next line defines the form contents:
>     >>> form = {'account_template': account_template,
>     >>>         'company': company}

The form content is also define in Tryton by a model. So it will be better to
use the proteus.Model to fill it.

> 
>     >>> # Next line executes the wizard:
>     >>> fiscalyear_wizard.execute('create_account', form=form)
> 
> The execute signature could look like this:
>     execute(wizard_action[, form=None[, print=None[, action=None]]])
> or more generic:
>     execute(wizard_action, type={form|print|action}, data=None)
> 

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: cedric.kr...@b2ck.com
Website: http://www.b2ck.com/

Attachment: pgpC3mFCgygDh.pgp
Description: PGP signature

Reply via email to