Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
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
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 4/6/16, 11:20 AM|
|Seen: 2534 times|
|Last updated: 8/16/16, 7:54 AM|