CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
my date fields is
salesorder_date = fields.Date('Confirm Sale Date',compute="_currentdate" store=True)
and the method for that email@example.com
It is not showing the current date not even the date field in the template also.I want to append current date in this date field automatically and
of course can edit the date.
Since this uses the @api.multi decorator, it would be wiser to do something like
for order in self:
order.salesorder_date = fields.Date.today() # there's a today() helper on the Date field
But since there is no @api.depends on this method, this value will be computed once at the creation of the record then never changed; and it's probably not what you want. BTW, the compute attribute on the field should be the name of the method.
What are you trying to do exactly?
About This Community
Odoo Training Center
|Asked: 4/6/16, 11:20 AM|
|Seen: 2183 times|
|Last updated: 8/16/16, 7:54 AM|