openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #02057
[Merge] lp:~camptocamp/purchase-report/purchase_report_port_vre into lp:purchase-report
Vincent Renaville@camptocamp has proposed merging lp:~camptocamp/purchase-report/purchase_report_port_vre into lp:purchase-report.
Requested reviews:
Purchase Core Editors (purchase-core-editors)
For more details, see:
https://code.launchpad.net/~camptocamp/purchase-report/purchase_report_port_vre/+merge/198563
Port of report for V7
Add purchase condition for header of footer.
Header and footer can be set in the condition tab of purchase_order Form view.
--
https://code.launchpad.net/~camptocamp/purchase-report/purchase_report_port_vre/+merge/198563
Your team Purchase Core Editors is requested to review the proposed merge of lp:~camptocamp/purchase-report/purchase_report_port_vre into lp:purchase-report.
=== modified file 'purchase_order_webkit/__init__.py'
--- purchase_order_webkit/__init__.py 2011-12-20 11:27:12 +0000
+++ purchase_order_webkit/__init__.py 2013-12-11 13:21:21 +0000
@@ -27,4 +27,5 @@
#
##############################################################################
-import report
+from . import report
+from . import purchase_order
=== modified file 'purchase_order_webkit/__openerp__.py'
--- purchase_order_webkit/__openerp__.py 2013-04-18 08:41:12 +0000
+++ purchase_order_webkit/__openerp__.py 2013-12-11 13:21:21 +0000
@@ -32,15 +32,15 @@
'version': '1.0',
'category': 'Reports/Webkit',
'description': """
-Replaces the legacy rml Quotation / Purchase Order report by a brand new webkit report.
+Replaces the legacy rml Quotation / Purchase Order report by
+a brand new webkit report.
""",
'author': 'Camptocamp',
'website': 'http://www.openerp.com',
- 'depends': ['base', 'report_webkit', 'base_headers_webkit', 'purchase',],
- 'init_xml': [],
- 'update_xml': ['purchase_report.xml'],
- 'demo_xml': [],
+ 'depends': ['base', 'report_webkit', 'base_headers_webkit', 'purchase'],
+ 'data': ['purchase_report.xml',
+ 'view/purchase_view.xml'],
'test': [],
- 'installable': False,
- 'active': False,
+ 'installable': True,
+ 'active': True,
}
=== modified file 'purchase_order_webkit/i18n/fr.po'
--- purchase_order_webkit/i18n/fr.po 2011-12-20 11:27:12 +0000
+++ purchase_order_webkit/i18n/fr.po 2013-12-11 13:21:21 +0000
@@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: OpenERP Server 6.0.3\n"
-"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
-"POT-Creation-Date: 2011-12-12 11:14+0000\n"
-"PO-Revision-Date: 2011-12-12 11:14+0000\n"
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-12-11 13:01+0000\n"
+"PO-Revision-Date: 2013-12-11 13:01+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -16,93 +16,167 @@
"Plural-Forms: \n"
#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/request_quotation.mako:76
+#: view:purchase.condition_text:0
+msgid "purchase condition text"
+msgstr "Condition de texte"
+
+#. module: purchase_order_webkit
+#: field:purchase.condition_text,name:0
+msgid "Condition summary"
+msgstr "Résumé des conditions"
+
+#. module: purchase_order_webkit
+#: model:ir.model,name:purchase_order_webkit.model_purchase_condition_text
+msgid "purchase conditions"
+msgstr "Conditions d'achats"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:282
+msgid "Date Req."
+msgstr "Date prévue"
+
+#. module: purchase_order_webkit
+#: view:purchase.order:0
+msgid "Your bottom conditions here"
+msgstr "Vos conditions de bas de page"
+
+#. module: purchase_order_webkit
+#: selection:purchase.condition_text,type:0
+msgid "Top condition"
+msgstr "Conditions d'entête"
+
+#. module: purchase_order_webkit
+#: view:purchase.order:0
+msgid "Conditions"
+msgstr "Conditions"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:328
+msgid "Taxes:"
+msgstr "Taxes:"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:262
+msgid "Your Order Reference"
+msgstr "Votre Référence de commande"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/request_quotation.mako:267
msgid "Expected Date"
msgstr "Date d'échéance"
#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:35
-#: report:addons/purchase_order_webkit/report/request_quotation.mako:30
-msgid "Fax"
-msgstr "Fax"
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:87
-msgid "Net Price"
-msgstr "Prix net"
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:32
-#: report:addons/purchase_order_webkit/report/request_quotation.mako:27
-msgid "Tel"
-msgstr "Tél"
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:82
-#: report:addons/purchase_order_webkit/report/request_quotation.mako:75
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:261
+msgid "Document"
+msgstr "Document"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:280
+#: report:addons/purchase_order_webkit/report/request_quotation.mako:266
msgid "Description"
msgstr "Description"
#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:67
-msgid "Your Order Reference"
-msgstr "Votre Référence Commande"
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:62
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:257
msgid "Purchase Order N°"
msgstr "N° de confirmation du bon de commande"
#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:68
+#: field:purchase.condition_text,type:0
+msgid "type"
+msgstr "type"
+
+#. module: purchase_order_webkit
+#: field:purchase.condition_text,text:0
+msgid "Condition"
+msgstr "Condition"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:284
+msgid "Unit Price"
+msgstr "Prix"
+
+#. module: purchase_order_webkit
+#: view:purchase.order:0
+msgid "Your top conditions here"
+msgstr "Vos conditions d'entête"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:337
+msgid "Total:"
+msgstr "Total:"
+
+#. module: purchase_order_webkit
+#: field:purchase.order,note2:0
+#: field:purchase.order,text_condition2:0
+msgid "Footer"
+msgstr "Bas de page"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:263
msgid "Date Ordered"
msgstr "Date de Commande"
#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:83
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:281
msgid "Taxes"
msgstr "Taxes"
#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:85
-#: report:addons/purchase_order_webkit/report/request_quotation.mako:77
+#: model:ir.model,name:purchase_order_webkit.model_purchase_order
+msgid "Purchase Order"
+msgstr "Bon de commande"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:264
+msgid "Validated by"
+msgstr "Validée par"
+
+#. module: purchase_order_webkit
+#: view:purchase.condition_text:0
+msgid "Purchase condition text"
+msgstr "Conditions d'achat"
+
+#. module: purchase_order_webkit
+#: model:ir.actions.act_window,name:purchase_order_webkit.action_purchase_condition_form_webkit
+#: model:ir.actions.act_window,name:purchase_order_webkit.action_purchase_condition_webkit
+msgid "purchase.condition_text"
+msgstr "purchase.condition_text"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:283
+#: report:addons/purchase_order_webkit/report/request_quotation.mako:268
msgid "Qty"
msgstr "Qté"
#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:38
-#: report:addons/purchase_order_webkit/report/request_quotation.mako:33
-msgid "E-mail"
-msgstr "E-mail"
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:84
-msgid "Date Req."
-msgstr "Date prévue"
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:69
-msgid "Validated by"
-msgstr "Validée par"
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:66
-msgid "Document"
-msgstr "Document"
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:86
-msgid "Unit Price"
-msgstr "Prix"
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:41
-#: report:addons/purchase_order_webkit/report/request_quotation.mako:36
-msgid "VAT"
-msgstr "TVA"
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:62
+#: field:purchase.order,note1:0
+#: field:purchase.order,text_condition1:0
+msgid "Header"
+msgstr "Entête"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:257
msgid "Quotation N°"
msgstr "Demande de prix N°"
+#. module: purchase_order_webkit
+#: selection:purchase.condition_text,type:0
+msgid "Bottom condition"
+msgstr "Conditions de bas de page"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/request_quotation.mako:259
+msgid "Request for Quotation:"
+msgstr "Demande de prix:"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:285
+msgid "Net Price"
+msgstr "Prix net"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:319
+msgid "Net :"
+msgstr "Net :"
+
=== modified file 'purchase_order_webkit/i18n/purchase_order_webkit.pot'
--- purchase_order_webkit/i18n/purchase_order_webkit.pot 2011-12-20 11:27:12 +0000
+++ purchase_order_webkit/i18n/purchase_order_webkit.pot 2013-12-11 13:21:21 +0000
@@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: OpenERP Server 6.0.3\n"
-"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
-"POT-Creation-Date: 2011-12-12 11:14+0000\n"
-"PO-Revision-Date: 2011-12-12 11:14+0000\n"
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-12-11 12:59+0000\n"
+"PO-Revision-Date: 2013-12-11 12:59+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -16,93 +16,167 @@
"Plural-Forms: \n"
#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/request_quotation.mako:76
+#: view:purchase.condition_text:0
+msgid "purchase condition text"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: field:purchase.condition_text,name:0
+msgid "Condition summary"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: model:ir.model,name:purchase_order_webkit.model_purchase_condition_text
+msgid "purchase conditions"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:282
+msgid "Date Req."
+msgstr ""
+
+#. module: purchase_order_webkit
+#: view:purchase.order:0
+msgid "Your bottom conditions here"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: selection:purchase.condition_text,type:0
+msgid "Top condition"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: view:purchase.order:0
+msgid "Conditions"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:328
+msgid "Taxes:"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:262
+msgid "Your Order Reference"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/request_quotation.mako:267
msgid "Expected Date"
msgstr ""
#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:35
-#: report:addons/purchase_order_webkit/report/request_quotation.mako:30
-msgid "Fax"
-msgstr ""
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:87
-msgid "Net Price"
-msgstr ""
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:32
-#: report:addons/purchase_order_webkit/report/request_quotation.mako:27
-msgid "Tel"
-msgstr ""
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:82
-#: report:addons/purchase_order_webkit/report/request_quotation.mako:75
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:261
+msgid "Document"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:280
+#: report:addons/purchase_order_webkit/report/request_quotation.mako:266
msgid "Description"
msgstr ""
#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:67
-msgid "Your Order Reference"
-msgstr ""
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:62
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:257
msgid "Purchase Order N°"
msgstr ""
#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:68
+#: field:purchase.condition_text,type:0
+msgid "type"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: field:purchase.condition_text,text:0
+msgid "Condition"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:284
+msgid "Unit Price"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: view:purchase.order:0
+msgid "Your top conditions here"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:337
+msgid "Total:"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: field:purchase.order,note2:0
+#: field:purchase.order,text_condition2:0
+msgid "Footer"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:263
msgid "Date Ordered"
msgstr ""
#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:83
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:281
msgid "Taxes"
msgstr ""
#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:85
-#: report:addons/purchase_order_webkit/report/request_quotation.mako:77
+#: model:ir.model,name:purchase_order_webkit.model_purchase_order
+msgid "Purchase Order"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:264
+msgid "Validated by"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: view:purchase.condition_text:0
+msgid "Purchase condition text"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: model:ir.actions.act_window,name:purchase_order_webkit.action_purchase_condition_form_webkit
+#: model:ir.actions.act_window,name:purchase_order_webkit.action_purchase_condition_webkit
+msgid "purchase.condition_text"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:283
+#: report:addons/purchase_order_webkit/report/request_quotation.mako:268
msgid "Qty"
msgstr ""
#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:38
-#: report:addons/purchase_order_webkit/report/request_quotation.mako:33
-msgid "E-mail"
-msgstr ""
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:84
-msgid "Date Req."
-msgstr ""
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:69
-msgid "Validated by"
-msgstr ""
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:66
-msgid "Document"
-msgstr ""
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:86
-msgid "Unit Price"
-msgstr ""
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:41
-#: report:addons/purchase_order_webkit/report/request_quotation.mako:36
-msgid "VAT"
-msgstr ""
-
-#. module: purchase_order_webkit
-#: report:addons/purchase_order_webkit/report/purchase_order.mako:62
+#: field:purchase.order,note1:0
+#: field:purchase.order,text_condition1:0
+msgid "Header"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:257
msgid "Quotation N°"
msgstr ""
+#. module: purchase_order_webkit
+#: selection:purchase.condition_text,type:0
+msgid "Bottom condition"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/request_quotation.mako:259
+msgid "Request for Quotation:"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:285
+msgid "Net Price"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:319
+msgid "Net :"
+msgstr ""
+
=== added file 'purchase_order_webkit/purchase_order.py'
--- purchase_order_webkit/purchase_order.py 1970-01-01 00:00:00 +0000
+++ purchase_order_webkit/purchase_order.py 2013-12-11 13:21:21 +0000
@@ -0,0 +1,94 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (c) 2013 Camptocamp SA (http://www.camptocamp.com)
+# @author Vincent Renaville
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+from openerp.osv import orm, fields
+from openerp import netsvc
+
+
+class PurchaseConditionText(orm.Model):
+ """Purchase order Textual information"""
+ _name = "purchase.condition_text"
+ _description = "purchase conditions"
+
+ _columns = {
+ 'name': fields.char('Condition summary', required=True, size=128),
+ 'type': fields.selection([('header', 'Top condition'),
+ ('footer', 'Bottom condition')],
+ 'type', required=True),
+ 'text': fields.html('Condition', translate=True, required=True)}
+
+
+class PurchaseOrder(orm.Model):
+ """Adds condition to Po"""
+
+ _inherit = "purchase.order"
+ _description = 'Purchase Order'
+
+ _columns = {'text_condition1': fields.many2one('purchase.condition_text',
+ 'Header',
+ domain=[('type',
+ '=',
+ 'header')]),
+ 'text_condition2': fields.many2one('purchase.condition_text',
+ 'Footer',
+ domain=[('type',
+ '=',
+ 'footer')]),
+ 'note1': fields.html('Header'),
+ 'note2': fields.html('Footer')}
+
+ def _set_condition(self, cursor, uid, inv_id, commentid, key):
+ """Set the text of the notes in purchases"""
+ if not commentid:
+ return {}
+ try:
+ lang = self.browse(cursor, uid, inv_id)[0].partner_id.lang
+ except Exception as exc:
+ lang = 'en_US'
+ cond = self.pool.get('purchase.condition_text').browse(cursor, uid,
+ commentid,
+ {'lang': lang})
+ import pdb
+ pdb.set_trace()
+ return {'value': {key: cond.text}}
+
+ def set_header(self, cursor, uid, inv_id, commentid):
+ return self._set_condition(cursor, uid, inv_id, commentid, 'note1')
+
+ def set_footer(self, cursor, uid, inv_id, commentid):
+ return self._set_condition(cursor, uid, inv_id, commentid, 'note2')
+
+ def print_quotation(self, cursor, uid, ids, context=None):
+ '''
+ This function prints the purchase order and mark it as sent,
+ so that we can see more easily the next step of the workflow
+ '''
+ assert len(ids) == 1, """This option should only
+ be used for a single id at a time"""
+ wf_service = netsvc.LocalService("workflow")
+ wf_service.trg_validate(uid, 'purchase.order',
+ ids[0], 'send_rfq', cursor)
+ datas = {'model': 'purchase.order',
+ 'ids': ids,
+ 'form': self.read(cursor, uid, ids[0], context=context),
+ }
+ return {'type': 'ir.actions.report.xml',
+ 'report_name': 'purchase.order.webkit',
+ 'datas': datas, 'nodestroy': True}
=== modified file 'purchase_order_webkit/report/purchase_order.mako'
--- purchase_order_webkit/report/purchase_order.mako 2012-08-03 14:03:08 +0000
+++ purchase_order_webkit/report/purchase_order.mako 2013-12-11 13:21:21 +0000
@@ -1,16 +1,240 @@
+## -*- coding: utf-8 -*-
<html>
<head>
<style type="text/css">
${css}
+
+.list_main_table {
+ border:thin solid #E3E4EA;
+ text-align:center;
+ border-collapse: collapse;
+}
+table.list_main_table {
+ margin-top: 20px;
+}
+.list_main_headers {
+ padding: 0;
+}
+.list_main_headers th {
+ border: thin solid #000000;
+ padding-right:3px;
+ padding-left:3px;
+ background-color: #EEEEEE;
+ text-align:center;
+ font-size:12;
+ font-weight:bold;
+}
+.list_main_table td {
+ padding-right:3px;
+ padding-left:3px;
+ padding-top:3px;
+ padding-bottom:3px;
+}
+.list_main_lines,
+.list_main_footers {
+ padding: 0;
+}
+.list_main_footers {
+ padding-top: 15px;
+}
+.list_main_lines td,
+.list_main_footers td,
+.list_main_footers th {
+ border-style: none;
+ text-align:left;
+ font-size:12;
+ padding:0;
+}
+.list_main_footers th {
+ text-align:right;
+}
+
+td .total_empty_cell {
+ width: 77%;
+}
+td .total_sum_cell {
+ width: 13%;
+}
+
+.nobreak {
+ page-break-inside: avoid;
+}
+caption.formatted_note {
+ text-align:left;
+ border-right:thin solid #EEEEEE;
+ border-left:thin solid #EEEEEE;
+ border-top:thin solid #EEEEEE;
+ padding-left:10px;
+ font-size:11;
+ caption-side: bottom;
+}
+caption.formatted_note p {
+ margin: 0;
+}
+
+.main_col1 {
+ width: 40%;
+}
+td.main_col1 {
+ text-align:left;
+}
+.main_col2,
+.main_col3,
+.main_col4,
+.main_col6 {
+ width: 10%;
+}
+.main_col5 {
+ width: 7%;
+}
+td.main_col5 {
+ text-align: center;
+ font-style:italic;
+ font-size: 10;
+}
+.main_col7 {
+ width: 13%;
+}
+
+.list_bank_table {
+ text-align:center;
+ border-collapse: collapse;
+ page-break-inside: avoid;
+ display:table;
+}
+
+.act_as_row {
+ display:table-row;
+}
+.list_bank_table .act_as_thead {
+ background-color: #EEEEEE;
+ text-align:left;
+ font-size:12;
+ font-weight:bold;
+ padding-right:3px;
+ padding-left:3px;
+ white-space:nowrap;
+ background-clip:border-box;
+ display:table-cell;
+}
+.list_bank_table .act_as_cell {
+ text-align:left;
+ font-size:12;
+ padding-right:3px;
+ padding-left:3px;
+ padding-top:3px;
+ padding-bottom:3px;
+ white-space:nowrap;
+ display:table-cell;
+}
+
+
+.list_tax_table {
+}
+.list_tax_table td {
+ text-align:left;
+ font-size:12;
+}
+.list_tax_table th {
+}
+.list_tax_table thead {
+ display:table-header-group;
+}
+
+
+.list_total_table {
+ border:thin solid #E3E4EA;
+ text-align:center;
+ border-collapse: collapse;
+}
+.list_total_table td {
+ border-top : thin solid #EEEEEE;
+ text-align:left;
+ font-size:12;
+ padding-right:3px;
+ padding-left:3px;
+ padding-top:3px;
+ padding-bottom:3px;
+}
+.list_total_table th {
+ background-color: #EEEEEE;
+ border: thin solid #000000;
+ text-align:center;
+ font-size:12;
+ font-weight:bold;
+ padding-right:3px
+ padding-left:3px
+}
+.list_total_table thead {
+ display:table-header-group;
+}
+
+.right_table {
+ right: 4cm;
+ width:"100%";
+}
+
+.std_text {
+ font-size:12;
+}
+
+th.date {
+ width: 90px;
+}
+
+td.amount, th.amount {
+ text-align: right;
+ white-space: nowrap;
+}
+
+td.date {
+ white-space: nowrap;
+ width: 90px;
+}
+
+td.vat {
+ white-space: nowrap;
+}
+.address .recipient {
+ font-size: 12px;
+ margin-left: 350px;
+ margin-right: 120px;
+ float: right;
+}
+
</style>
+
</head>
<body>
<%page expression_filter="entity"/>
- <%
- def carriage_returns(text):
- return text.replace('\n', '<br />')
-
- %>
+
+ <%def name="address(partner, commercial_partner=None)">
+ <%doc>
+ XXX add a helper for address in report_webkit module as this won't be suported in v8.0
+ </%doc>
+ <% company_partner = False %>
+ %if commercial_partner:
+ %if commercial_partner.id != partner.id:
+ <% company_partner = commercial_partner %>
+ %endif
+ %elif partner.parent_id:
+ <% company_partner = partner.parent_id %>
+ %endif
+
+ %if company_partner:
+ <tr><td class="name">${company_partner.name or ''}</td></tr>
+ <tr><td>${partner.title and partner.title.name or ''} ${partner.name}</td></tr>
+ <% address_lines = partner.contact_address.split("\n")[1:] %>
+ %else:
+ <tr><td class="name">${partner.title and partner.title.name or ''} ${partner.name}</td></tr>
+ <% address_lines = partner.contact_address.split("\n") %>
+ %endif
+ %for part in address_lines:
+ % if part:
+ <tr><td>${part}</td></tr>
+ % endif
+ %endfor
+ </%def>
%for purch in objects :
<%
@@ -20,52 +244,24 @@
<% setLang(purch.partner_id.lang) %>
<div class="address">
<table class="recipient">
- <tr><td class="name">${purch.partner_id.title and purch.partner_id.title.name or ''} ${purch.partner_id.name }</td></tr>
- <tr><td>${purch.partner_address_id.street or ''}</td></tr>
- <tr><td>${purch.partner_address_id.street2 or ''}</td></tr>
- <tr><td>${purch.partner_address_id.zip or ''} ${purch.partner_address_id.city or ''}</td></tr>
- %if purch.partner_address_id.country_id :
- <tr><td>${purch.partner_address_id.country_id.name or ''} </td></tr>
- %endif
- %if purch.partner_address_id.phone :
- <tr><td>${_("Tel")}: ${purch.partner_address_id.phone}</td></tr>
- %endif
- %if purch.partner_address_id.fax :
- <tr><td>${_("Fax")}: ${purch.partner_address_id.fax}</td></tr>
- %endif
- %if purch.partner_address_id.email :
- <tr><td>${_("E-mail")}: ${purch.partner_address_id.email}</td></tr>
- %endif
- %if purch.partner_id.vat :
- <tr><td>${_("VAT")}: ${purch.partner_id.vat}</td></tr>
- %endif
+ ${address(partner=purch.partner_id)}
</table>
%if purch.dest_address_id:
<table class="shipping">
- <tr><td class="address_title">${_("Shipping address:")}</td></tr>
- <tr><td>${purch.partner_id.title and purch.partner_id.title.name or ''} ${purch.partner_id.name }</td></tr>
- <tr><td>${purch.dest_address_id.street or ''}</td></tr>
- <tr><td>${purch.dest_address_id.street2 or ''}</td></tr>
- <tr><td>${purch.dest_address_id.zip or ''} ${purch.dest_address_id.city or ''}</td></tr>
- %if purch.dest_address_id.state_id:
- <tr><td>${purch.dest_address_id.state_id.name or ''} </td></tr>
- %endif
- %if purch.dest_address_id.country_id:
- <tr><td>${purch.dest_address_id.country_id.name or ''} </td></tr>
- %endif
+ ${address(partner=purch.dest_address_id)}
</table>
%endif
</div>
<h1 style="clear:both; padding-top: 20px;">${quotation and _(u'Quotation N°') or _(u'Purchase Order N°') } ${purch.name}</h1>
-
+ <p>${purch.note1 or '' | n}</p>
<table class="basic_table" width="100%">
<tr>
- <td>${_("Document")}</td>
- <td>${_("Your Order Reference")}</td>
- <td>${_("Date Ordered")}</td>
- <td>${_("Validated by")}</td>
+ <th>${_("Document")}</th>
+ <th>${_("Your Order Reference")}</th>
+ <th class="date">${_("Date Ordered")}</th>
+ <th>${_("Validated by")}</th>
</tr>
<tr>
<td>${purch.name}</td>
@@ -75,55 +271,83 @@
</tr>
</table>
- <table class="list_table" width="100%" style="margin-top: 30px;">
+ <table class="list_main_table" width="100%" >
<thead>
<tr>
+ <th class="list_main_headers" style="width: 100%">
+ <table style="width:100%">
+ <tr>
<th>${_("Description")}</th>
<th>${_("Taxes")}</th>
- <th>${_("Date Req.")}</th>
+ <th class="date">${_("Date Req.")}</th>
<th class="amount">${_("Qty")}</th>
<th class="amount">${_("Unit Price")}</th>
<th class="amount">${_("Net Price")}</th>
+ </tr>
+ </table>
+ </th>
</tr>
</thead>
<tbody>
%for line in purch.order_line :
- <tr class="line">
+ <tr>
+ <td class="list_main_lines" style="width: 100%">
+ <div class="nobreak">
+ <table style="width:100%">
+ <tr>
<td>${line.name}</td>
<td>${ ', '.join([ tax.name or '' for tax in line.taxes_id ])}</td>
<td>${formatLang(line.date_order, date=True)}</td>
<td class="amount">${line.product_qty} ${line.product_uom.name}</td>
<td class="amount">${formatLang(line.price_unit, digits=get_digits(dp='Purchase Price'))}</td>
<td class="amount">${formatLang(line.price_subtotal, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}</td>
- </tr>
- %if line.notes :
- <tr class="line">
- <td colspan="6" class="note">${line.notes | carriage_returns}</td>
- </tr>
- %endif
- %endfor
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ %endfor
</tbody>
- <tfoot>
- <tr>
- <td colspan="4" style="border-style:none"/>
- <td style="border-top:2px solid"><b>${_("Net Total:")}</b></td>
- <td class="amount" style="border-top:2px solid;">${formatLang(purch.amount_untaxed, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}</td>
- </tr>
- <tr>
- <td colspan="4" style="border-style:none"/>
- <td style="border-style:none"><b>${_("Taxes:")}</b></td>
- <td class="amount">${formatLang(purch.amount_tax, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}</td>
- </tr>
- <tr>
- <td colspan="4" style="border-style:none"/>
- <td style="border-top:2px solid"><b>${_("Total:")}</b></td>
- <td class="amount" style="border-top:2px solid;">${formatLang(purch.amount_total, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}</td>
- </tr>
- </tfoot>
- </table>
-
- <p style="margin-top: 40px;">${purch.notes or '' | carriage_returns}</p>
-
+ <tfoot class="totals">
+ <tr>
+ <td class="list_main_footers" style="width: 100%">
+ <div class="nobreak">
+ <table style="width:100%">
+ <tr>
+ <td class="total_empty_cell"/>
+ <th>
+ ${_("Net :")}
+ </th>
+ <td class="amount total_sum_cell">
+ ${formatLang(purch.amount_untaxed, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}}
+ </td>
+ </tr>
+ <tr>
+ <td class="total_empty_cell"/>
+ <th>
+ ${_("Taxes:")}
+ </th>
+ <td class="amount total_sum_cell">
+ ${formatLang(purch.amount_tax, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}
+ </td>
+ </tr>
+ <tr>
+ <td class="total_empty_cell"/>
+ <th>
+ ${_("Total:")}
+ </th>
+ <td class="amount total_sum_cell">
+ ${formatLang(purch.amount_total, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </tfoot>
+ </table>
+
+ <p>${purch.note2 or '' | n}</p>
<p style="page-break-after:always"/>
<br/>
%endfor
=== modified file 'purchase_order_webkit/report/purchase_order.py'
--- purchase_order_webkit/report/purchase_order.py 2011-12-20 11:27:12 +0000
+++ purchase_order_webkit/report/purchase_order.py 2013-12-11 13:21:21 +0000
@@ -30,16 +30,20 @@
import time
from report import report_sxw
+
class purchase_report_webkit(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
- super(purchase_report_webkit, self).__init__(cr, uid, name, context=context)
+ super(purchase_report_webkit, self).__init__(cr,
+ uid,
+ name,
+ context=context)
self.localcontext.update({
'time': time,
- 'cr':cr,
+ 'cr': cr,
'uid': uid,
})
report_sxw.report_sxw('report.purchase.order.webkit',
- 'purchase.order',
- 'addons/purchase_report_webkit/report/purchase_order.mako',
- parser=purchase_report_webkit)
+ 'purchase.order',
+ 'addons/purchase_report_webkit/report/purchase_order.mako',
+ parser=purchase_report_webkit)
=== modified file 'purchase_order_webkit/report/request_quotation.mako'
--- purchase_order_webkit/report/request_quotation.mako 2012-08-03 14:03:08 +0000
+++ purchase_order_webkit/report/request_quotation.mako 2013-12-11 13:21:21 +0000
@@ -1,11 +1,241 @@
+## -*- coding: utf-8 -*-
<html>
<head>
<style type="text/css">
${css}
+
+.list_main_table {
+ border:thin solid #E3E4EA;
+ text-align:center;
+ border-collapse: collapse;
+}
+table.list_main_table {
+ margin-top: 20px;
+}
+.list_main_headers {
+ padding: 0;
+}
+.list_main_headers th {
+ border: thin solid #000000;
+ padding-right:3px;
+ padding-left:3px;
+ background-color: #EEEEEE;
+ text-align:center;
+ font-size:12;
+ font-weight:bold;
+}
+.list_main_table td {
+ padding-right:3px;
+ padding-left:3px;
+ padding-top:3px;
+ padding-bottom:3px;
+}
+.list_main_lines,
+.list_main_footers {
+ padding: 0;
+}
+.list_main_footers {
+ padding-top: 15px;
+}
+.list_main_lines td,
+.list_main_footers td,
+.list_main_footers th {
+ border-style: none;
+ text-align:left;
+ font-size:12;
+ padding:0;
+}
+.list_main_footers th {
+ text-align:right;
+}
+
+td .total_empty_cell {
+ width: 77%;
+}
+td .total_sum_cell {
+ width: 13%;
+}
+
+.nobreak {
+ page-break-inside: avoid;
+}
+caption.formatted_note {
+ text-align:left;
+ border-right:thin solid #EEEEEE;
+ border-left:thin solid #EEEEEE;
+ border-top:thin solid #EEEEEE;
+ padding-left:10px;
+ font-size:11;
+ caption-side: bottom;
+}
+caption.formatted_note p {
+ margin: 0;
+}
+
+.main_col1 {
+ width: 40%;
+}
+td.main_col1 {
+ text-align:left;
+}
+.main_col2,
+.main_col3,
+.main_col4,
+.main_col6 {
+ width: 10%;
+}
+.main_col5 {
+ width: 7%;
+}
+td.main_col5 {
+ text-align: center;
+ font-style:italic;
+ font-size: 10;
+}
+.main_col7 {
+ width: 13%;
+}
+
+.list_bank_table {
+ text-align:center;
+ border-collapse: collapse;
+ page-break-inside: avoid;
+ display:table;
+}
+
+.act_as_row {
+ display:table-row;
+}
+.list_bank_table .act_as_thead {
+ background-color: #EEEEEE;
+ text-align:left;
+ font-size:12;
+ font-weight:bold;
+ padding-right:3px;
+ padding-left:3px;
+ white-space:nowrap;
+ background-clip:border-box;
+ display:table-cell;
+}
+.list_bank_table .act_as_cell {
+ text-align:left;
+ font-size:12;
+ padding-right:3px;
+ padding-left:3px;
+ padding-top:3px;
+ padding-bottom:3px;
+ white-space:nowrap;
+ display:table-cell;
+}
+
+
+.list_tax_table {
+}
+.list_tax_table td {
+ text-align:left;
+ font-size:12;
+}
+.list_tax_table th {
+}
+.list_tax_table thead {
+ display:table-header-group;
+}
+
+
+.list_total_table {
+ border:thin solid #E3E4EA;
+ text-align:center;
+ border-collapse: collapse;
+}
+.list_total_table td {
+ border-top : thin solid #EEEEEE;
+ text-align:left;
+ font-size:12;
+ padding-right:3px;
+ padding-left:3px;
+ padding-top:3px;
+ padding-bottom:3px;
+}
+.list_total_table th {
+ background-color: #EEEEEE;
+ border: thin solid #000000;
+ text-align:center;
+ font-size:12;
+ font-weight:bold;
+ padding-right:3px
+ padding-left:3px
+}
+.list_total_table thead {
+ display:table-header-group;
+}
+
+.right_table {
+ right: 4cm;
+ width:"100%";
+}
+
+.std_text {
+ font-size:12;
+}
+
+th.date {
+ width: 90px;
+}
+
+td.amount, th.amount {
+ text-align: right;
+ white-space: nowrap;
+}
+
+td.date {
+ white-space: nowrap;
+ width: 90px;
+}
+
+td.vat {
+ white-space: nowrap;
+}
+.address .recipient {
+ font-size: 12px;
+ margin-left: 350px;
+ margin-right: 120px;
+ float: right;
+}
+
</style>
</head>
<body>
<%page expression_filter="entity"/>
+
+ <%def name="address(partner, commercial_partner=None)">
+ <%doc>
+ XXX add a helper for address in report_webkit module as this won't be suported in v8.0
+ </%doc>
+ <% company_partner = False %>
+ %if commercial_partner:
+ %if commercial_partner.id != partner.id:
+ <% company_partner = commercial_partner %>
+ %endif
+ %elif partner.parent_id:
+ <% company_partner = partner.parent_id %>
+ %endif
+
+ %if company_partner:
+ <tr><td class="name">${company_partner.name or ''}</td></tr>
+ <tr><td>${partner.title and partner.title.name or ''} ${partner.name}</td></tr>
+ <% address_lines = partner.contact_address.split("\n")[1:] %>
+ %else:
+ <tr><td class="name">${partner.title and partner.title.name or ''} ${partner.name}</td></tr>
+ <% address_lines = partner.contact_address.split("\n") %>
+ %endif
+ %for part in address_lines:
+ % if part:
+ <tr><td>${part}</td></tr>
+ % endif
+ %endfor
+ </%def>
+
+
<%
def carriage_returns(text):
return text.replace('\n', '<br />')
@@ -16,91 +246,52 @@
<% setLang(purch.partner_id.lang) %>
<div class="address">
<table class="recipient">
- <tr><td class="name">${purch.partner_id.title and purch.partner_id.title.name or ''} ${purch.partner_id.name }</td></tr>
- <tr><td>${purch.partner_address_id.street or ''}</td></tr>
- <tr><td>${purch.partner_address_id.street2 or ''}</td></tr>
- <tr><td>${purch.partner_address_id.zip or ''} ${purch.partner_address_id.city or ''}</td></tr>
- %if purch.partner_address_id.country_id :
- <tr><td>${purch.partner_address_id.country_id.name or ''} </td></tr>
- %endif
- %if purch.partner_address_id.phone :
- <tr><td>${_("Tel")}: ${purch.partner_address_id.phone}</td></tr>
- %endif
- %if purch.partner_address_id.fax :
- <tr><td>${_("Fax")}: ${purch.partner_address_id.fax}</td></tr>
- %endif
- %if purch.partner_address_id.email :
- <tr><td>${_("E-mail")}: ${purch.partner_address_id.email}</td></tr>
- %endif
- %if purch.partner_id.vat :
- <tr><td>${_("VAT")}: ${purch.partner_id.vat}</td></tr>
- %endif
+ ${address(partner=purch.partner_id)}
</table>
- <table class="shipping">
- <tr><td class="address_title">${_("Expected Delivery address:")}</td></tr>
- %if purch.dest_address_id:
- <tr><td>${purch.partner_id.title and purch.partner_id.title.name or ''} ${purch.partner_id.name }</td></tr>
- <tr><td>${purch.dest_address_id.street or ''}</td></tr>
- <tr><td>${purch.dest_address_id.street2 or ''}</td></tr>
- <tr><td>${purch.dest_address_id.zip or ''} ${purch.dest_address_id.city or ''}</td></tr>
- %if purch.dest_address_id.state_id:
- <tr><td>${purch.dest_address_id.state_id.name or ''} </td></tr>
- %endif
- %if purch.dest_address_id.country_id:
- <tr><td>${purch.dest_address_id.country_id.name or ''} </td></tr>
- %endif
- %elif purch.warehouse_id:
- <tr><td>${purch.warehouse_id.name }</td></tr>
- %if purch.warehouse_id.partner_address_id:
- <tr><td>${purch.warehouse_id.partner_address_id.street or ''}</td></tr>
- <tr><td>${purch.warehouse_id.partner_address_id.street2 or ''}</td></tr>
- <tr><td>${purch.warehouse_id.partner_address_id.zip or ''} ${purch.warehouse_id.partner_address_id.city or ''}</td></tr>
- %if purch.warehouse_id.partner_address_id.state_id:
- <tr><td>${purch.warehouse_id.partner_address_id.state_id.name or ''} </td></tr>
- %endif
- %if purch.warehouse_id.partner_address_id.country_id:
- <tr><td>${purch.warehouse_id.partner_address_id.country_id.name or ''} </td></tr>
- %endif
- %endif
- %endif
- </table>
+ %if purch.dest_address_id:
+ <table class="shipping">
+ ${address(partner=purch.dest_address_id)}
+ </table>
+ %endif
</div>
<h1 style="clear:both; padding-top: 20px;">${_("Request for Quotation:")} ${purch.name}</h1>
-
- <table class="list_table" width="100%" style="margin-top: 40px;">
+ <p>${purch.note1 or '' | n}</p>
+ <table class="list_main_table" width="100%" >
<thead>
<tr>
+ <th class="list_main_headers" style="width: 100%">
+ <table style="width:100%">
<th>${_("Description")}</th>
<th>${_("Expected Date")}</th>
<th class="amount">${_("Qty")}</th>
+ </tr>
+ </table>
+ </th>
</tr>
</thead>
<tbody>
- %for line in purch.order_line :
- <tr class="line">
- <td>${line.name}</td>
- <td>${formatLang(line.date_planned, date=True)}</td>
- <td class="amount">${line.product_qty} ${line.product_uom and line.product_uom.name or ''}</td>
- </tr>
- %if line.notes :
- <tr class="line">
- <td colspan="6" class="note">${line.notes | carriage_returns}</td>
- </tr>
- %endif
- %endfor
+ <tr>
+ <td class="list_main_lines" style="width: 100%">
+ <div class="nobreak">
+ <table style="width:100%">
+ <tr>
+ %for line in purch.order_line :
+ <tr class="line">
+ <td>${line.name}</td>
+ <td>${formatLang(line.date_planned, date=True)}</td>
+ <td class="amount">${line.product_qty} ${line.product_uom and line.product_uom.name or ''}</td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ %endfor
</tbody>
</table>
- <p style="margin-top: 20px;">${purch.notes or '' | carriage_returns}</p>
-
- <p style="margin-top: 20px;">
- ${_("Regards,")}
- </p>
-
- <p style="margin-top: 20px;">${user.signature or ''}</p>
-
+ <p>${purch.note1 or '' | n}</p>
<p style="page-break-after:always"/>
<br/>
%endfor
=== modified file 'purchase_order_webkit/report/request_quotation.py'
--- purchase_order_webkit/report/request_quotation.py 2011-12-20 11:27:12 +0000
+++ purchase_order_webkit/report/request_quotation.py 2013-12-11 13:21:21 +0000
@@ -36,11 +36,11 @@
super(request_quotation, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'time': time,
- 'cr':cr,
+ 'cr': cr,
'uid': uid,
})
report_sxw.report_sxw('report.purchase.quotation.webkit',
- 'purchase.order',
- 'addons/purchase_report_webkit/report/request_quotation.mako',
- parser=request_quotation)
+ 'purchase.order',
+ 'addons/purchase_report_webkit/report/request_quotation.mako',
+ parser=request_quotation)
=== added directory 'purchase_order_webkit/view'
=== added file 'purchase_order_webkit/view/purchase_view.xml'
--- purchase_order_webkit/view/purchase_view.xml 1970-01-01 00:00:00 +0000
+++ purchase_order_webkit/view/purchase_view.xml 2013-12-11 13:21:21 +0000
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<openerp>
+ <data>
+ <!-- Sale condition text views -->
+ <record model="ir.ui.view" id="view_purchase_condition_webkit">
+ <field name="name">purchase.condition_text.form</field>
+ <field name="model">purchase.condition_text</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="purchase condition text">
+ <field name="name" select="1"/>
+ <field name="type" select="1"/>
+ <field name="text" colspan="4"/>
+ </form>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="view_purchase_condition_list_webkit">
+ <field name="name">purchase.condition_text.list</field>
+ <field name="model">purchase.condition_text</field>
+ <field name="type">tree</field>
+ <field name="priority" eval="6"/>
+ <field name="arch" type="xml">
+ <tree string="Purchase condition text">
+ <field name="name" select="1"/>
+ <field name="type" select="1"/>
+ <field name="text"/>
+ </tree>
+ </field>
+ </record>
+ <record model="ir.actions.act_window" id="action_purchase_condition_webkit">
+ <field name="name">purchase.condition_text</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">purchase.condition_text</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="view_id" ref="view_purchase_condition_list_webkit"/>
+ </record>
+ <record model="ir.actions.act_window" id="action_purchase_condition_form_webkit">
+ <field name="name">purchase.condition_text</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">purchase.condition_text</field>
+ <field name="view_type">form</field>
+ <field name="view_id" ref="view_purchase_condition_webkit"/>
+ </record>
+
+ <!-- Overwrite of sale order / sale order line form view -->
+
+ <record model="ir.ui.view" id="purchase_order_form_over">
+ <field name="name">purchase.order.form.add.notes</field>
+ <field name="model">purchase.order</field>
+ <field name="inherit_id" ref="purchase.purchase_order_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="//page[@string='Incoming Shipments & Invoices']" position="after">
+ <page string="Conditions">
+ <group>
+ <field name="text_condition1" domain="[('type','=','header')]"
+ on_change="set_header(text_condition1)" colspan="2"/>
+ <field name="text_condition2" domain="[('type','=','footer')]"
+ on_change="set_footer(text_condition2)" colspan="2"/>
+ <field name="note1" colspan="4" nolabel="1" placeholder="Your top conditions here"/>
+ <field name="note2" colspan="4" nolabel="1" placeholder="Your bottom conditions here"/>
+ </group>
+ </page>
+ </xpath>
+ </field>
+ </record>
+
+ </data>
+</openerp>
Follow ups
-
[Merge] lp:~camptocamp/purchase-report/purchase_report_port_vre into lp:purchase-report
From: noreply, 2014-01-17
-
Re: [Merge] lp:~camptocamp/purchase-report/purchase_report_port_vre into lp:purchase-report
From: Guewen Baconnier @ Camptocamp, 2014-01-17
-
Re: [Merge] lp:~camptocamp/purchase-report/purchase_report_port_vre into lp:purchase-report
From: Leonardo Pistone @ camptocamp, 2014-01-17
-
Re: [Merge] lp:~camptocamp/purchase-report/purchase_report_port_vre into lp:purchase-report
From: Leonardo Pistone @ camptocamp, 2014-01-15
-
Re: [Merge] lp:~camptocamp/purchase-report/purchase_report_port_vre into lp:purchase-report
From: Vincent Renaville@camptocamp, 2014-01-15
-
Re: [Merge] lp:~camptocamp/purchase-report/purchase_report_port_vre into lp:purchase-report
From: Romain Deheele - Camptocamp, 2014-01-15
-
Re: [Merge] lp:~camptocamp/purchase-report/purchase_report_port_vre into lp:purchase-report
From: Romain Deheele - Camptocamp, 2014-01-15
-
Re: [Merge] lp:~camptocamp/purchase-report/purchase_report_port_vre into lp:purchase-report
From: Vincent Renaville@camptocamp, 2014-01-14
-
Re: [Merge] lp:~camptocamp/purchase-report/purchase_report_port_vre into lp:purchase-report
From: Vincent Renaville@camptocamp, 2014-01-10
-
Re: [Merge] lp:~camptocamp/purchase-report/purchase_report_port_vre into lp:purchase-report
From: Guewen Baconnier @ Camptocamp, 2014-01-07
-
Re: [Merge] lp:~camptocamp/purchase-report/purchase_report_port_vre into lp:purchase-report
From: Romain Deheele - Camptocamp, 2013-12-19
-
Re: [Merge] lp:~camptocamp/purchase-report/purchase_report_port_vre into lp:purchase-report
From: Guewen Baconnier @ Camptocamp, 2013-12-19