i do not understand why the databases are created but not the fields. should e obvious but i can’t see…
class Contrats(DeactivableMixin, ModelSQL, ModelView, MultiValueMixin):
'Contrats'
__name__ = 'formo.contrats'
_order_name = 'write_date'
_order = [('write_date', 'DESC')]
code = fields.Char('Code', required=True, select=True),
date_contrat = fields.Date('Date contrat'),
libelle = fields.Char('Libellé',size=255),
regles = fields.MultiValue(
fields.Many2One('formo.regles', "Contrats-règles")),
AyantDroit = fields.Many2One('party.party', 'party' "Ayant Droit"),
notes=fields.Text('Notes'),
produits = fields.Many2Many(
'formo.contrats_rel_product.product', 'party', 'category', "Produits")
tryton=# \d formo_contrats;
Table « public.formo_contrats »
Colonne | Type | Collationnement | NULL-able | Par défaut
-------------+--------------------------------+-----------------+-----------+--------------------------------------------
id | integer | | not null | nextval('formo_contrats_id_seq'::regclass)
active | boolean | | | false
create_date | timestamp(6) without time zone | | |
create_uid | integer | | |
write_date | timestamp(6) without time zone | | |
write_uid | integer | | |
Index :
"formo_contrats_pkey" PRIMARY KEY, btree (id)
Contraintes de vérification :
"formo_contrats_id_positive" CHECK (id >= 0)