I have a custom module for cash requisition with various stages of approval line manager,finance manager and management i want to create a email notification whereby when user submits his cash request for approval all the states are notified so that they can take the neccesary action.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kirjanpito
- Varastointi
- PoS
- Project
- MRP
Tämä kysymys on merkitty
1
Vastaa
5811
Näkymät
Hi,
to notify by your custom object:
Make you model inherited from mail.thread. Look for example in sale.order model
Add message_post method in the required method (e.g. in create, or in the button method 'submit').
The example from delivery/modles/stock_picking.py:
@api.multi
def send_to_shipper(self):
self.ensure_one()
res = self.carrier_id.send_shipping(self)[0]
self.carrier_price = res['exact_price']
self.carrier_tracking_ref = res['tracking_number']
order_currency = self.sale_id.currency_id or self.company_id.currency_id
msg = _("Shipment sent to carrier %s for expedition with tracking number %s<br/>Cost: %.2f %s") % (self.carrier_id.name, self.carrier_tracking_ref, self.carrier_price, order_currency.name)
self.message_post(body=msg)
Nautitko keskustelusta? Älä vain lue, vaan osallistu!
Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
RekisteröidyAiheeseen liittyviä artikkeleita | Vastaukset | Näkymät | Toimenpide | |
---|---|---|---|---|
How to disable email notification
Ratkaistu
|
|
3
helmik. 25
|
9266 | |
|
2
syysk. 20
|
4957 | ||
|
2
heinäk. 19
|
4878 | ||
|
5
jouluk. 17
|
9794 | ||
|
1
helmik. 17
|
3879 |