diff options
| author | Foram Katharotiya (OpenERP) <fka@tinyerp.com> | 2012-11-20 14:36:57 +0530 |
|---|---|---|
| committer | Foram Katharotiya (OpenERP) <fka@tinyerp.com> | 2012-11-20 14:36:57 +0530 |
| commit | 0dbf8e7d78cdeecfcd954c8a737cef988f69025e (patch) | |
| tree | 934224c16ab8250726bd1c3e289fba6ab6dffd7e | |
| parent | d9d127403b71d3fd401d3baf37b522b20ba89278 (diff) | |
[IMP] add subtype in account
bzr revid: fka@tinyerp.com-20121120090657-2dhw9kew0425bjjj
| -rw-r--r-- | addons/account/account_invoice.py | 2 | ||||
| -rw-r--r-- | addons/account/data/account_data.xml | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 3e86c4963b7..7579191b11f 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1060,7 +1060,7 @@ class account_invoice(osv.osv): if obj_inv.type in ('out_invoice', 'out_refund'): ctx = self.get_log_context(cr, uid, context=ctx) message = _("Invoice '%s' is validated.") % name - self.message_post(cr, uid, [inv_id], body=message, context=context) + self.message_post(cr, uid, [inv_id], body=message, subtype="account.mt_invoice_validated", context=context) return True def action_cancel(self, cr, uid, ids, *args): diff --git a/addons/account/data/account_data.xml b/addons/account/data/account_data.xml index dd27cfbab4e..2dfef225d70 100644 --- a/addons/account/data/account_data.xml +++ b/addons/account/data/account_data.xml @@ -563,11 +563,16 @@ <!-- mail: subtypes --> <record id="mt_invoice_new" model="mail.message.subtype"> - <field name="name">created</field> + <field name="name">Created</field> <field name="res_model">account.invoice</field> </record> + <record id="mt_invoice_validated" model="mail.message.subtype"> + <field name="name">Validated</field> + <field name="res_model">account.invoice</field> + <field name="default" eval="False"/> + </record> <record id="mt_invoice_paid" model="mail.message.subtype"> - <field name="name">paid</field> + <field name="name">Paid</field> <field name="res_model">account.invoice</field> </record> </data> |
