Files
odoo_source/addons/mail/views/mail_templates.xml
T
ptr 0f41256009 [ADD] mail,sale,stock,purchase,event,pos: Source document clickable in chatter
PURPOSE:
The source document should be in the chatter and clickable

NEW MAIL TEMPLATE:
mail: new template 'message_origin_link' with clickable link to origin
Variables to pass:
- origin: the record from which the current record had been created
- self: The current record
Optional:
- edit: If true, the record has been modified. Otherwise it has been created
  from the origin

SPECIFICATION:
Source Document is available in following models
1) After creating SO then Sale to Invoice -> Source Document (After creating Sales Order and then clicking on Create invoice)
2) When procurement is created after SO or MO or Order Point(procurement.order) - > Source Document
3) Stock.picking -> Source Document ( After Creating SO or PO)
4) When Manufacturing Order is Created (mrp.production) -> Source Document (Coming after creating a sale order of product)
5) Event -> Attendees(event.registration) -> Source Document
6) Request For Quotation -> Source Document (After creating Purchase Tender, SO)
7) In Purchase Tender(purchase.requisition) -> Source Document (When a new Purchase Tender is Created)
8) After creating PO then create invoice(vendor bill)-> Source Document
9) After creating Invoice from contract (subscription) - > source Document.
10) Refund invoice from Invoice --> Source Document.
11) Return picking from picking --> Source Document.
12) sale use POS to create invoice and picking -->  Source Document.

MESSAGES TO DISPLAY:
-In Customer Invoice, there is a source document of Sale Order.
 "This Invoice has been created from Sale Order(s): SO001, SO002"

-In Procurement, the source document can be either of Sale Order or Manufacturing Order or Order Point.
 "This procurement is created from: SO001 or MO0001 or OP/0001"

-In Stock Picking, the source document can be either of Sale Order or Purchase Order.
 "This transfer has been created from sales order(s): SO001 or PO0001"

-Create new Sales order of manufactured product , there will be Source Document with that Sale Order number
"This production has been created from procurement(s): WH: Stock -> CustomersMTO"

-When registering for Event from website, Sale Order is Created and it is stored in Source Document,
 "The attendee has been created from Sale order: SO001"

-In RFQ, the source document can be either Purchase Tender or Sale Order or Order Point,
 "This purchase order has been created from purchase requisition(s): TE0001 or SO001 or OP/0001"

-In Purchase Tender, the source document can be either of Sale Order/ Manufacturing Order/ Order Point.
 "This Purchase Requisition has been created from: WH: Stock -> CustomersMTO"

-In Vendor bill, there is a source document of Purchase Order.
 "This Vendor bill has been created from Purchase Order(s): PO0001, PO002"

-When creating refund of invoice
 "This customer invoices refund has been created from customer invoices: INV/2016/0001"

-when create invoice and picking form pos.
 "This invoce has been create from point of sale: MainXX"
2016-06-02 15:33:57 +02:00

42 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="assets_backend" name="mail assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/mail/static/src/js/many2many_tags_email.js"></script>
<script type="text/javascript" src="/mail/static/src/js/client_action.js"></script>
<script type="text/javascript" src="/mail/static/src/js/chat_window.js"></script>
<script type="text/javascript" src="/mail/static/src/js/extended_chat_window.js"></script>
<script type="text/javascript" src="/mail/static/src/js/composer.js"></script>
<script type="text/javascript" src="/mail/static/src/js/chat_manager.js"></script>
<script type="text/javascript" src="/mail/static/src/js/chatter.js"></script>
<script type="text/javascript" src="/mail/static/src/js/followers.js"></script>
<script type="text/javascript" src="/mail/static/src/js/thread.js"></script>
<script type="text/javascript" src="/mail/static/src/js/systray.js"></script>
<script type="text/javascript" src="/mail/static/src/js/utils.js"></script>
<script type="text/javascript" src="/mail/static/src/js/window_manager.js"></script>
<link rel="stylesheet" href="/mail/static/src/less/announcement.less"/>
<link rel="stylesheet" href="/mail/static/src/less/client_action.less" type="text/less"/>
<link rel="stylesheet" href="/mail/static/src/less/chat_window.less" type="text/less"/>
<link rel="stylesheet" href="/mail/static/src/less/extended_chat_window.less" type="text/less"/>
<link rel="stylesheet" href="/mail/static/src/less/composer.less" type="text/less"/>
<link rel="stylesheet" href="/mail/static/src/less/chatter.less" type="text/less"/>
<link rel="stylesheet" href="/mail/static/src/less/followers.less" type="text/less"/>
<link rel="stylesheet" href="/mail/static/src/less/thread.less" type="text/less"/>
<link rel="stylesheet" href="/mail/static/src/less/systray.less" type="text/less"/>
</xpath>
</template>
<template id="message_origin_link">
<p>This <t t-esc="self._description.lower()"/> has been <span t-if="edit">modified</span><span t-if="not edit">created</span> from:
<t t-foreach="origin" t-as="o">
<a href="#" t-att-data-oe-model="o._model" t-att-data-oe-id="o.id"> <t t-esc="o.name"/></a><span t-if="origin.ids[-1:] != o.ids">, </span>
</t>
</p>
</template>
</data>
</openerp>