[IMP] Give todays'date in default.
bzr revid: bth@tinyerp.com-20121207071910-p87eady1aiicguy2
This commit is contained in:
parent
b93c285ad0
commit
942eb82890
|
@ -22,6 +22,7 @@
|
|||
import time
|
||||
from lxml import etree
|
||||
import decimal_precision as dp
|
||||
from datetime import datetime
|
||||
|
||||
import netsvc
|
||||
import pooler
|
||||
|
@ -289,6 +290,7 @@ class account_invoice(osv.osv):
|
|||
'internal_number': False,
|
||||
'user_id': lambda s, cr, u, c: u,
|
||||
'sent': False,
|
||||
'date_invoice': lambda *a:datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
}
|
||||
_sql_constraints = [
|
||||
('number_uniq', 'unique(number, company_id, journal_id, type)', 'Invoice Number must be unique per Company!'),
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
import netsvc
|
||||
from datetime import datetime
|
||||
|
||||
class sale_make_invoice(osv.osv_memory):
|
||||
_name = "sale.make.invoice"
|
||||
|
@ -30,7 +31,8 @@ class sale_make_invoice(osv.osv_memory):
|
|||
'invoice_date': fields.date('Invoice Date'),
|
||||
}
|
||||
_defaults = {
|
||||
'grouped': False
|
||||
'grouped': False,
|
||||
'invoice_date': lambda *a:datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
}
|
||||
|
||||
def view_init(self, cr, uid, fields_list, context=None):
|
||||
|
|
Loading…
Reference in New Issue