Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ci joint le code que j'ai ajouté :
- Dans mon fichier entity.py, j'ai ajouté la classe suivante car c'est ce qu'il faut faire d'après la documentation :
- class EntityTechnicalRefereeRelation(ModelSQL):
- # Relation between the entity and the technical referees
- __name__ = 'entity.entity-technical_referee.technical_referee'
- entity = fields.Many2One('entity.entity', 'Entity', required=True,
- ondelete='CASCADE')
- technical_referee = fields.Many2One('technical_referee.technical_referee', 'Technical referee', required=True,
- ondelete='RESTRICT')
- J'ai ajouté EntityTechnicalRefereeRelation au __all__ et dans __init__.py.
- J'ai également ajouté mon field qui fait l'association entre un référent technique et une entité :
- technical_referees = fields.Many2Many(
- 'entity.entity-technical_referee.technical_referee',
- 'entity_id',
- 'technical_referee',
- "Technical referees",
- readonly=False,
- )
- L'erreur complète que j'obtiens est :
- AssertionError: <class 'trytond.modules.entity.entity.EntityTechnicalRefereeRelation'> has no docstring
Advertisement
Add Comment
Please, Sign In to add comment