oui, le voili :

Traceback (most recent call last):
  File "/trytond/protocols/netrpc.py", line 48, in run
    res = dispatch(host, port, 'NetRPC', *msg)
  File "/trytond/protocols/dispatcher.py", line 136, in dispatch
    res = getattr(obj, method)(*args, **kargs)
  File "/trytond/model/modelstorage.py", line 396, in search_read
    ids = self.search(domain, offset=offset, limit=limit, order=order)
  File "/trytond/model/modelsql.py", line 1133, in search
    qu1, qu2, tables, tables_args = self.search_domain(domain)
  File "/trytond/model/modelsql.py", line 1280, in search_domain
    qu1, qu2 = self.__search_domain_oper(domain, tables, tables_args)
  File "/trytond/model/modelsql.py", line 1294, in __search_domain_oper
    % domain[0])
Exception: ('ValidateError', 'Operator "[" not supported')

@+

2011/1/17 Cédric Krier <[email protected]>

> On 17/01/11 14:16 -0800, pobsteta wrote:
> > Bonjour,
> >
> > J'ai cette classe :
> > class VolumeAnnee(ModelSQL, ModelView):
> >     'VolumeAnnee'
> >     _name = 'recettes.volume_annee'
> >     _description = __doc__
> >
> >     annee = fields.Integer('Année', select=1)
> >     volume = fields.Float('Volume', digits=(16, 2), select=2)
> >     pcg = fields.Many2One('plancomptable.plancomptable', 'Plan
> > comptable', select=1)
> >     unite = fields.Selection([('m3',u'm3'),('st',u'Stères'),
> > ('t',u'Tonnes')], 'Unités', select=1)
> >
> >     def table_query(self, context=None):
> >         if context is None:
> >             context = {}
> >         return ('SELECT DISTINCT id, rec_annee AS annee, rec_unit AS
> > unite, rec_plancomptable AS pcg, SUM(rec_vol) AS volume, ' \
> >                     'MAX(recettes_recettes.create_uid) AS create_uid,
> > ' \
> >                     'MAX(recettes_recettes.create_date) AS
> > create_date, ' \
> >                     'MAX(recettes_recettes.write_uid) AS write_uid, '
> > \
> >                     'MAX(recettes_recettes.write_date) AS write_date '
> > \
> >                 'FROM recettes_recettes ' \
> >                 'GROUP BY id, annee, unite, pcg ' \
> >                 'ORDER BY annee ASC ',[])
> >
> > VolumeAnnee()
> >
> > dans un fichier python. Dans le fichier xml, j'ai
> >
> > <record model="ir.ui.view" id="annee_volume_view_tree">
> >             <field name="model">recettes.volume_annee</field>
> >             <field name="type">tree</field>
> >             <field name="arch" type="xml">
> >                 <![CDATA[
> >                 <tree string="Volumes récoltés par année">
> >                     <field name="annee"/>
> >                     <field name="volume"/>
> >                     <field name="pcg"/>
> >                     <field name="unite"/>
> >                 </tree>
> >                 ]]>
> >             </field>
> >         </record>
> >
> > Je voudrais <field name="pcg" widget="selection"/> mais dès lors j'ai
> > une Validate Error  : Exception: ('ValidateError', 'Operator "[" not
> > supported') ????
>
> Y-a-t-il une traceback ?
>
> --
> 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/
>



-- 
Pascal Obstétar
CEO Bio Eco Forests
Tél : 06 70 614 944
www.forestiersdumonde.org

-- 
[email protected] mailing list

Répondre à