[CLEAN] mrp_operation, analytic, account, account_voucher: cleaned subtypes.
bzr revid: tde@openerp.com-20120919133540-e0d8huak2g3v915o
This commit is contained in:
parent
b9820db8f0
commit
10458eb098
|
@ -1306,16 +1306,19 @@ class account_invoice(osv.osv):
|
|||
|
||||
def create_send_note(self, cr, uid, ids, context=None):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
self.message_post(cr, uid, [obj.id],body=_("%s <b>created</b>.") % (self._get_document_type(obj.type)), subtype_xml_id="analytic_subtype_new", context=context)
|
||||
self.message_post(cr, uid, [obj.id], body=_("%s <b>created</b>.") % (self._get_document_type(obj.type)),
|
||||
subtype_xml_id="mt_invoice_new", context=context)
|
||||
|
||||
def confirm_paid_send_note(self, cr, uid, ids, context=None):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
self.message_post(cr, uid, [obj.id], body=_("%s <b>paid</b>.") % (self._get_document_type(obj.type)), subtype_xml_id="invoice_subtype_paid", context=context)
|
||||
self.message_post(cr, uid, [obj.id], body=_("%s <b>paid</b>.") % (self._get_document_type(obj.type)),
|
||||
subtype_xml_id="mt_invoice_paid", context=context)
|
||||
|
||||
def invoice_cancel_send_note(self, cr, uid, ids, context=None):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
self.message_post(cr, uid, [obj.id], body=_("%s <b>cancelled</b>.") % (self._get_document_type(obj.type)), subtype_xml_id="invoice_subtype_cancelled", context=context)
|
||||
account_invoice()
|
||||
self.message_post(cr, uid, [obj.id], body=_("%s <b>cancelled</b>.") % (self._get_document_type(obj.type)),
|
||||
context=context)
|
||||
|
||||
|
||||
class account_invoice_line(osv.osv):
|
||||
|
||||
|
|
|
@ -561,19 +561,14 @@
|
|||
<field name="object">account.invoice</field>
|
||||
</record>
|
||||
|
||||
<record id="mail.invoice_subtype_new" model="mail.message.subtype">
|
||||
<field name="name">new</field>
|
||||
<!-- mail: subtypes -->
|
||||
<record id="mail.mt_invoice_new" model="mail.message.subtype">
|
||||
<field name="name">created</field>
|
||||
<field name="res_model">account.invoice</field>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
<record id="mail.invoice_subtype_paid" model="mail.message.subtype">
|
||||
<record id="mail.mt_invoice_paid" model="mail.message.subtype">
|
||||
<field name="name">paid</field>
|
||||
<field name="res_model">account.invoice</field>
|
||||
</record>
|
||||
<record id="mail.invoice_subtype_cancelled" model="mail.message.subtype">
|
||||
<field name="name">cancelled</field>
|
||||
<field name="res_model">account.invoice</field>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1295,17 +1295,17 @@ class account_voucher(osv.osv):
|
|||
def create_send_note(self, cr, uid, ids, context=None):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
message = "%s <b>created</b>." % self._document_type[obj.type or False]
|
||||
self.message_post(cr, uid, [obj.id], body=message, subtype_xml_id="voucher_subtype_new", context=context)
|
||||
self.message_post(cr, uid, [obj.id], body=message, subtype_xml_id="mt_voucher_new", context=context)
|
||||
|
||||
def post_send_note(self, cr, uid, ids, context=None):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
message = "%s '%s' is <b>posted</b>." % (self._document_type[obj.type or False], obj.move_id.name)
|
||||
self.message_post(cr, uid, [obj.id], body=message, subtype_xml_id="voucher_subtype_post", context=context)
|
||||
self.message_post(cr, uid, [obj.id], body=message, subtype_xml_id="mt_voucher_post", context=context)
|
||||
|
||||
def reconcile_send_note(self, cr, uid, ids, context=None):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
message = "%s <b>reconciled</b>." % self._document_type[obj.type or False]
|
||||
self.message_post(cr, uid, [obj.id], body=message, subtype_xml_id="voucher_subtype_reconcile", context=context)
|
||||
self.message_post(cr, uid, [obj.id], body=message, subtype_xml_id="mt_voucher_reconciled", context=context)
|
||||
|
||||
account_voucher()
|
||||
|
||||
|
|
|
@ -12,18 +12,18 @@ You can track customer payments easily and automate the reminders. You get an ov
|
|||
If you want to use advanced accounting features, you should install the "Accounting and Finance" module.</value>
|
||||
<value>Module eInvoicing & Payments has been installed.</value>
|
||||
</function>
|
||||
<!-- Message Sub Type -->
|
||||
<record id="mail.voucher_subtype_new" model="mail.message.subtype">
|
||||
<field name="name">new</field>
|
||||
|
||||
<!-- mail: subtypes -->
|
||||
<record id="mail.mt_voucher_new" model="mail.message.subtype">
|
||||
<field name="name">created</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
</record>
|
||||
<record id="mail.voucher_subtype_post" model="mail.message.subtype">
|
||||
<record id="mail.mt_voucher_post" model="mail.message.subtype">
|
||||
<field name="name">post</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
<record id="mail.voucher_subtype_reconcile" model="mail.message.subtype">
|
||||
<field name="name">reconcile</field>
|
||||
<record id="mail.mt_voucher_reconciled" model="mail.message.subtype">
|
||||
<field name="name">reconciled</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
|
|
|
@ -281,7 +281,8 @@ class account_analytic_account(osv.osv):
|
|||
|
||||
def create_send_note(self, cr, uid, ids, context=None):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
self.message_post(cr, uid, [obj.id], body=_("Contract for <em>%s</em> has been <b>created</b>.") % (obj.partner_id.name), subtype_xml_id="analytic_subtype_new", context=context)
|
||||
self.message_post(cr, uid, [obj.id], body=_("Contract for <em>%s</em> has been <b>created</b>.") % (obj.partner_id.name),
|
||||
subtype_xml_id="mt_account_new", context=context)
|
||||
|
||||
account_analytic_account()
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<record id="mail.analytic_subtype_new" model="mail.message.subtype">
|
||||
|
||||
<!-- mail: subtypes -->
|
||||
<record id="mail.mt_account_new" model="mail.message.subtype">
|
||||
<field name="name">new</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
|
@ -30,27 +30,18 @@
|
|||
<field name="start_stop">done</field>
|
||||
</record>
|
||||
|
||||
<!-- SUBTYPE -->
|
||||
<record id="mail.mrp_operations_subtype_new" model="mail.message.subtype">
|
||||
<!-- mail: subtypes -->
|
||||
<record id="mail.mt_workcenter_new" model="mail.message.subtype">
|
||||
<field name="name">new</field>
|
||||
<field name="res_model">mrp.production.workcenter.line</field>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
<record id="mail.mrp_operations_subtype_started" model="mail.message.subtype">
|
||||
<field name="name">started</field>
|
||||
<record id="mail.mt_workcenter_canceled" model="mail.message.subtype">
|
||||
<field name="name">canceled</field>
|
||||
<field name="res_model">mrp.production.workcenter.line</field>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
<record id="mail.mrp_operations_subtype_pending" model="mail.message.subtype">
|
||||
<field name="name">pending</field>
|
||||
<field name="res_model">mrp.production.workcenter.line</field>
|
||||
</record>
|
||||
<record id="mail.mrp_operations_subtype_cancelled" model="mail.message.subtype">
|
||||
<field name="name">cancelled</field>
|
||||
<field name="res_model">mrp.production.workcenter.line</field>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
<record id="mail.mrp_operations_subtype_closed" model="mail.message.subtype">
|
||||
<record id="mail.mt_workcenter_closed" model="mail.message.subtype">
|
||||
<field name="name">closed</field>
|
||||
<field name="res_model">mrp.production.workcenter.line</field>
|
||||
<field name="default" eval="False"/>
|
||||
|
|
|
@ -224,7 +224,7 @@ class mrp_production_workcenter_line(osv.osv):
|
|||
for workorder in self.browse(cr, uid, ids):
|
||||
for prod in prod_obj.browse(cr, uid, [workorder.production_id]):
|
||||
message = _("Work order has been <b>created</b> for production order <em>%s</em>.") % (prod.id.name)
|
||||
self.message_post(cr, uid, [workorder.id], body=message, subtype_xml_id="mrp_operations_subtype_new", context=context)
|
||||
self.message_post(cr, uid, [workorder.id], body=message, subtype_xml_id="mt_workcenter_new", context=context)
|
||||
return True
|
||||
|
||||
def action_start_send_note(self, cr, uid, ids, context=None):
|
||||
|
@ -232,7 +232,7 @@ class mrp_production_workcenter_line(osv.osv):
|
|||
for workorder in self.browse(cr, uid, ids):
|
||||
for prod in prod_obj.browse(cr, uid, [workorder.production_id]):
|
||||
message = _("Work order has been <b>started</b> for production order <em>%s</em>.") % (prod.id.name)
|
||||
self.message_post(cr, uid, [workorder.id], body=message, subtype_xml_id="mrp_operations_subtype_started", context=context)
|
||||
self.message_post(cr, uid, [workorder.id], body=message, context=context)
|
||||
return True
|
||||
|
||||
def action_done_send_note(self, cr, uid, ids, context=None):
|
||||
|
@ -240,7 +240,7 @@ class mrp_production_workcenter_line(osv.osv):
|
|||
for workorder in self.browse(cr, uid, ids):
|
||||
for prod in prod_obj.browse(cr, uid, [workorder.production_id]):
|
||||
message = _("Work order has been <b>done</b> for production order <em>%s</em>.") % (prod.id.name)
|
||||
self.message_post(cr, uid, [workorder.id], body=message, subtype_xml_id="mrp_operations_subtype_closed", context=context)
|
||||
self.message_post(cr, uid, [workorder.id], body=message, subtype_xml_id="mt_workcenter_closed", context=context)
|
||||
return True
|
||||
|
||||
def action_pending_send_note(self, cr, uid, ids, context=None):
|
||||
|
@ -248,7 +248,7 @@ class mrp_production_workcenter_line(osv.osv):
|
|||
for workorder in self.browse(cr, uid, ids):
|
||||
for prod in prod_obj.browse(cr, uid, [workorder.production_id]):
|
||||
message = _("Work order is <b>pending</b> for production order <em>%s</em>.") % (prod.id.name)
|
||||
self.message_post(cr, uid, [workorder.id], body=message, subtype_xml_id="mrp_operations_subtype_pending", context=context)
|
||||
self.message_post(cr, uid, [workorder.id], body=message, context=context)
|
||||
return True
|
||||
|
||||
def action_cancel_send_note(self, cr, uid, ids, context=None):
|
||||
|
@ -256,7 +256,7 @@ class mrp_production_workcenter_line(osv.osv):
|
|||
for workorder in self.browse(cr, uid, ids):
|
||||
for prod in prod_obj.browse(cr, uid, [workorder.production_id]):
|
||||
message = _("Work order has been <b>cancelled</b> for production order <em>%s</em>.") % (prod.id.name)
|
||||
self.message_post(cr, uid, [workorder.id], body=message, subtype_xml_id="mrp_operations_subtype_cancelled", context=context)
|
||||
self.message_post(cr, uid, [workorder.id], body=message, subtype_xml_id="mt_workcenter_canceled", context=context)
|
||||
return True
|
||||
|
||||
mrp_production_workcenter_line()
|
||||
|
|
Loading…
Reference in New Issue