summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParamjit Singh Sahota <psa@tinyerp.com>2013-02-14 15:17:24 +0530
committerParamjit Singh Sahota <psa@tinyerp.com>2013-02-14 15:17:24 +0530
commitb581d6525317b01676f2a5d54ffd2c215e4d3276 (patch)
tree65c3d398511cdeb946cba44db17a5d8eb85bf9f7
parent89d45ad9ecddcce6ed7f2e28209d9db210a333a7 (diff)
[IMP] Combined the second message posts in one.
bzr revid: psa@tinyerp.com-20130214094724-vwxhd13erdhwmk3m
-rw-r--r--addons/purchase/purchase.py3
-rw-r--r--addons/purchase/purchase_data.xml6
2 files changed, 7 insertions, 2 deletions
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 4ddc2bc9eb8..a6a5f3e75de 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -163,6 +163,7 @@ class purchase_order(osv.osv):
'state': {
'purchase.mt_rfq_confirmed': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'confirmed',
'purchase.mt_rfq_approved': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'approved',
+ 'purchase.mt_rfq_invoice_paid': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'done',
},
}
_columns = {
@@ -557,7 +558,7 @@ class purchase_order(osv.osv):
def invoice_done(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state':'approved'}, context=context)
- self.message_post(cr, uid, ids, body=_("Invoice <b>Paid.</b>"), context=context)
+ # self.message_post(cr, uid, ids, body=_("Invoice <b>Paid.</b>"), context=context)
return True
def has_stockable_product(self, cr, uid, ids, *args):
diff --git a/addons/purchase/purchase_data.xml b/addons/purchase/purchase_data.xml
index ceb43ba281a..a08e221053e 100644
--- a/addons/purchase/purchase_data.xml
+++ b/addons/purchase/purchase_data.xml
@@ -60,6 +60,10 @@
<field name="default" eval="False"/>
<field name="res_model">purchase.order</field>
</record>
-
+ <record id="mt_rfq_invoice_paid" model="mail.message.subtype">
+ <field name="name">Invoice Paid</field>
+ <field name="default" eval="False"/>
+ <field name="res_model">purchase.order</field>
+ </record>
</data>
</openerp>