openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #03327
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-723443-aag into lp:openobject-addons
Atik Agewan(OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-723443-aag into lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
#723443 default datetime value is at moment when server starts
https://bugs.launchpad.net/bugs/723443
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-723443-aag/+merge/50876
BUG:723443
STOCK:NOW Default datetime value is at moment when New Record Created'
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-723443-aag/+merge/50876
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-723443-aag.
=== modified file 'stock/stock.py'
--- stock/stock.py 2011-02-22 14:13:41 +0000
+++ stock/stock.py 2011-02-23 06:25:13 +0000
@@ -492,7 +492,7 @@
_defaults = {
'active': 1,
'name': make_sscc,
- 'date': time.strftime('%Y-%m-%d %H:%M:%S'),
+ 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
}
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
@@ -655,7 +655,7 @@
'move_type': 'direct',
'type': 'in',
'invoice_state': 'none',
- 'date': time.strftime('%Y-%m-%d %H:%M:%S'),
+ 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.picking', context=c)
}
def action_process(self, cr, uid, ids, context=None):
@@ -1404,7 +1404,7 @@
'move_ids': fields.one2many('stock.move', 'prodlot_id', 'Moves for this production lot', readonly=True),
}
_defaults = {
- 'date': time.strftime('%Y-%m-%d %H:%M:%S'),
+ 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'name': lambda x, y, z, c: x.pool.get('ir.sequence').get(y, z, 'stock.lot.serial'),
'product_id': lambda x, y, z, c: c.get('product_id', False),
}
@@ -1605,9 +1605,9 @@
'priority': '1',
'product_qty': 1.0,
'scrapped' : False,
- 'date': time.strftime('%Y-%m-%d %H:%M:%S'),
+ 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.move', context=c),
- 'date_expected': time.strftime('%Y-%m-%d %H:%M:%S'),
+ 'date_expected': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
}
def write(self, cr, uid, ids, vals, context=None):
@@ -2520,7 +2520,7 @@
}
_defaults = {
- 'date': time.strftime('%Y-%m-%d %H:%M:%S'),
+ 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'state': 'draft',
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.inventory', context=c)
}
Follow ups