[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):
|
def create_send_note(self, cr, uid, ids, context=None):
|
||||||
for obj in self.browse(cr, uid, ids, context=context):
|
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):
|
def confirm_paid_send_note(self, cr, uid, ids, context=None):
|
||||||
for obj in self.browse(cr, uid, ids, context=context):
|
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):
|
def invoice_cancel_send_note(self, cr, uid, ids, context=None):
|
||||||
for obj in self.browse(cr, uid, ids, context=context):
|
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)
|
self.message_post(cr, uid, [obj.id], body=_("%s <b>cancelled</b>.") % (self._get_document_type(obj.type)),
|
||||||
account_invoice()
|
context=context)
|
||||||
|
|
||||||
|
|
||||||
class account_invoice_line(osv.osv):
|
class account_invoice_line(osv.osv):
|
||||||
|
|
||||||
|
|
|
@ -560,20 +560,15 @@
|
||||||
<field name="name">Invoice</field>
|
<field name="name">Invoice</field>
|
||||||
<field name="object">account.invoice</field>
|
<field name="object">account.invoice</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="mail.invoice_subtype_new" model="mail.message.subtype">
|
<!-- mail: subtypes -->
|
||||||
<field name="name">new</field>
|
<record id="mail.mt_invoice_new" model="mail.message.subtype">
|
||||||
|
<field name="name">created</field>
|
||||||
<field name="res_model">account.invoice</field>
|
<field name="res_model">account.invoice</field>
|
||||||
<field name="default" eval="False"/>
|
|
||||||
</record>
|
</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="name">paid</field>
|
||||||
<field name="res_model">account.invoice</field>
|
<field name="res_model">account.invoice</field>
|
||||||
</record>
|
</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>
|
</data>
|
||||||
</openerp>
|
</openerp>
|
||||||
|
|
|
@ -1295,17 +1295,17 @@ class account_voucher(osv.osv):
|
||||||
def create_send_note(self, cr, uid, ids, context=None):
|
def create_send_note(self, cr, uid, ids, context=None):
|
||||||
for obj in self.browse(cr, uid, ids, context=context):
|
for obj in self.browse(cr, uid, ids, context=context):
|
||||||
message = "%s <b>created</b>." % self._document_type[obj.type or False]
|
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):
|
def post_send_note(self, cr, uid, ids, context=None):
|
||||||
for obj in self.browse(cr, uid, ids, context=context):
|
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)
|
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):
|
def reconcile_send_note(self, cr, uid, ids, context=None):
|
||||||
for obj in self.browse(cr, uid, ids, context=context):
|
for obj in self.browse(cr, uid, ids, context=context):
|
||||||
message = "%s <b>reconciled</b>." % self._document_type[obj.type or False]
|
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()
|
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>
|
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>
|
<value>Module eInvoicing & Payments has been installed.</value>
|
||||||
</function>
|
</function>
|
||||||
<!-- Message Sub Type -->
|
|
||||||
<record id="mail.voucher_subtype_new" model="mail.message.subtype">
|
<!-- mail: subtypes -->
|
||||||
<field name="name">new</field>
|
<record id="mail.mt_voucher_new" model="mail.message.subtype">
|
||||||
|
<field name="name">created</field>
|
||||||
<field name="res_model">account.voucher</field>
|
<field name="res_model">account.voucher</field>
|
||||||
</record>
|
</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="name">post</field>
|
||||||
<field name="res_model">account.voucher</field>
|
<field name="res_model">account.voucher</field>
|
||||||
<field name="default" eval="False"/>
|
|
||||||
</record>
|
</record>
|
||||||
<record id="mail.voucher_subtype_reconcile" model="mail.message.subtype">
|
<record id="mail.mt_voucher_reconciled" model="mail.message.subtype">
|
||||||
<field name="name">reconcile</field>
|
<field name="name">reconciled</field>
|
||||||
<field name="res_model">account.voucher</field>
|
<field name="res_model">account.voucher</field>
|
||||||
<field name="default" eval="False"/>
|
<field name="default" eval="False"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -281,7 +281,8 @@ class account_analytic_account(osv.osv):
|
||||||
|
|
||||||
def create_send_note(self, cr, uid, ids, context=None):
|
def create_send_note(self, cr, uid, ids, context=None):
|
||||||
for obj in self.browse(cr, uid, ids, context=context):
|
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()
|
account_analytic_account()
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<openerp>
|
<openerp>
|
||||||
<data noupdate="1">
|
<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="name">new</field>
|
||||||
<field name="res_model">account.analytic.account</field>
|
<field name="res_model">account.analytic.account</field>
|
||||||
<field name="default" eval="False"/>
|
|
||||||
</record>
|
</record>
|
||||||
</data>
|
</data>
|
||||||
</openerp>
|
</openerp>
|
|
@ -30,27 +30,18 @@
|
||||||
<field name="start_stop">done</field>
|
<field name="start_stop">done</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- SUBTYPE -->
|
<!-- mail: subtypes -->
|
||||||
<record id="mail.mrp_operations_subtype_new" model="mail.message.subtype">
|
<record id="mail.mt_workcenter_new" model="mail.message.subtype">
|
||||||
<field name="name">new</field>
|
<field name="name">new</field>
|
||||||
<field name="res_model">mrp.production.workcenter.line</field>
|
<field name="res_model">mrp.production.workcenter.line</field>
|
||||||
<field name="default" eval="False"/>
|
<field name="default" eval="False"/>
|
||||||
</record>
|
</record>
|
||||||
<record id="mail.mrp_operations_subtype_started" model="mail.message.subtype">
|
<record id="mail.mt_workcenter_canceled" model="mail.message.subtype">
|
||||||
<field name="name">started</field>
|
<field name="name">canceled</field>
|
||||||
<field name="res_model">mrp.production.workcenter.line</field>
|
<field name="res_model">mrp.production.workcenter.line</field>
|
||||||
<field name="default" eval="False"/>
|
<field name="default" eval="False"/>
|
||||||
</record>
|
</record>
|
||||||
<record id="mail.mrp_operations_subtype_pending" model="mail.message.subtype">
|
<record id="mail.mt_workcenter_closed" 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">
|
|
||||||
<field name="name">closed</field>
|
<field name="name">closed</field>
|
||||||
<field name="res_model">mrp.production.workcenter.line</field>
|
<field name="res_model">mrp.production.workcenter.line</field>
|
||||||
<field name="default" eval="False"/>
|
<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 workorder in self.browse(cr, uid, ids):
|
||||||
for prod in prod_obj.browse(cr, uid, [workorder.production_id]):
|
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)
|
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
|
return True
|
||||||
|
|
||||||
def action_start_send_note(self, cr, uid, ids, context=None):
|
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 workorder in self.browse(cr, uid, ids):
|
||||||
for prod in prod_obj.browse(cr, uid, [workorder.production_id]):
|
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)
|
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
|
return True
|
||||||
|
|
||||||
def action_done_send_note(self, cr, uid, ids, context=None):
|
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 workorder in self.browse(cr, uid, ids):
|
||||||
for prod in prod_obj.browse(cr, uid, [workorder.production_id]):
|
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)
|
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
|
return True
|
||||||
|
|
||||||
def action_pending_send_note(self, cr, uid, ids, context=None):
|
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 workorder in self.browse(cr, uid, ids):
|
||||||
for prod in prod_obj.browse(cr, uid, [workorder.production_id]):
|
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)
|
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
|
return True
|
||||||
|
|
||||||
def action_cancel_send_note(self, cr, uid, ids, context=None):
|
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 workorder in self.browse(cr, uid, ids):
|
||||||
for prod in prod_obj.browse(cr, uid, [workorder.production_id]):
|
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)
|
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
|
return True
|
||||||
|
|
||||||
mrp_production_workcenter_line()
|
mrp_production_workcenter_line()
|
||||||
|
|
Loading…
Reference in New Issue