Hi all:
I have searched in the net,Tryton Google Group,IRC and GNUHealth mailing
list, there is no place to be found, maybe it is so simple, I am new to
Python, I just don't know how, can someone point me to the right direction
or give me example for the following scenario:
Model : Health_service
What I can do so far:
1.
Default Srvice date
2.
Default Description (Title not on service line)
3.
Invoice_to as true (so he/she don't need to click at Line Service)
I cannot do this :
Actually I can move Product field and place before “desc” field (do not
misunderstood this field actually the same as the title Description, I
don't know why?).
1.
I want to make “desc” field value = “Product” field value, and
save behind the scene, since “desc” is not null defined in
service_line
table, how can I do this? This way, she/he enters only
Product name and
also most of the time the product name is good enough for
description. Or
stated differntly, when I click save, that product value also
populated to
“desc” field.
2.
I believe desc field is so important when we create service
Invoice, this field not the product field will be printed on draft/pro
format invoice.
Here is what I tried:
product = fields.Many2One('product.product', 'Product', required=True)
desc = fields.Char('Description')
to_invoice = fields.Boolean('Invoice')
@staticmethod
def default_to_invoice():
return True
@staticmethod
def default_desc:
return product_product.product
*I really appreciate if you can help us out. Thanks.*
Best Regards;
Bounmy Sihaphom
mail. [email protected]