Sorry if my explanation is not clear.
I will try explain more clear.
First, i try to create a new model medica.accounting_services related
with medica.accounting_services.line.
on the first model (acounting_services) i try to asociate one field with
the model (gnuhealth.patient) for get the information about the patient (or
in the model case the employee)
account_patient = fields.Many2One('gnuhealth.patient', 'Paciente')
equally, i will asociate the same model with my servicesLine model
account_services_line = fields.One2Many('medica.accounting_services.line',
'account_services_line', 'Servicios', help="Servicios")
then, after that, i will relate the ServicesLine with these models:
accountid = fields.Many2One('medica.accounting_services', 'accountid',
readonly=True)
I need asociate these fields to the model product.product (is part of the
tryton base i checked this information on this URL
http://doc.tryton.org/3.0/modules)
services_concept = fields.Char('services_concept') #get the Description
product
services_product = fields.Many2One('product.product','code') #get the
product code
i need asociate these fields to the mode.template model, that equally is
part of the tryton modules.
services_description = fields.Many2One('product.template','name')
At the end, i see these "models" as one data structure that i need document
in a schema. In my particular case, i do it with one datamodel. (sorry i'm
old school)
But, finally, the tryton's models are database models.
I see this of this form:
<https://lh3.googleusercontent.com/-yaWthT7eIeo/WQDTzFMKs7I/AAAAAAAAQDs/Q-F6jzPBzZYJ1jQlfPo-rT9McE1xcm4wwCLcB/s1600/26-04-2017%2B12-06-36%2Bp.m..png>
then, if I don't need create the foreing key for the relation, i want to
know how to relate tryton the models internally to get the information of
the other model.
i created the enterprise module and individual module of my code ignoring
my FK | PK fields, but doesn't work, i receive the errors:
<https://lh3.googleusercontent.com/-ceJP4XKCokQ/WQDWIVi-89I/AAAAAAAAQEM/eOw708AlY44xhNH-_K8sTJsq0dhnEj8zgCLcB/s1600/22-04-2017%2B05-12-21%2Ba.m..png>
in english is "the relation doesn't exist"
medica_accounting_entpservices_id_seq, this show me that tryton is not
creating automatically the relation.
due than this, i try understanding how tryton make to relate the models.
--
You received this message because you are subscribed to the Google Groups
"tryton" group.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tryton/48a728d3-f90a-4221-98c3-ff05f7c229fe%40googlegroups.com.