[FIX] stock_landed_costs : Added a button to cancel the landed cost.

bzr revid: mdi@tinyerp.com-20140424133030-bxj3x4au976suj36
This commit is contained in:
DJ Patel 2014-04-24 19:00:30 +05:30
parent f71e545f65
commit c0d45ba62f
2 changed files with 5 additions and 0 deletions

View File

@ -181,6 +181,10 @@ class stock_landed_cost(osv.osv):
self.write(cr, uid, cost.id, {'state': 'done', 'account_move_id': move_id}, context=context)
return True
def button_cancel(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'cancel'}, context=context)
return True
def compute_landed_cost(self, cr, uid, ids, context=None):
line_obj = self.pool.get('stock.valuation.adjustment.lines')
for cost in self.browse(cr, uid, ids, context=None):

View File

@ -10,6 +10,7 @@
<form string="Landed Costs" version="7.0">
<header>
<button name="button_validate" string="Validate" states="draft" class="oe_highlight" type="object"/>
<button name="button_cancel" string="Cancel" states="draft" type="object"/>
<field name="state" widget="statusbar" statusbar_visible="draft,done"/>
</header>
<sheet>