Bharat Devnani (Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-900783-bde into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #900783 in OpenERP Addons: "account assets - reset to draft missing"
  https://bugs.launchpad.net/openobject-addons/+bug/900783

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-900783-bde/+merge/85067

Hello Sir, 

I have made the functionality to set the account assets form to draft state 
from running state.

Thanks & Regards,
Devnani Bharat R.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-900783-bde/+merge/85067
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-900783-bde.
=== modified file 'account_asset/account_asset.py'
--- account_asset/account_asset.py	2011-11-11 19:29:54 +0000
+++ account_asset/account_asset.py	2011-12-09 06:09:32 +0000
@@ -184,6 +184,11 @@
     def set_to_close(self, cr, uid, ids, context=None):
         return self.write(cr, uid, ids, {'state': 'close'}, context=context)
 
+    def set_to_draft(self, cr, uid, ids, context=None):
+        return self.write(cr, uid, ids, {
+            'state':'draft'
+        }, context)
+
     def _amount_residual(self, cr, uid, ids, name, args, context=None):
         cr.execute("""SELECT
                 l.asset_id as id, round(SUM(abs(l.debit-l.credit))) AS amount

=== modified file 'account_asset/account_asset_view.xml'
--- account_asset/account_asset_view.xml	2011-12-05 14:47:10 +0000
+++ account_asset/account_asset_view.xml	2011-12-09 06:09:32 +0000
@@ -116,8 +116,9 @@
                     <newline/>
                     <separator string="" colspan="4"/>
                     <field name="state" readonly="1" colspan="2"/>
-                    <group colspan="2" col="2">
+                    <group colspan="2" col="4">
                        <button name="validate" states="draft" string="Confirm Asset" type="object" icon="terp-camera_test"/>
+                       <button name="set_to_draft" states="open" string="Set to Draft" type="object" icon="gtk-convert"/> 
                        <button name="set_to_close" states="open" string="Set to Close" type="object" icon="gtk-close"/>
                     </group>
                  </page>

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to