[MERGE] sale, pos: back converted defaults of time.strftime with lambda (PSI branch)

bzr revid: mra@mra-laptop-20101104124748-ei1ug13srmgdc85l
This commit is contained in:
Mustufa Rangwala
2010-11-04 18:17:48 +05:30
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -305,7 +305,7 @@ class pos_order(osv.osv):
'state': 'draft',
'price_type': 'tax_excluded',
'name': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'pos.order'),
'date_order': time.strftime('%Y-%m-%d %H:%M:%S'),
'date_order': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'date_validity': lambda *a: (datetime.today() + relativedelta(months=+6)).strftime('%Y-%m-%d'),
'nb_print': 0,
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
+2 -2
View File
@@ -32,8 +32,8 @@ class pos_details(osv.osv_memory):
'date_end': fields.date('Date End', required=True)
}
_defaults = {
'date_start': time.strftime('%Y-%m-%d'),
'date_end': time.strftime('%Y-%m-%d'),
'date_start': lambda *a: time.strftime('%Y-%m-%d'),
'date_end': lambda *a: time.strftime('%Y-%m-%d'),
}
def print_report(self, cr, uid, ids, context=None):
@@ -57,8 +57,8 @@ class pos_payment_report_date(osv.osv_memory):
'user_id': fields.many2many('res.users', 'res_user_sale', 'user_id', 'sale_id', 'Salesman')
}
_defaults = {
'date_start': time.strftime('%Y-%m-%d'),
'date_end': time.strftime('%Y-%m-%d'),
'date_start': lambda *a: time.strftime('%Y-%m-%d'),
'date_end': lambda *a: time.strftime('%Y-%m-%d'),
}
pos_payment_report_date()
+1 -1
View File
@@ -286,7 +286,7 @@ class sale_order(osv.osv):
}
_defaults = {
'picking_policy': 'direct',
'date_order': time.strftime('%Y-%m-%d'),
'date_order': lambda *a: time.strftime('%Y-%m-%d'),
'order_policy': 'manual',
'state': 'draft',
'user_id': lambda obj, cr, uid, context: uid,