view improvement
bzr revid: fp@tinyerp.com-20080924091806-dburg1tq736j1khp
This commit is contained in:
@@ -65,5 +65,16 @@ class project_work(osv.osv):
|
||||
|
||||
|
||||
project_work()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
class project_project(osv.osv):
|
||||
_inherit = "project.project"
|
||||
def name_get(self, cr, user, ids, context=None):
|
||||
result = []
|
||||
for project in self.browse(cr, user, ids, context):
|
||||
if project.category_id:
|
||||
result.append((project.id, '['+(project.category_id.code or '')+'] '+project.name))
|
||||
else:
|
||||
result.append((project.id, '[?] '+project.name))
|
||||
return result
|
||||
project_project()
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<form string="Sales order">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1"/>
|
||||
<field name="client_order_ref"/>
|
||||
<field name="client_order_ref" select="2"/>
|
||||
<field name="shipped" select="2"/>
|
||||
<field name="shop_id" on_change="onchange_shop_id(shop_id)" select="2"/>
|
||||
<field name="date_order" select="1"/>
|
||||
|
||||
@@ -380,6 +380,7 @@ class stock_picking(osv.osv):
|
||||
'min_date': fields.function(get_min_max_date, fnct_inv=_set_minimum_date, multi="min_max_date",
|
||||
method=True,store=True, type='datetime', string='Planned Date', select=1),
|
||||
'date':fields.datetime('Date Order'),
|
||||
'date_done':fields.datetime('Date Done'),
|
||||
'max_date': fields.function(get_min_max_date, fnct_inv=_set_maximum_date, multi="min_max_date",
|
||||
method=True,store=True, type='datetime', string='Max. Planned Date', select=2),
|
||||
'move_lines': fields.one2many('stock.move', 'picking_id', 'Move lines'),
|
||||
@@ -514,7 +515,7 @@ class stock_picking(osv.osv):
|
||||
# TODO: change and create a move if not parents
|
||||
#
|
||||
def action_done(self, cr, uid, ids, context=None):
|
||||
self.write(cr,uid, ids, {'state':'done'})
|
||||
self.write(cr,uid, ids, {'state':'done', 'date_done': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
return True
|
||||
|
||||
def action_move(self, cr, uid, ids, context={}):
|
||||
|
||||
@@ -568,6 +568,7 @@
|
||||
<field name="active" select="2"/>
|
||||
<field name="auto_picking"/>
|
||||
<field name="invoice_state" select="2"/>
|
||||
<field name="date_done" select="2"/>
|
||||
<newline/>
|
||||
<field name="move_type"/>
|
||||
</page>
|
||||
@@ -656,8 +657,9 @@
|
||||
<field name="auto_picking"/>
|
||||
<field name="active" select="2"/>
|
||||
<newline/>
|
||||
<field name="move_type"/>
|
||||
<field name="date" select="1"/>
|
||||
<field name="date_done" select="2"/>
|
||||
<field name="move_type"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
@@ -842,8 +844,9 @@
|
||||
<field name="active" select="2"/>
|
||||
<field name="auto_picking"/>
|
||||
<newline/>
|
||||
<field name="move_type"/>
|
||||
<field name="date" select="2"/>
|
||||
<field name="date_done" select="2"/>
|
||||
<field name="move_type"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user