From 5a52dd362be238663972f93f738b050b6ce440bd Mon Sep 17 00:00:00 2001 From: "Ajay Chauhan (OpenERP)" Date: Thu, 22 Nov 2012 17:15:37 +0530 Subject: [PATCH] [IMP] purchase: made 'invoicing control' readonly for states other than 'draft & sent' bzr revid: cha@tinyerp.com-20121122114537-0uu81oyv7gjtvgjp --- addons/purchase/purchase.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index ad7563140b2..59a757f28e3 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -190,6 +190,7 @@ class purchase_order(osv.osv): 'invoiced': fields.function(_invoiced, string='Invoice Received', type='boolean', help="It indicates that an invoice has been paid"), 'invoiced_rate': fields.function(_invoiced_rate, string='Invoiced', type='float'), 'invoice_method': fields.selection([('manual','Based on Purchase Order lines'),('order','Based on generated draft invoice'),('picking','Based on incoming shipments')], 'Invoicing Control', required=True, + readonly=True, states={'draft':[('readonly',False)], 'sent':[('readonly',False)]}, help="Based on Purchase Order lines: place individual lines in 'Invoice Control > Based on P.O. lines' from where you can selectively create an invoice.\n" \ "Based on generated invoice: create a draft invoice you can validate later.\n" \ "Bases on incoming shipments: let you create an invoice when receptions are validated."