Merge lp:~camptocamp/purchase-report/purchase_report_port_vre into lp:~purchase-core-editors/purchase-report/7.0

Proposed by Vincent Renaville@camptocamp
Status: Merged
Merged at revision: 12
Proposed branch: lp:~camptocamp/purchase-report/purchase_report_port_vre
Merge into: lp:~purchase-core-editors/purchase-report/7.0
Diff against target: 2828 lines (+2130/-417)
20 files modified
purchase_order_webkit/__init__.py (+30/-0)
purchase_order_webkit/__openerp__.py (+46/-0)
purchase_order_webkit/i18n/fr.po (+136/-0)
purchase_order_webkit/i18n/purchase_order_webkit.pot (+137/-0)
purchase_order_webkit/purchase_report.xml (+29/-0)
purchase_order_webkit/report/__init__.py (+28/-0)
purchase_order_webkit/report/purchase_order.mako (+356/-0)
purchase_order_webkit/report/purchase_order.py (+0/-45)
purchase_order_webkit/report/request_quotation.mako (+298/-0)
purchase_order_webkit/report/request_quotation.py (+0/-46)
purchase_order_webkit_with_notes/__init__.py (+2/-1)
purchase_order_webkit_with_notes/__openerp__.py (+12/-10)
purchase_order_webkit_with_notes/i18n/fr.po (+154/-75)
purchase_order_webkit_with_notes/i18n/purchase_order_webkit.pot (+154/-75)
purchase_order_webkit_with_notes/purchase_order.py (+92/-0)
purchase_order_webkit_with_notes/purchase_report.xml (+2/-2)
purchase_order_webkit_with_notes/report/__init__.py (+0/-3)
purchase_order_webkit_with_notes/report/purchase_order.mako (+319/-89)
purchase_order_webkit_with_notes/report/request_quotation.mako (+266/-71)
purchase_order_webkit_with_notes/view/purchase_view.xml (+69/-0)
To merge this branch: bzr merge lp:~camptocamp/purchase-report/purchase_report_port_vre
Reviewer Review Type Date Requested Status
Guewen Baconnier @ Camptocamp Approve
Leonardo Pistone code review Approve
Romain Deheele - Camptocamp (community) code review, tests Approve
Review via email: mp+198563@code.launchpad.net

Description of the change

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.

To post a comment you must log in.
14. By Guewen Baconnier @ Camptocamp

[FIX] fr translation

15. By Guewen Baconnier @ Camptocamp

[FIX] spaces in docstrings, indentation of _columns

16. By Guewen Baconnier @ Camptocamp

[FIX] use cr instead of cursor

17. By Guewen Baconnier @ Camptocamp

[FIX] remove pdb

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

I pushed a few changes.
I don't think the conditions should be added in the base module though.
I think that someone willing to have a simple and basic purchase report with webkit should have all the conditions stuff. I would advocate for an extension module.

review: Abstain
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

> I pushed a few changes.
> I don't think the conditions should be added in the base module though.
> I think that someone willing to have a simple and basic purchase report with
> webkit should have all the conditions stuff. I would advocate for an extension
> module.

Let me explain better, I think we should have:
 - a module with simple purchase report and no changes to the datamodel (the existing one actually)
 - a module extending the purchase report, adding the conditions

Revision history for this message
Romain Deheele - Camptocamp (romaindeheele) wrote :

Hello Guewen,

I agree with you.
But sale_order_webkit is built the same way, and others too (if memory serves me right)
We could approve this now, and migrate all webkit addons with the same way later, at the same moment?

Romain

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

On 12/19/2013 02:46 PM, Romain Deheele - Camptocamp wrote:
> Hello Guewen,
>
> I agree with you.
> But sale_order_webkit is built the same way, and others too (if memory serves me right)
Yes, and I said the same remark a while ago for the sale report and
disagreed to.

> We could approve this now, and migrate all webkit addons with the same way later, at the same moment?

This is another way to say: never.

I put the 'Abstain' review type to not block the merge if people do not
agree with me though

- Guewen

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

In my first comment, you should read: "I think that someone willing to have a simple and basic purchase report with webkit should *not* have all the conditions stuff. I would advocate for an extension module."

18. By Vincent Renaville@camptocamp

[FIX] layout purchase order

19. By Vincent Renaville@camptocamp

[FIX] Report Layout

20. By Vincent Renaville@camptocamp

[FIx] report translation to match new report name

21. By Vincent Renaville@camptocamp

[FIX] layout for request quotation

22. By Vincent Renaville@camptocamp

[FIX] report definitions

23. By Vincent Renaville@camptocamp

[FIX] report path

24. By Vincent Renaville@camptocamp

[ADD] report without notes

25. By Vincent Renaville@camptocamp

[ADD] purchase order without notes

Revision history for this message
Vincent Renaville@camptocamp (vrenaville-c2c) wrote :

Hello,

thanks for the Review !
I agree with Guewen

So I split it in 2 modules :

- purchase_order_webkit : This module add simply purcahse order and quotation in webkit format

- purchase_order_webkit_with_notes : this module add purchase order and quotation in Webkit + note in the footer and the header, it can be configured in the condition tab of the purchase order form.

Vincent

26. By Vincent Renaville@camptocamp

[FIX] some modules rewrtie completely the view, so we switch the search of a specific page in the form, to search for the last page

27. By Vincent Renaville@camptocamp

[FIX] change document to Source Document + change UoM layout

Revision history for this message
Vincent Renaville@camptocamp (vrenaville-c2c) wrote :

Hello,

I have fix the report and slip in into 2 modules , As explained.

Vincent

28. By Vincent Renaville@camptocamp

[FIX] ADD space if origin is not set

Revision history for this message
Romain Deheele - Camptocamp (romaindeheele) wrote :

Hello Vincent,

The 2 addons are installed on the database creation because of active:"True".
I propose to set False.

Thanks for your work,

Romain

review: Needs Fixing (code review, test)
29. By Romain Deheele - Camptocamp

[FIX] set active to False on 2 modules : to avoid automatic install

Revision history for this message
Romain Deheele - Camptocamp (romaindeheele) :
review: Approve (code review, tests)
Revision history for this message
Vincent Renaville@camptocamp (vrenaville-c2c) wrote :

Hello

Thanks for the review and the fix, I missed the case.

Vincent

Revision history for this message
Leonardo Pistone (lepistone) wrote :

Vincent, Guewen, Romain:

I suggest having an explanation for the split in the 'description' in the two __openerp__.py.

Again in the __openerp__.py, the website and copyright year could be www.camptocamp.com, 2014.

Otherwise, good, thanks

review: Needs Fixing (code review)
30. By Vincent Renaville@camptocamp

[FIX] change date and website in module description

31. By Vincent Renaville@camptocamp

[FIX] improve description

Revision history for this message
Leonardo Pistone (lepistone) wrote :

Thanks for the changes Vincent.

review: Approve (code review)
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'purchase_order_webkit'
=== added file 'purchase_order_webkit/__init__.py'
--- purchase_order_webkit/__init__.py 1970-01-01 00:00:00 +0000
+++ purchase_order_webkit/__init__.py 2014-01-17 15:12:05 +0000
@@ -0,0 +1,30 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com)
5# @author Guewen Baconnier
6#
7# WARNING: This program as such is intended to be used by professional
8# programmers who take the whole responsability of assessing all potential
9# consequences resulting from its eventual inadequacies and bugs
10# End users who are looking for a ready-to-use solution with commercial
11# garantees and support are strongly adviced to contract a Free Software
12# Service Company
13#
14# This program is Free Software; you can redistribute it and/or
15# modify it under the terms of the GNU General Public License
16# as published by the Free Software Foundation; either version 2
17# of the License, or (at your option) any later version.
18#
19# This program is distributed in the hope that it will be useful,
20# but WITHOUT ANY WARRANTY; without even the implied warranty of
21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22# GNU General Public License for more details.
23#
24# You should have received a copy of the GNU General Public License
25# along with this program; if not, write to the Free Software
26# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27#
28##############################################################################
29
30from . import report
0\ No newline at end of file31\ No newline at end of file
132
=== added file 'purchase_order_webkit/__openerp__.py'
--- purchase_order_webkit/__openerp__.py 1970-01-01 00:00:00 +0000
+++ purchase_order_webkit/__openerp__.py 2014-01-17 15:12:05 +0000
@@ -0,0 +1,46 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (c) 2014 Camptocamp SA (http://www.camptocamp.com)
5# @author Guewen Baconnier Vincent Renaville
6#
7# WARNING: This program as such is intended to be used by professional
8# programmers who take the whole responsability of assessing all potential
9# consequences resulting from its eventual inadequacies and bugs
10# End users who are looking for a ready-to-use solution with commercial
11# garantees and support are strongly adviced to contract a Free Software
12# Service Company
13#
14# This program is Free Software; you can redistribute it and/or
15# modify it under the terms of the GNU General Public License
16# as published by the Free Software Foundation; either version 2
17# of the License, or (at your option) any later version.
18#
19# This program is distributed in the hope that it will be useful,
20# but WITHOUT ANY WARRANTY; without even the implied warranty of
21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22# GNU General Public License for more details.
23#
24# You should have received a copy of the GNU General Public License
25# along with this program; if not, write to the Free Software
26# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27#
28##############################################################################
29
30{
31 'name': 'Purchase Order Report using Webkit Library',
32 'version': '1.0',
33 'category': 'Reports/Webkit',
34 'description': """
35Replaces the legacy rml Quotation / Purchase Order report by
36a brand new webkit report.
37It's the same report as purchase_report_webkit_with_notes, but without header and footer notes
38 """,
39 'author': 'Camptocamp',
40 'website': 'http://www.camptocamp.com',
41 'depends': ['base', 'report_webkit', 'base_headers_webkit', 'purchase'],
42 'data': ['purchase_report.xml'],
43 'test': [],
44 'installable': True,
45 'active': False,
46}
047
=== added directory 'purchase_order_webkit/i18n'
=== added file 'purchase_order_webkit/i18n/fr.po'
--- purchase_order_webkit/i18n/fr.po 1970-01-01 00:00:00 +0000
+++ purchase_order_webkit/i18n/fr.po 2014-01-17 15:12:05 +0000
@@ -0,0 +1,136 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * purchase_order_webkit
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 7.0\n"
8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2013-12-11 13:01+0000\n"
10"PO-Revision-Date: 2013-12-11 13:01+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: purchase_order_webkit
19#: model:ir.model,name:purchase_order_webkit.model_purchase_condition_text
20msgid "purchase conditions"
21msgstr "Conditions d'achats"
22
23#. module: purchase_order_webkit
24#: report:addons/purchase_order_webkit/report/purchase_order.mako:282
25msgid "Date Req."
26msgstr "Date prévue"
27
28#. module: purchase_order_webkit
29#: selection:purchase.condition_text,type:0
30msgid "Top condition"
31msgstr "Conditions d'entête"
32
33#. module: purchase_order_webkit
34#: report:addons/purchase_order_webkit/report/purchase_order.mako:328
35msgid "Taxes:"
36msgstr "Taxes :"
37
38#. module: purchase_order_webkit
39#: report:addons/purchase_order_webkit/report/purchase_order.mako:262
40msgid "Your Order Reference"
41msgstr "Votre Référence de commande"
42
43#. module: purchase_order_webkit
44#: report:addons/purchase_order_webkit/report/request_quotation.mako:267
45msgid "Expected Date"
46msgstr "Date d'échéance"
47
48#. module: purchase_order_webkit
49#: report:addons/purchase_order_webkit/report/purchase_order.mako:261
50msgid "Source Document"
51msgstr "Document d'origine"
52
53#. module: purchase_order_webkit
54#: report:addons/purchase_order_webkit/report/purchase_order.mako:280
55#: report:addons/purchase_order_webkit/report/request_quotation.mako:266
56msgid "Description"
57msgstr "Description"
58
59#. module: purchase_order_webkit
60#: report:addons/purchase_order_webkit/report/purchase_order.mako:257
61msgid "Purchase Order N°"
62msgstr "N° de confirmation du bon de commande"
63
64
65#. module: purchase_order_webkit
66#: report:addons/purchase_order_webkit/report/purchase_order.mako:284
67msgid "Unit Price"
68msgstr "Prix"
69
70#. module: purchase_order_webkit
71#: report:addons/purchase_order_webkit/report/purchase_order.mako:288
72msgid "UoM"
73msgstr "UdM"
74
75#. module: purchase_order_webkit
76#: report:addons/purchase_order_webkit/report/purchase_order.mako:337
77msgid "Total:"
78msgstr "Total :"
79
80#. module: purchase_order_webkit
81#: report:addons/purchase_order_webkit/report/purchase_order.mako:263
82msgid "Date Ordered"
83msgstr "Date de Commande"
84
85#. module: purchase_order_webkit
86#: report:addons/purchase_order_webkit/report/purchase_order.mako:281
87msgid "Taxes"
88msgstr "Taxes"
89
90#. module: purchase_order_webkit
91#: model:ir.model,name:purchase_order_webkit.model_purchase_order
92msgid "Purchase Order"
93msgstr "Bon de commande"
94
95#. module: purchase_order_webkit
96#: report:addons/purchase_order_webkit/report/purchase_order.mako:264
97msgid "Validated by"
98msgstr "Validée par"
99
100#. module: purchase_order_webkit
101#: model:ir.actions.act_window,name:purchase_order_webkit.action_purchase_condition_form_webkit
102#: model:ir.actions.act_window,name:purchase_order_webkit.action_purchase_condition_webkit
103msgid "purchase.condition_text"
104msgstr "purchase.condition_text"
105
106#. module: purchase_order_webkit
107#: report:addons/purchase_order_webkit/report/purchase_order.mako:283
108#: report:addons/purchase_order_webkit/report/request_quotation.mako:268
109msgid "Qty"
110msgstr "Qté"
111
112#. module: purchase_order_webkit
113#: report:addons/purchase_order_webkit/report/purchase_order.mako:257
114msgid "Quotation N°"
115msgstr "Demande de prix N°"
116
117#. module: purchase_order_webkit
118#: selection:purchase.condition_text,type:0
119msgid "Bottom condition"
120msgstr "Conditions de bas de page"
121
122#. module: purchase_order_webkit
123#: report:addons/purchase_order_webkit/report/request_quotation.mako:259
124msgid "Request for Quotation:"
125msgstr "Demande de prix :"
126
127#. module: purchase_order_webkit
128#: report:addons/purchase_order_webkit/report/purchase_order.mako:285
129msgid "Net Price"
130msgstr "Prix net"
131
132#. module: purchase_order_webkit
133#: report:addons/purchase_order_webkit/report/purchase_order.mako:319
134msgid "Net :"
135msgstr "Net :"
136
0137
=== added file 'purchase_order_webkit/i18n/purchase_order_webkit.pot'
--- purchase_order_webkit/i18n/purchase_order_webkit.pot 1970-01-01 00:00:00 +0000
+++ purchase_order_webkit/i18n/purchase_order_webkit.pot 2014-01-17 15:12:05 +0000
@@ -0,0 +1,137 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * purchase_order_webkit
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 7.0\n"
8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2013-12-11 12:59+0000\n"
10"PO-Revision-Date: 2013-12-11 12:59+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18
19#. module: purchase_order_webkit
20#: model:ir.model,name:purchase_order_webkit.model_purchase_condition_text
21msgid "purchase conditions"
22msgstr ""
23
24#. module: purchase_order_webkit
25#: report:addons/purchase_order_webkit/report/purchase_order.mako:282
26msgid "Date Req."
27msgstr ""
28
29#. module: purchase_order_webkit
30#: selection:purchase.condition_text,type:0
31msgid "Top condition"
32msgstr ""
33
34#. module: purchase_order_webkit
35#: report:addons/purchase_order_webkit/report/purchase_order.mako:328
36msgid "Taxes:"
37msgstr ""
38
39#. module: purchase_order_webkit
40#: report:addons/purchase_order_webkit/report/purchase_order.mako:262
41msgid "Your Order Reference"
42msgstr ""
43
44#. module: purchase_order_webkit
45#: report:addons/purchase_order_webkit/report/request_quotation.mako:267
46msgid "Expected Date"
47msgstr ""
48
49#. module: purchase_order_webkit
50#: report:addons/purchase_order_webkit/report/purchase_order.mako:261
51msgid "Source Document"
52msgstr ""
53
54#. module: purchase_order_webkit
55#: report:addons/purchase_order_webkit/report/purchase_order.mako:280
56#: report:addons/purchase_order_webkit/report/request_quotation.mako:266
57msgid "Description"
58msgstr ""
59
60#. module: purchase_order_webkit
61#: report:addons/purchase_order_webkit/report/purchase_order.mako:257
62msgid "Purchase Order N°"
63msgstr ""
64
65#. module: purchase_order_webkit
66#: report:addons/purchase_order_webkit/report/purchase_order.mako:284
67msgid "Unit Price"
68msgstr ""
69
70#. module: purchase_order_webkit
71#: report:addons/purchase_order_webkit/report/purchase_order.mako:288
72msgid "UoM"
73msgstr "UdM"
74
75
76#. module: purchase_order_webkit
77#: report:addons/purchase_order_webkit/report/purchase_order.mako:337
78msgid "Total:"
79msgstr ""
80
81#. module: purchase_order_webkit
82#: report:addons/purchase_order_webkit/report/purchase_order.mako:263
83msgid "Date Ordered"
84msgstr ""
85
86#. module: purchase_order_webkit
87#: report:addons/purchase_order_webkit/report/purchase_order.mako:281
88msgid "Taxes"
89msgstr ""
90
91#. module: purchase_order_webkit
92#: model:ir.model,name:purchase_order_webkit.model_purchase_order
93msgid "Purchase Order"
94msgstr ""
95
96#. module: purchase_order_webkit
97#: report:addons/purchase_order_webkit/report/purchase_order.mako:264
98msgid "Validated by"
99msgstr ""
100
101#. module: purchase_order_webkit
102#: model:ir.actions.act_window,name:purchase_order_webkit.action_purchase_condition_form_webkit
103#: model:ir.actions.act_window,name:purchase_order_webkit.action_purchase_condition_webkit
104msgid "purchase.condition_text"
105msgstr ""
106
107#. module: purchase_order_webkit
108#: report:addons/purchase_order_webkit/report/purchase_order.mako:283
109#: report:addons/purchase_order_webkit/report/request_quotation.mako:268
110msgid "Qty"
111msgstr ""
112
113#. module: purchase_order_webkit
114#: report:addons/purchase_order_webkit/report/purchase_order.mako:257
115msgid "Quotation N°"
116msgstr ""
117
118#. module: purchase_order_webkit
119#: selection:purchase.condition_text,type:0
120msgid "Bottom condition"
121msgstr ""
122
123#. module: purchase_order_webkit
124#: report:addons/purchase_order_webkit/report/request_quotation.mako:259
125msgid "Request for Quotation:"
126msgstr ""
127
128#. module: purchase_order_webkit
129#: report:addons/purchase_order_webkit/report/purchase_order.mako:285
130msgid "Net Price"
131msgstr ""
132
133#. module: purchase_order_webkit
134#: report:addons/purchase_order_webkit/report/purchase_order.mako:319
135msgid "Net :"
136msgstr ""
137
0138
=== added file 'purchase_order_webkit/purchase_report.xml'
--- purchase_order_webkit/purchase_report.xml 1970-01-01 00:00:00 +0000
+++ purchase_order_webkit/purchase_report.xml 2014-01-17 15:12:05 +0000
@@ -0,0 +1,29 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4 <report id="purchase.report_purchase_order"
5 name="purchase.order.webkit"
6 auto="False"
7 model="purchase.order"
8 file="purchase_order_webkit/report/purchase_order.mako"
9 string="Purchase Order"
10 report_type="webkit" />
11
12 <record id="purchase.report_purchase_order" model="ir.actions.report.xml">
13 <field name="webkit_header" ref="base_headers_webkit.base_reports_portrait_header"/>
14 </record>
15
16 <report id="purchase.report_purchase_quotation"
17 name="purchase.quotation.webkit"
18 auto="False"
19 model="purchase.order"
20 file="purchase_order_webkit/report/request_quotation.mako"
21 string="Request for Quotation"
22 report_type="webkit" />
23
24 <record id="purchase.report_purchase_quotation" model="ir.actions.report.xml">
25 <field name="webkit_header" ref="base_headers_webkit.base_reports_portrait_header"/>
26 </record>
27
28 </data>
29</openerp>
030
=== added directory 'purchase_order_webkit/report'
=== added file 'purchase_order_webkit/report/__init__.py'
--- purchase_order_webkit/report/__init__.py 1970-01-01 00:00:00 +0000
+++ purchase_order_webkit/report/__init__.py 2014-01-17 15:12:05 +0000
@@ -0,0 +1,28 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com)
5# @author Guewen Baconnier
6#
7# WARNING: This program as such is intended to be used by professional
8# programmers who take the whole responsability of assessing all potential
9# consequences resulting from its eventual inadequacies and bugs
10# End users who are looking for a ready-to-use solution with commercial
11# garantees and support are strongly adviced to contract a Free Software
12# Service Company
13#
14# This program is Free Software; you can redistribute it and/or
15# modify it under the terms of the GNU General Public License
16# as published by the Free Software Foundation; either version 2
17# of the License, or (at your option) any later version.
18#
19# This program is distributed in the hope that it will be useful,
20# but WITHOUT ANY WARRANTY; without even the implied warranty of
21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22# GNU General Public License for more details.
23#
24# You should have received a copy of the GNU General Public License
25# along with this program; if not, write to the Free Software
26# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27#
28##############################################################################
029
=== added file 'purchase_order_webkit/report/purchase_order.mako'
--- purchase_order_webkit/report/purchase_order.mako 1970-01-01 00:00:00 +0000
+++ purchase_order_webkit/report/purchase_order.mako 2014-01-17 15:12:05 +0000
@@ -0,0 +1,356 @@
1## -*- coding: utf-8 -*-
2<html>
3<head>
4 <style type="text/css">
5 ${css}
6
7.list_main_table {
8border:thin solid #E3E4EA;
9text-align:center;
10border-collapse: collapse;
11}
12table.list_main_table {
13 margin-top: 20px;
14}
15.list_main_headers {
16 padding: 0;
17}
18.list_main_headers th {
19 border: thin solid #000000;
20 padding-right:3px;
21 padding-left:3px;
22 background-color: #EEEEEE;
23 text-align:center;
24 font-size:12;
25 font-weight:bold;
26}
27.list_main_table td {
28 padding-right:3px;
29 padding-left:3px;
30 padding-top:3px;
31 padding-bottom:3px;
32}
33.list_main_lines,
34.list_main_footers {
35 padding: 0;
36}
37.list_main_footers {
38 padding-top: 15px;
39}
40.list_main_lines td,
41.list_main_footers td,
42.list_main_footers th {
43 border-style: none;
44 text-align:left;
45 font-size:12;
46 padding:0;
47}
48.list_main_footers th {
49 text-align:right;
50}
51
52td .total_empty_cell {
53 width: 77%;
54}
55td .total_sum_cell {
56 width: 13%;
57}
58
59.nobreak {
60 page-break-inside: avoid;
61}
62caption.formatted_note {
63 text-align:left;
64 border-right:thin solid #EEEEEE;
65 border-left:thin solid #EEEEEE;
66 border-top:thin solid #EEEEEE;
67 padding-left:10px;
68 font-size:11;
69 caption-side: bottom;
70}
71caption.formatted_note p {
72 margin: 0;
73}
74.list_bank_table {
75 text-align:center;
76 border-collapse: collapse;
77 page-break-inside: avoid;
78 display:table;
79}
80
81.act_as_row {
82 display:table-row;
83}
84.list_bank_table .act_as_thead {
85 background-color: #EEEEEE;
86 text-align:left;
87 font-size:12;
88 font-weight:bold;
89 padding-right:3px;
90 padding-left:3px;
91 white-space:nowrap;
92 background-clip:border-box;
93 display:table-cell;
94}
95.list_bank_table .act_as_cell {
96 text-align:left;
97 font-size:12;
98 padding-right:3px;
99 padding-left:3px;
100 padding-top:3px;
101 padding-bottom:3px;
102 white-space:nowrap;
103 display:table-cell;
104}
105
106
107.list_tax_table {
108}
109.list_tax_table td {
110 text-align:left;
111 font-size:12;
112}
113.list_tax_table th {
114}
115.list_tax_table thead {
116 display:table-header-group;
117}
118
119
120.list_total_table {
121 border:thin solid #E3E4EA;
122 text-align:center;
123 border-collapse: collapse;
124}
125.list_total_table td {
126 border-top : thin solid #EEEEEE;
127 text-align:left;
128 font-size:12;
129 padding-right:3px;
130 padding-left:3px;
131 padding-top:3px;
132 padding-bottom:3px;
133}
134.list_total_table th {
135 background-color: #EEEEEE;
136 border: thin solid #000000;
137 text-align:center;
138 font-size:12;
139 font-weight:bold;
140 padding-right:3px
141 padding-left:3px
142}
143.list_total_table thead {
144 display:table-header-group;
145}
146
147.right_table {
148 right: 4cm;
149 width:"100%";
150}
151
152.std_text {
153 font-size:12;
154}
155
156
157td.amount, th.amount {
158 text-align: right;
159 white-space: nowrap;
160}
161
162td.date {
163 white-space: nowrap;
164 width: 90px;
165}
166
167td.vat {
168 white-space: nowrap;
169}
170.address .recipient {
171 font-size: 12px;
172 margin-left: 350px;
173 margin-right: 120px;
174 float: right;
175}
176
177.main_col1 {
178 width: 40%;
179}
180td.main_col1 {
181 text-align:left;
182}
183.main_col2 {
184 width: 10%;
185}
186.main_col3 {
187 width: 10%;
188 text-align:center;
189}
190.main_col6 {
191 width: 10%;
192}
193.main_col4 {
194 width: 10%;
195 text-align:right;
196}
197.main_col5 {
198 width: 7%;
199 text-align:left;
200}
201.main_col7 {
202 width: 13%;
203}
204
205
206 </style>
207
208</head>
209<body>
210 <%page expression_filter="entity"/>
211
212 <%def name="address(partner, commercial_partner=None)">
213 <%doc>
214 XXX add a helper for address in report_webkit module as this won't be suported in v8.0
215 </%doc>
216 <% company_partner = False %>
217 %if commercial_partner:
218 %if commercial_partner.id != partner.id:
219 <% company_partner = commercial_partner %>
220 %endif
221 %elif partner.parent_id:
222 <% company_partner = partner.parent_id %>
223 %endif
224
225 %if company_partner:
226 <tr><td class="name">${company_partner.name or ''}</td></tr>
227 <tr><td>${partner.title and partner.title.name or ''} ${partner.name}</td></tr>
228 <% address_lines = partner.contact_address.split("\n")[1:] %>
229 %else:
230 <tr><td class="name">${partner.title and partner.title.name or ''} ${partner.name}</td></tr>
231 <% address_lines = partner.contact_address.split("\n") %>
232 %endif
233 %for part in address_lines:
234 % if part:
235 <tr><td>${part}</td></tr>
236 % endif
237 %endfor
238 </%def>
239
240 %for purch in objects :
241 <%
242 quotation = purch.state == 'draft'
243 %>
244
245 <% setLang(purch.partner_id.lang) %>
246 <div class="address">
247 <table class="recipient">
248 ${address(partner=purch.partner_id)}
249 </table>
250
251 %if purch.dest_address_id:
252 <table class="shipping">
253 ${address(partner=purch.dest_address_id)}
254 </table>
255 %endif
256 </div>
257
258 <h3 style="clear: both; padding-top: 20px;">
259 ${quotation and _(u'Quotation N°') or _(u'Purchase Order N°') } ${purch.name}
260 </h3>
261 <table class="basic_table" width="100%">
262 <tr>
263 <th>${_("Source Document")}</th>
264 <th style="text-align:center">${_("Your Order Reference")}</th>
265 <th class="date">${_("Date Ordered")}</th>
266 <th style="text-align:center">${_("Validated by")}</th>
267 </tr>
268 <tr>
269 <td>${purch.origin or ''}</td>
270 <td style="text-align:center">${purch.partner_ref or ''}</td>
271 <td class="date">${formatLang(purch.date_order, date=True)}</td>
272 <td style="text-align:center">${purch.validator and purch.validator.name or '' }</td>
273 </tr>
274 </table>
275 <table class="list_main_table" width="100%" >
276 <thead>
277 <tr>
278 <th class="list_main_headers" style="width: 100%">
279 <table style="width:100%">
280 <tr>
281 <th class="main_col1">${_("Description")}</th>
282 <th class="main_col2">${_("Taxes")}</th>
283 <th class="main_col3">${_("Date Req.")}</th>
284 <th style="text-align:center" class="amount main_col4">${_("Qty")}</th>
285 <th class="main_col5">${_("UoM")}</th>
286 <th class="amount main_col6">${_("Unit Price")}</th>
287 <th class="amount main_col7">${_("Net Price")}</th>
288 </tr>
289 </table>
290 </th>
291 </tr>
292 </thead>
293 <tbody>
294 %for line in purch.order_line :
295 <tr>
296 <td class="list_main_lines" style="width: 100%">
297 <div class="nobreak">
298 <table style="width:100%">
299 <tr>
300 <td class="main_col1">${line.name}</td>
301 <td style="text-align:center" class="main_col2">${ ', '.join([ tax.name or '' for tax in line.taxes_id ])}</td>
302 <td style="text-align:center" class="main_col3">${formatLang(line.date_order, date=True)}</td>
303 <td class="amount main_col4">${line.product_qty}</td>
304 <td class="main_col5">${line.product_uom.name}</td>
305 <td class="amount main col6">${formatLang(line.price_unit, digits=get_digits(dp='Purchase Price'))}</td>
306 <td class="amount main_col7">${formatLang(line.price_subtotal, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}</td>
307 </tr>
308 </table>
309 </div>
310 </td>
311 </tr>
312 %endfor
313 </tbody>
314 <tfoot class="totals">
315 <tr>
316 <td class="list_main_footers" style="width: 100%">
317 <div class="nobreak">
318 <table style="width:100%">
319 <tr>
320 <td class="total_empty_cell"/>
321 <th>
322 ${_("Net :")}
323 </th>
324 <td class="amount total_sum_cell">
325 ${formatLang(purch.amount_untaxed, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}
326 </td>
327 </tr>
328 <tr>
329 <td class="total_empty_cell"/>
330 <th>
331 ${_("Taxes:")}
332 </th>
333 <td class="amount total_sum_cell">
334 ${formatLang(purch.amount_tax, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}
335 </td>
336 </tr>
337 <tr>
338 <td class="total_empty_cell"/>
339 <th>
340 ${_("Total:")}
341 </th>
342 <td class="amount total_sum_cell">
343 ${formatLang(purch.amount_total, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}
344 </td>
345 </tr>
346 </table>
347 </div>
348 </td>
349 </tr>
350 </tfoot>
351 </table>
352 <p style="page-break-after:always"/>
353 <br/>
354 %endfor
355</body>
356</html>
0357
=== removed 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 1970-01-01 00:00:00 +0000
@@ -1,45 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com)
5# @author Guewen Baconnier
6#
7# WARNING: This program as such is intended to be used by professional
8# programmers who take the whole responsability of assessing all potential
9# consequences resulting from its eventual inadequacies and bugs
10# End users who are looking for a ready-to-use solution with commercial
11# garantees and support are strongly adviced to contract a Free Software
12# Service Company
13#
14# This program is Free Software; you can redistribute it and/or
15# modify it under the terms of the GNU General Public License
16# as published by the Free Software Foundation; either version 2
17# of the License, or (at your option) any later version.
18#
19# This program is distributed in the hope that it will be useful,
20# but WITHOUT ANY WARRANTY; without even the implied warranty of
21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22# GNU General Public License for more details.
23#
24# You should have received a copy of the GNU General Public License
25# along with this program; if not, write to the Free Software
26# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27#
28##############################################################################
29
30import time
31from report import report_sxw
32
33class purchase_report_webkit(report_sxw.rml_parse):
34 def __init__(self, cr, uid, name, context):
35 super(purchase_report_webkit, self).__init__(cr, uid, name, context=context)
36 self.localcontext.update({
37 'time': time,
38 'cr':cr,
39 'uid': uid,
40 })
41
42report_sxw.report_sxw('report.purchase.order.webkit',
43 'purchase.order',
44 'addons/purchase_report_webkit/report/purchase_order.mako',
45 parser=purchase_report_webkit)
460
=== added file 'purchase_order_webkit/report/request_quotation.mako'
--- purchase_order_webkit/report/request_quotation.mako 1970-01-01 00:00:00 +0000
+++ purchase_order_webkit/report/request_quotation.mako 2014-01-17 15:12:05 +0000
@@ -0,0 +1,298 @@
1## -*- coding: utf-8 -*-
2<html>
3<head>
4 <style type="text/css">
5 ${css}
6
7.list_main_table {
8border:thin solid #E3E4EA;
9text-align:center;
10border-collapse: collapse;
11}
12table.list_main_table {
13 margin-top: 20px;
14}
15.list_main_headers {
16 padding: 0;
17}
18.list_main_headers th {
19 border: thin solid #000000;
20 padding-right:3px;
21 padding-left:3px;
22 background-color: #EEEEEE;
23 text-align:center;
24 font-size:12;
25 font-weight:bold;
26}
27.list_main_table td {
28 padding-right:3px;
29 padding-left:3px;
30 padding-top:3px;
31 padding-bottom:3px;
32}
33.list_main_lines,
34.list_main_footers {
35 padding: 0;
36}
37.list_main_footers {
38 padding-top: 15px;
39}
40.list_main_lines td,
41.list_main_footers td,
42.list_main_footers th {
43 border-style: none;
44 text-align:left;
45 font-size:12;
46 padding:0;
47}
48.list_main_footers th {
49 text-align:right;
50}
51
52td .total_empty_cell {
53 width: 77%;
54}
55td .total_sum_cell {
56 width: 13%;
57}
58
59.nobreak {
60 page-break-inside: avoid;
61}
62caption.formatted_note {
63 text-align:left;
64 border-right:thin solid #EEEEEE;
65 border-left:thin solid #EEEEEE;
66 border-top:thin solid #EEEEEE;
67 padding-left:10px;
68 font-size:11;
69 caption-side: bottom;
70}
71caption.formatted_note p {
72 margin: 0;
73}
74.list_bank_table {
75 text-align:center;
76 border-collapse: collapse;
77 page-break-inside: avoid;
78 display:table;
79}
80
81.act_as_row {
82 display:table-row;
83}
84.list_bank_table .act_as_thead {
85 background-color: #EEEEEE;
86 text-align:left;
87 font-size:12;
88 font-weight:bold;
89 padding-right:3px;
90 padding-left:3px;
91 white-space:nowrap;
92 background-clip:border-box;
93 display:table-cell;
94}
95.list_bank_table .act_as_cell {
96 text-align:left;
97 font-size:12;
98 padding-right:3px;
99 padding-left:3px;
100 padding-top:3px;
101 padding-bottom:3px;
102 white-space:nowrap;
103 display:table-cell;
104}
105
106
107.list_tax_table {
108}
109.list_tax_table td {
110 text-align:left;
111 font-size:12;
112}
113.list_tax_table th {
114}
115.list_tax_table thead {
116 display:table-header-group;
117}
118
119
120.list_total_table {
121 border:thin solid #E3E4EA;
122 text-align:center;
123 border-collapse: collapse;
124}
125.list_total_table td {
126 border-top : thin solid #EEEEEE;
127 text-align:left;
128 font-size:12;
129 padding-right:3px;
130 padding-left:3px;
131 padding-top:3px;
132 padding-bottom:3px;
133}
134.list_total_table th {
135 background-color: #EEEEEE;
136 border: thin solid #000000;
137 text-align:center;
138 font-size:12;
139 font-weight:bold;
140 padding-right:3px
141 padding-left:3px
142}
143.list_total_table thead {
144 display:table-header-group;
145}
146
147.right_table {
148 right: 4cm;
149 width:"100%";
150}
151
152.std_text {
153 font-size:12;
154}
155
156
157td.amount, th.amount {
158 text-align: right;
159 white-space: nowrap;
160}
161
162td.date {
163 white-space: nowrap;
164 width: 90px;
165}
166
167td.vat {
168 white-space: nowrap;
169}
170.address .recipient {
171 font-size: 12px;
172 margin-left: 350px;
173 margin-right: 120px;
174 float: right;
175}
176
177.main_col1 {
178 width: 40%;
179}
180td.main_col1 {
181 text-align:left;
182}
183.main_col2 {
184 width: 10%;
185}
186.main_col3 {
187 width: 10%;
188 text-align:center;
189}
190.main_col6 {
191 width: 10%;
192}
193.main_col4 {
194 width: 10%;
195 text-align:right;
196}
197.main_col5 {
198 width: 7%;
199 text-align:left;
200}
201.main_col7 {
202 width: 13%;
203}
204
205
206 </style>
207</head>
208<body>
209 <%page expression_filter="entity"/>
210
211 <%def name="address(partner, commercial_partner=None)">
212 <%doc>
213 XXX add a helper for address in report_webkit module as this won't be suported in v8.0
214 </%doc>
215 <% company_partner = False %>
216 %if commercial_partner:
217 %if commercial_partner.id != partner.id:
218 <% company_partner = commercial_partner %>
219 %endif
220 %elif partner.parent_id:
221 <% company_partner = partner.parent_id %>
222 %endif
223
224 %if company_partner:
225 <tr><td class="name">${company_partner.name or ''}</td></tr>
226 <tr><td>${partner.title and partner.title.name or ''} ${partner.name}</td></tr>
227 <% address_lines = partner.contact_address.split("\n")[1:] %>
228 %else:
229 <tr><td class="name">${partner.title and partner.title.name or ''} ${partner.name}</td></tr>
230 <% address_lines = partner.contact_address.split("\n") %>
231 %endif
232 %for part in address_lines:
233 % if part:
234 <tr><td>${part}</td></tr>
235 % endif
236 %endfor
237 </%def>
238
239
240 <%
241 def carriage_returns(text):
242 return text.replace('\n', '<br />')
243
244 %>
245
246 %for purch in objects :
247 <% setLang(purch.partner_id.lang) %>
248 <div class="address">
249 <table class="recipient">
250 ${address(partner=purch.partner_id)}
251 </table>
252
253 %if purch.dest_address_id:
254 <table class="shipping">
255 ${address(partner=purch.dest_address_id)}
256 </table>
257 %endif
258 </div>
259
260 <h3 style="clear:both; padding-top: 20px;">${_("Request for Quotation:")} ${purch.name}</h3>
261 <table class="list_main_table" width="100%" >
262 <thead>
263 <tr>
264 <th class="list_main_headers" style="width: 100%">
265 <table style="width:100%">
266 <th>${_("Description")}</th>
267 <th>${_("Expected Date")}</th>
268 <th class="amount">${_("Qty")}</th>
269 </tr>
270 </table>
271 </th>
272 </tr>
273 </thead>
274 <tbody>
275 <tr>
276 <td class="list_main_lines" style="width: 100%">
277 <div class="nobreak">
278 <table style="width:100%">
279 <tr>
280 %for line in purch.order_line :
281 <tr class="line">
282 <td>${line.name}</td>
283 <td>${formatLang(line.date_planned, date=True)}</td>
284 <td class="amount">${line.product_qty} ${line.product_uom and line.product_uom.name or ''}</td>
285 </tr>
286 %endfor
287 </table>
288 </div>
289 </td>
290 </tr>
291 </tbody>
292 </table>
293
294 <p style="page-break-after:always"/>
295 <br/>
296 %endfor
297</body>
298</html>
0299
=== removed 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 1970-01-01 00:00:00 +0000
@@ -1,46 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com)
5# @author Guewen Baconnier
6#
7# WARNING: This program as such is intended to be used by professional
8# programmers who take the whole responsability of assessing all potential
9# consequences resulting from its eventual inadequacies and bugs
10# End users who are looking for a ready-to-use solution with commercial
11# garantees and support are strongly adviced to contract a Free Software
12# Service Company
13#
14# This program is Free Software; you can redistribute it and/or
15# modify it under the terms of the GNU General Public License
16# as published by the Free Software Foundation; either version 2
17# of the License, or (at your option) any later version.
18#
19# This program is distributed in the hope that it will be useful,
20# but WITHOUT ANY WARRANTY; without even the implied warranty of
21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22# GNU General Public License for more details.
23#
24# You should have received a copy of the GNU General Public License
25# along with this program; if not, write to the Free Software
26# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27#
28##############################################################################
29
30import time
31from report import report_sxw
32
33
34class request_quotation(report_sxw.rml_parse):
35 def __init__(self, cr, uid, name, context):
36 super(request_quotation, self).__init__(cr, uid, name, context=context)
37 self.localcontext.update({
38 'time': time,
39 'cr':cr,
40 'uid': uid,
41 })
42
43report_sxw.report_sxw('report.purchase.quotation.webkit',
44 'purchase.order',
45 'addons/purchase_report_webkit/report/request_quotation.mako',
46 parser=request_quotation)
470
=== renamed directory 'purchase_order_webkit' => 'purchase_order_webkit_with_notes'
=== modified file 'purchase_order_webkit_with_notes/__init__.py'
--- purchase_order_webkit/__init__.py 2011-12-20 11:27:12 +0000
+++ purchase_order_webkit_with_notes/__init__.py 2014-01-17 15:12:05 +0000
@@ -27,4 +27,5 @@
27#27#
28##############################################################################28##############################################################################
2929
30import report30from . import report
31from . import purchase_order
3132
=== modified file 'purchase_order_webkit_with_notes/__openerp__.py'
--- purchase_order_webkit/__openerp__.py 2013-04-18 08:41:12 +0000
+++ purchase_order_webkit_with_notes/__openerp__.py 2014-01-17 15:12:05 +0000
@@ -1,8 +1,8 @@
1# -*- coding: utf-8 -*-1# -*- coding: utf-8 -*-
2##############################################################################2##############################################################################
3#3#
4# Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com)4# Copyright (c) 2014 Camptocamp SA (http://www.camptocamp.com)
5# @author Guewen Baconnier5# @author Guewen Baconnier Vincent Renaville
6#6#
7# WARNING: This program as such is intended to be used by professional7# WARNING: This program as such is intended to be used by professional
8# programmers who take the whole responsability of assessing all potential8# programmers who take the whole responsability of assessing all potential
@@ -28,19 +28,21 @@
28##############################################################################28##############################################################################
2929
30{30{
31 'name': 'Purchase Order Report using Webkit Library',31 'name': 'Purchase Order Report using Webkit Library and notes',
32 'version': '1.0',32 'version': '1.0',
33 'category': 'Reports/Webkit',33 'category': 'Reports/Webkit',
34 'description': """34 'description': """
35Replaces the legacy rml Quotation / Purchase Order report by a brand new webkit report.35Replaces the legacy rml Quotation / Purchase Order report by
36a brand new webkit report with header and footer notes on the purchase order and quotation
37
38It's the same report as purchase_order_webkit, but add notes for header and footer
36 """,39 """,
37 'author': 'Camptocamp',40 'author': 'Camptocamp',
38 'website': 'http://www.openerp.com',41 'website': 'http://www.camptocamp.com',
39 'depends': ['base', 'report_webkit', 'base_headers_webkit', 'purchase',],42 'depends': ['base', 'report_webkit', 'base_headers_webkit', 'purchase'],
40 'init_xml': [],43 'data': ['purchase_report.xml',
41 'update_xml': ['purchase_report.xml'],44 'view/purchase_view.xml'],
42 'demo_xml': [],
43 'test': [],45 'test': [],
44 'installable': False,46 'installable': True,
45 'active': False,47 'active': False,
46}48}
4749
=== modified file 'purchase_order_webkit_with_notes/i18n/fr.po'
--- purchase_order_webkit/i18n/fr.po 2011-12-20 11:27:12 +0000
+++ purchase_order_webkit_with_notes/i18n/fr.po 2014-01-17 15:12:05 +0000
@@ -1,13 +1,13 @@
1# Translation of OpenERP Server.1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:2# This file contains the translation of the following modules:
3# * purchase_order_webkit3# * purchase_order_webkit_with_notes
4#4#
5msgid ""5msgid ""
6msgstr ""6msgstr ""
7"Project-Id-Version: OpenERP Server 6.0.3\n"7"Project-Id-Version: OpenERP Server 7.0\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2011-12-12 11:14+0000\n"9"POT-Creation-Date: 2013-12-11 13:01+0000\n"
10"PO-Revision-Date: 2011-12-12 11:14+0000\n"10"PO-Revision-Date: 2013-12-11 13:01+0000\n"
11"Last-Translator: <>\n"11"Last-Translator: <>\n"
12"Language-Team: \n"12"Language-Team: \n"
13"MIME-Version: 1.0\n"13"MIME-Version: 1.0\n"
@@ -15,94 +15,173 @@
15"Content-Transfer-Encoding: \n"15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"16"Plural-Forms: \n"
1717
18#. module: purchase_order_webkit18#. module: purchase_order_webkit_with_notes
19#: report:addons/purchase_order_webkit/report/request_quotation.mako:7619#: view:purchase.condition_text:0
20msgid "purchase condition text"
21msgstr "Textes des conditions d'achat"
22
23#. module: purchase_order_webkit_with_notes
24#: field:purchase.condition_text,name:0
25msgid "Condition summary"
26msgstr "Résumé des conditions"
27
28#. module: purchase_order_webkit_with_notes
29#: model:ir.model,name:purchase_order_webkit_with_notes.model_purchase_condition_text
30msgid "purchase conditions"
31msgstr "Conditions d'achats"
32
33#. module: purchase_order_webkit_with_notes
34#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:282
35msgid "Date Req."
36msgstr "Date prévue"
37
38#. module: purchase_order_webkit_with_notes
39#: view:purchase.order:0
40msgid "Your bottom conditions here"
41msgstr "Vos conditions de bas de page"
42
43#. module: purchase_order_webkit_with_notes
44#: selection:purchase.condition_text,type:0
45msgid "Top condition"
46msgstr "Conditions d'entête"
47
48#. module: purchase_order_webkit_with_notes
49#: view:purchase.order:0
50msgid "Conditions"
51msgstr "Conditions"
52
53#. module: purchase_order_webkit_with_notes
54#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:328
55msgid "Taxes:"
56msgstr "Taxes :"
57
58#. module: purchase_order_webkit_with_notes
59#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:262
60msgid "Your Order Reference"
61msgstr "Votre Référence de commande"
62
63#. module: purchase_order_webkit_with_notes
64#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:267
20msgid "Expected Date"65msgid "Expected Date"
21msgstr "Date d'échéance"66msgstr "Date d'échéance"
2267
23#. module: purchase_order_webkit68#. module: purchase_order_webkit_with_notes
24#: report:addons/purchase_order_webkit/report/purchase_order.mako:3569#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:261
25#: report:addons/purchase_order_webkit/report/request_quotation.mako:3070msgid "Source Document"
26msgid "Fax"71msgstr "Document d'origine"
27msgstr "Fax"72
2873#. module: purchase_order_webkit_with_notes
29#. module: purchase_order_webkit74#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:280
30#: report:addons/purchase_order_webkit/report/purchase_order.mako:8775#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:266
31msgid "Net Price"
32msgstr "Prix net"
33
34#. module: purchase_order_webkit
35#: report:addons/purchase_order_webkit/report/purchase_order.mako:32
36#: report:addons/purchase_order_webkit/report/request_quotation.mako:27
37msgid "Tel"
38msgstr "Tél"
39
40#. module: purchase_order_webkit
41#: report:addons/purchase_order_webkit/report/purchase_order.mako:82
42#: report:addons/purchase_order_webkit/report/request_quotation.mako:75
43msgid "Description"76msgid "Description"
44msgstr "Description"77msgstr "Description"
4578
46#. module: purchase_order_webkit79#. module: purchase_order_webkit_with_notes
47#: report:addons/purchase_order_webkit/report/purchase_order.mako:6780#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:257
48msgid "Your Order Reference"
49msgstr "Votre Référence Commande"
50
51#. module: purchase_order_webkit
52#: report:addons/purchase_order_webkit/report/purchase_order.mako:62
53msgid "Purchase Order N°"81msgid "Purchase Order N°"
54msgstr "N° de confirmation du bon de commande"82msgstr "N° de confirmation du bon de commande"
5583
56#. module: purchase_order_webkit84#. module: purchase_order_webkit_with_notes
57#: report:addons/purchase_order_webkit/report/purchase_order.mako:6885#: field:purchase.condition_text,type:0
86msgid "type"
87msgstr "type"
88
89#. module: purchase_order_webkit_with_notes
90#: field:purchase.condition_text,text:0
91msgid "Condition"
92msgstr "Condition"
93
94#. module: purchase_order_webkit_with_notes
95#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:284
96msgid "Unit Price"
97msgstr "Prix"
98
99#. module: purchase_order_webkit_with_notes
100#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:288
101msgid "UoM"
102msgstr "UdM"
103
104#. module: purchase_order_webkit_with_notes
105#: view:purchase.order:0
106msgid "Your top conditions here"
107msgstr "Vos conditions d'entête"
108
109#. module: purchase_order_webkit_with_notes
110#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:337
111msgid "Total:"
112msgstr "Total :"
113
114#. module: purchase_order_webkit_with_notes
115#: field:purchase.order,note2:0
116#: field:purchase.order,text_condition2:0
117msgid "Footer"
118msgstr "Bas de page"
119
120#. module: purchase_order_webkit_with_notes
121#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:263
58msgid "Date Ordered"122msgid "Date Ordered"
59msgstr "Date de Commande"123msgstr "Date de Commande"
60124
61#. module: purchase_order_webkit125#. module: purchase_order_webkit_with_notes
62#: report:addons/purchase_order_webkit/report/purchase_order.mako:83126#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:281
63msgid "Taxes"127msgid "Taxes"
64msgstr "Taxes"128msgstr "Taxes"
65129
66#. module: purchase_order_webkit130#. module: purchase_order_webkit_with_notes
67#: report:addons/purchase_order_webkit/report/purchase_order.mako:85131#: model:ir.model,name:purchase_order_webkit_with_notes.model_purchase_order
68#: report:addons/purchase_order_webkit/report/request_quotation.mako:77132msgid "Purchase Order"
133msgstr "Bon de commande"
134
135#. module: purchase_order_webkit_with_notes
136#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:264
137msgid "Validated by"
138msgstr "Validée par"
139
140#. module: purchase_order_webkit_with_notes
141#: view:purchase.condition_text:0
142msgid "Purchase condition text"
143msgstr "Conditions d'achat"
144
145#. module: purchase_order_webkit_with_notes
146#: model:ir.actions.act_window,name:purchase_order_webkit_with_notes.action_purchase_condition_form_webkit
147#: model:ir.actions.act_window,name:purchase_order_webkit_with_notes.action_purchase_condition_webkit
148msgid "purchase.condition_text"
149msgstr "purchase.condition_text"
150
151#. module: purchase_order_webkit_with_notes
152#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:283
153#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:268
69msgid "Qty"154msgid "Qty"
70msgstr "Qté"155msgstr "Qté"
71156
72#. module: purchase_order_webkit157#. module: purchase_order_webkit_with_notes
73#: report:addons/purchase_order_webkit/report/purchase_order.mako:38158#: field:purchase.order,note1:0
74#: report:addons/purchase_order_webkit/report/request_quotation.mako:33159#: field:purchase.order,text_condition1:0
75msgid "E-mail"160msgid "Header"
76msgstr "E-mail"161msgstr "Entête"
77162
78#. module: purchase_order_webkit163#. module: purchase_order_webkit_with_notes
79#: report:addons/purchase_order_webkit/report/purchase_order.mako:84164#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:257
80msgid "Date Req."
81msgstr "Date prévue"
82
83#. module: purchase_order_webkit
84#: report:addons/purchase_order_webkit/report/purchase_order.mako:69
85msgid "Validated by"
86msgstr "Validée par"
87
88#. module: purchase_order_webkit
89#: report:addons/purchase_order_webkit/report/purchase_order.mako:66
90msgid "Document"
91msgstr "Document"
92
93#. module: purchase_order_webkit
94#: report:addons/purchase_order_webkit/report/purchase_order.mako:86
95msgid "Unit Price"
96msgstr "Prix"
97
98#. module: purchase_order_webkit
99#: report:addons/purchase_order_webkit/report/purchase_order.mako:41
100#: report:addons/purchase_order_webkit/report/request_quotation.mako:36
101msgid "VAT"
102msgstr "TVA"
103
104#. module: purchase_order_webkit
105#: report:addons/purchase_order_webkit/report/purchase_order.mako:62
106msgid "Quotation N°"165msgid "Quotation N°"
107msgstr "Demande de prix N°"166msgstr "Demande de prix N°"
108167
168#. module: purchase_order_webkit_with_notes
169#: selection:purchase.condition_text,type:0
170msgid "Bottom condition"
171msgstr "Conditions de bas de page"
172
173#. module: purchase_order_webkit_with_notes
174#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:259
175msgid "Request for Quotation:"
176msgstr "Demande de prix :"
177
178#. module: purchase_order_webkit_with_notes
179#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:285
180msgid "Net Price"
181msgstr "Prix net"
182
183#. module: purchase_order_webkit_with_notes
184#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:319
185msgid "Net :"
186msgstr "Net :"
187
109188
=== modified file 'purchase_order_webkit_with_notes/i18n/purchase_order_webkit.pot'
--- purchase_order_webkit/i18n/purchase_order_webkit.pot 2011-12-20 11:27:12 +0000
+++ purchase_order_webkit_with_notes/i18n/purchase_order_webkit.pot 2014-01-17 15:12:05 +0000
@@ -1,13 +1,13 @@
1# Translation of OpenERP Server.1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:2# This file contains the translation of the following modules:
3# * purchase_order_webkit3# * purchase_order_webkit_with_notes
4#4#
5msgid ""5msgid ""
6msgstr ""6msgstr ""
7"Project-Id-Version: OpenERP Server 6.0.3\n"7"Project-Id-Version: OpenERP Server 7.0\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2011-12-12 11:14+0000\n"9"POT-Creation-Date: 2013-12-11 12:59+0000\n"
10"PO-Revision-Date: 2011-12-12 11:14+0000\n"10"PO-Revision-Date: 2013-12-11 12:59+0000\n"
11"Last-Translator: <>\n"11"Last-Translator: <>\n"
12"Language-Team: \n"12"Language-Team: \n"
13"MIME-Version: 1.0\n"13"MIME-Version: 1.0\n"
@@ -15,94 +15,173 @@
15"Content-Transfer-Encoding: \n"15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"16"Plural-Forms: \n"
1717
18#. module: purchase_order_webkit18#. module: purchase_order_webkit_with_notes
19#: report:addons/purchase_order_webkit/report/request_quotation.mako:7619#: view:purchase.condition_text:0
20msgid "purchase condition text"
21msgstr ""
22
23#. module: purchase_order_webkit_with_notes
24#: field:purchase.condition_text,name:0
25msgid "Condition summary"
26msgstr ""
27
28#. module: purchase_order_webkit_with_notes
29#: model:ir.model,name:purchase_order_webkit_with_notes.model_purchase_condition_text
30msgid "purchase conditions"
31msgstr ""
32
33#. module: purchase_order_webkit_with_notes
34#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:282
35msgid "Date Req."
36msgstr ""
37
38#. module: purchase_order_webkit_with_notes
39#: view:purchase.order:0
40msgid "Your bottom conditions here"
41msgstr ""
42
43#. module: purchase_order_webkit_with_notes
44#: selection:purchase.condition_text,type:0
45msgid "Top condition"
46msgstr ""
47
48#. module: purchase_order_webkit_with_notes
49#: view:purchase.order:0
50msgid "Conditions"
51msgstr ""
52
53#. module: purchase_order_webkit_with_notes
54#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:328
55msgid "Taxes:"
56msgstr ""
57
58#. module: purchase_order_webkit_with_notes
59#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:262
60msgid "Your Order Reference"
61msgstr ""
62
63#. module: purchase_order_webkit_with_notes
64#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:267
20msgid "Expected Date"65msgid "Expected Date"
21msgstr ""66msgstr ""
2267
23#. module: purchase_order_webkit68#. module: purchase_order_webkit_with_notes
24#: report:addons/purchase_order_webkit/report/purchase_order.mako:3569#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:261
25#: report:addons/purchase_order_webkit/report/request_quotation.mako:3070msgid "Source Document"
26msgid "Fax"71msgstr ""
27msgstr ""72
2873#. module: purchase_order_webkit_with_notes
29#. module: purchase_order_webkit74#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:280
30#: report:addons/purchase_order_webkit/report/purchase_order.mako:8775#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:266
31msgid "Net Price"
32msgstr ""
33
34#. module: purchase_order_webkit
35#: report:addons/purchase_order_webkit/report/purchase_order.mako:32
36#: report:addons/purchase_order_webkit/report/request_quotation.mako:27
37msgid "Tel"
38msgstr ""
39
40#. module: purchase_order_webkit
41#: report:addons/purchase_order_webkit/report/purchase_order.mako:82
42#: report:addons/purchase_order_webkit/report/request_quotation.mako:75
43msgid "Description"76msgid "Description"
44msgstr ""77msgstr ""
4578
46#. module: purchase_order_webkit79#. module: purchase_order_webkit_with_notes
47#: report:addons/purchase_order_webkit/report/purchase_order.mako:6780#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:257
48msgid "Your Order Reference"
49msgstr ""
50
51#. module: purchase_order_webkit
52#: report:addons/purchase_order_webkit/report/purchase_order.mako:62
53msgid "Purchase Order N°"81msgid "Purchase Order N°"
54msgstr ""82msgstr ""
5583
56#. module: purchase_order_webkit84#. module: purchase_order_webkit_with_notes
57#: report:addons/purchase_order_webkit/report/purchase_order.mako:6885#: field:purchase.condition_text,type:0
86msgid "type"
87msgstr ""
88
89#. module: purchase_order_webkit_with_notes
90#: field:purchase.condition_text,text:0
91msgid "Condition"
92msgstr ""
93
94#. module: purchase_order_webkit_with_notes
95#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:284
96msgid "Unit Price"
97msgstr ""
98
99#. module: purchase_order_webkit_with_notes
100#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:288
101msgid "UoM"
102msgstr "UdM"
103
104#. module: purchase_order_webkit_with_notes
105#: view:purchase.order:0
106msgid "Your top conditions here"
107msgstr ""
108
109#. module: purchase_order_webkit_with_notes
110#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:337
111msgid "Total:"
112msgstr ""
113
114#. module: purchase_order_webkit_with_notes
115#: field:purchase.order,note2:0
116#: field:purchase.order,text_condition2:0
117msgid "Footer"
118msgstr ""
119
120#. module: purchase_order_webkit_with_notes
121#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:263
58msgid "Date Ordered"122msgid "Date Ordered"
59msgstr ""123msgstr ""
60124
61#. module: purchase_order_webkit125#. module: purchase_order_webkit_with_notes
62#: report:addons/purchase_order_webkit/report/purchase_order.mako:83126#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:281
63msgid "Taxes"127msgid "Taxes"
64msgstr ""128msgstr ""
65129
66#. module: purchase_order_webkit130#. module: purchase_order_webkit_with_notes
67#: report:addons/purchase_order_webkit/report/purchase_order.mako:85131#: model:ir.model,name:purchase_order_webkit_with_notes.model_purchase_order
68#: report:addons/purchase_order_webkit/report/request_quotation.mako:77132msgid "Purchase Order"
133msgstr ""
134
135#. module: purchase_order_webkit_with_notes
136#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:264
137msgid "Validated by"
138msgstr ""
139
140#. module: purchase_order_webkit_with_notes
141#: view:purchase.condition_text:0
142msgid "Purchase condition text"
143msgstr ""
144
145#. module: purchase_order_webkit_with_notes
146#: model:ir.actions.act_window,name:purchase_order_webkit_with_notes.action_purchase_condition_form_webkit
147#: model:ir.actions.act_window,name:purchase_order_webkit_with_notes.action_purchase_condition_webkit
148msgid "purchase.condition_text"
149msgstr ""
150
151#. module: purchase_order_webkit_with_notes
152#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:283
153#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:268
69msgid "Qty"154msgid "Qty"
70msgstr ""155msgstr ""
71156
72#. module: purchase_order_webkit157#. module: purchase_order_webkit_with_notes
73#: report:addons/purchase_order_webkit/report/purchase_order.mako:38158#: field:purchase.order,note1:0
74#: report:addons/purchase_order_webkit/report/request_quotation.mako:33159#: field:purchase.order,text_condition1:0
75msgid "E-mail"160msgid "Header"
76msgstr ""161msgstr ""
77162
78#. module: purchase_order_webkit163#. module: purchase_order_webkit_with_notes
79#: report:addons/purchase_order_webkit/report/purchase_order.mako:84164#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:257
80msgid "Date Req."
81msgstr ""
82
83#. module: purchase_order_webkit
84#: report:addons/purchase_order_webkit/report/purchase_order.mako:69
85msgid "Validated by"
86msgstr ""
87
88#. module: purchase_order_webkit
89#: report:addons/purchase_order_webkit/report/purchase_order.mako:66
90msgid "Document"
91msgstr ""
92
93#. module: purchase_order_webkit
94#: report:addons/purchase_order_webkit/report/purchase_order.mako:86
95msgid "Unit Price"
96msgstr ""
97
98#. module: purchase_order_webkit
99#: report:addons/purchase_order_webkit/report/purchase_order.mako:41
100#: report:addons/purchase_order_webkit/report/request_quotation.mako:36
101msgid "VAT"
102msgstr ""
103
104#. module: purchase_order_webkit
105#: report:addons/purchase_order_webkit/report/purchase_order.mako:62
106msgid "Quotation N°"165msgid "Quotation N°"
107msgstr ""166msgstr ""
108167
168#. module: purchase_order_webkit_with_notes
169#: selection:purchase.condition_text,type:0
170msgid "Bottom condition"
171msgstr ""
172
173#. module: purchase_order_webkit_with_notes
174#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:259
175msgid "Request for Quotation:"
176msgstr ""
177
178#. module: purchase_order_webkit_with_notes
179#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:285
180msgid "Net Price"
181msgstr ""
182
183#. module: purchase_order_webkit_with_notes
184#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:319
185msgid "Net :"
186msgstr ""
187
109188
=== added file 'purchase_order_webkit_with_notes/purchase_order.py'
--- purchase_order_webkit_with_notes/purchase_order.py 1970-01-01 00:00:00 +0000
+++ purchase_order_webkit_with_notes/purchase_order.py 2014-01-17 15:12:05 +0000
@@ -0,0 +1,92 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (c) 2013 Camptocamp SA (http://www.camptocamp.com)
5# @author Vincent Renaville
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21from openerp.osv import orm, fields
22from openerp import netsvc
23
24
25class PurchaseConditionText(orm.Model):
26 """ Purchase order Textual information """
27 _name = "purchase.condition_text"
28 _description = "purchase conditions"
29
30 _columns = {
31 'name': fields.char('Condition summary', required=True, size=128),
32 'type': fields.selection([('header', 'Top condition'),
33 ('footer', 'Bottom condition')],
34 'type', required=True),
35 'text': fields.html('Condition', translate=True, required=True),
36 }
37
38
39class PurchaseOrder(orm.Model):
40 """ Adds condition to Po """
41
42 _inherit = "purchase.order"
43 _description = 'Purchase Order'
44
45 _columns = {
46 'text_condition1': fields.many2one('purchase.condition_text',
47 'Header',
48 domain=[('type', '=', 'header')]),
49 'text_condition2': fields.many2one('purchase.condition_text',
50 'Footer',
51 domain=[('type', '=', 'footer')]),
52 'note1': fields.html('Header'),
53 'note2': fields.html('Footer')
54 }
55
56 def _set_condition(self, cr, uid, inv_id, commentid, key):
57 """ Set the text of the notes in purchases """
58 if not commentid:
59 return {}
60 try:
61 lang = self.browse(cr, uid, inv_id)[0].partner_id.lang
62 except Exception:
63 lang = 'en_US'
64 cond = self.pool.get('purchase.condition_text').browse(cr, uid,
65 commentid,
66 {'lang': lang})
67 return {'value': {key: cond.text}}
68
69 def set_header(self, cr, uid, inv_id, commentid):
70 return self._set_condition(cr, uid, inv_id, commentid, 'note1')
71
72 def set_footer(self, cr, uid, inv_id, commentid):
73 return self._set_condition(cr, uid, inv_id, commentid, 'note2')
74
75 def print_quotation(self, cr, uid, ids, context=None):
76 """
77 This function prints the purchase order and mark it as sent,
78 so that we can see more easily the next step of the workflow
79 """
80 assert len(ids) == 1, \
81 "This option should only be used for a single id at a time"
82 wf_service = netsvc.LocalService("workflow")
83 wf_service.trg_validate(uid, 'purchase.order',
84 ids[0], 'send_rfq', cr)
85 datas = {'model': 'purchase.order',
86 'ids': ids,
87 'form': self.read(cr, uid, ids[0], context=context),
88 }
89 return {'type': 'ir.actions.report.xml',
90 'report_name': 'purchase.order.webkit',
91 'datas': datas,
92 'nodestroy': True}
093
=== modified file 'purchase_order_webkit_with_notes/purchase_report.xml'
--- purchase_order_webkit/purchase_report.xml 2012-05-29 07:45:33 +0000
+++ purchase_order_webkit_with_notes/purchase_report.xml 2014-01-17 15:12:05 +0000
@@ -5,7 +5,7 @@
5 name="purchase.order.webkit"5 name="purchase.order.webkit"
6 auto="False"6 auto="False"
7 model="purchase.order"7 model="purchase.order"
8 file="purchase_order_webkit/report/purchase_order.mako"8 file="purchase_order_webkit_with_notes/report/purchase_order.mako"
9 string="Purchase Order"9 string="Purchase Order"
10 report_type="webkit" />10 report_type="webkit" />
1111
@@ -17,7 +17,7 @@
17 name="purchase.quotation.webkit"17 name="purchase.quotation.webkit"
18 auto="False"18 auto="False"
19 model="purchase.order"19 model="purchase.order"
20 file="purchase_order_webkit/report/request_quotation.mako"20 file="purchase_order_webkit_with_notes/report/request_quotation.mako"
21 string="Request for Quotation"21 string="Request for Quotation"
22 report_type="webkit" />22 report_type="webkit" />
2323
2424
=== modified file 'purchase_order_webkit_with_notes/report/__init__.py'
--- purchase_order_webkit/report/__init__.py 2012-11-16 10:48:03 +0000
+++ purchase_order_webkit_with_notes/report/__init__.py 2014-01-17 15:12:05 +0000
@@ -26,6 +26,3 @@
26# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.26# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27#27#
28##############################################################################28##############################################################################
29
30import purchase_order
31import request_quotation
32\ No newline at end of file29\ No newline at end of file
3330
=== modified file 'purchase_order_webkit_with_notes/report/purchase_order.mako'
--- purchase_order_webkit/report/purchase_order.mako 2013-11-21 14:53:56 +0000
+++ purchase_order_webkit_with_notes/report/purchase_order.mako 2014-01-17 15:12:05 +0000
@@ -1,17 +1,241 @@
1## -*- coding: utf-8 -*-1## -*- coding: utf-8 -*-
2<html>2<html>
3<head>3<head>
4 <style type="text/css">4 <style type="text/css">
5 ${css}5 ${css}
6
7.list_main_table {
8border:thin solid #E3E4EA;
9text-align:center;
10border-collapse: collapse;
11}
12table.list_main_table {
13 margin-top: 20px;
14}
15.list_main_headers {
16 padding: 0;
17}
18.list_main_headers th {
19 border: thin solid #000000;
20 padding-right:3px;
21 padding-left:3px;
22 background-color: #EEEEEE;
23 text-align:center;
24 font-size:12;
25 font-weight:bold;
26}
27.list_main_table td {
28 padding-right:3px;
29 padding-left:3px;
30 padding-top:3px;
31 padding-bottom:3px;
32}
33.list_main_lines,
34.list_main_footers {
35 padding: 0;
36}
37.list_main_footers {
38 padding-top: 15px;
39}
40.list_main_lines td,
41.list_main_footers td,
42.list_main_footers th {
43 border-style: none;
44 text-align:left;
45 font-size:12;
46 padding:0;
47}
48.list_main_footers th {
49 text-align:right;
50}
51
52td .total_empty_cell {
53 width: 77%;
54}
55td .total_sum_cell {
56 width: 13%;
57}
58
59.nobreak {
60 page-break-inside: avoid;
61}
62caption.formatted_note {
63 text-align:left;
64 border-right:thin solid #EEEEEE;
65 border-left:thin solid #EEEEEE;
66 border-top:thin solid #EEEEEE;
67 padding-left:10px;
68 font-size:11;
69 caption-side: bottom;
70}
71caption.formatted_note p {
72 margin: 0;
73}
74.list_bank_table {
75 text-align:center;
76 border-collapse: collapse;
77 page-break-inside: avoid;
78 display:table;
79}
80
81.act_as_row {
82 display:table-row;
83}
84.list_bank_table .act_as_thead {
85 background-color: #EEEEEE;
86 text-align:left;
87 font-size:12;
88 font-weight:bold;
89 padding-right:3px;
90 padding-left:3px;
91 white-space:nowrap;
92 background-clip:border-box;
93 display:table-cell;
94}
95.list_bank_table .act_as_cell {
96 text-align:left;
97 font-size:12;
98 padding-right:3px;
99 padding-left:3px;
100 padding-top:3px;
101 padding-bottom:3px;
102 white-space:nowrap;
103 display:table-cell;
104}
105
106
107.list_tax_table {
108}
109.list_tax_table td {
110 text-align:left;
111 font-size:12;
112}
113.list_tax_table th {
114}
115.list_tax_table thead {
116 display:table-header-group;
117}
118
119
120.list_total_table {
121 border:thin solid #E3E4EA;
122 text-align:center;
123 border-collapse: collapse;
124}
125.list_total_table td {
126 border-top : thin solid #EEEEEE;
127 text-align:left;
128 font-size:12;
129 padding-right:3px;
130 padding-left:3px;
131 padding-top:3px;
132 padding-bottom:3px;
133}
134.list_total_table th {
135 background-color: #EEEEEE;
136 border: thin solid #000000;
137 text-align:center;
138 font-size:12;
139 font-weight:bold;
140 padding-right:3px
141 padding-left:3px
142}
143.list_total_table thead {
144 display:table-header-group;
145}
146
147.right_table {
148 right: 4cm;
149 width:"100%";
150}
151
152.std_text {
153 font-size:12;
154}
155
156
157td.amount, th.amount {
158 text-align: right;
159 white-space: nowrap;
160}
161
162td.date {
163 white-space: nowrap;
164 width: 90px;
165}
166
167td.vat {
168 white-space: nowrap;
169}
170.address .recipient {
171 font-size: 12px;
172 margin-left: 350px;
173 margin-right: 120px;
174 float: right;
175}
176
177.main_col1 {
178 width: 40%;
179}
180td.main_col1 {
181 text-align:left;
182}
183.main_col2 {
184 width: 10%;
185}
186.main_col3 {
187 width: 10%;
188 text-align:center;
189}
190.main_col6 {
191 width: 10%;
192}
193.main_col4 {
194 width: 10%;
195 text-align:right;
196}
197.main_col5 {
198 width: 7%;
199 text-align:left;
200}
201.main_col7 {
202 width: 13%;
203}
204
205
6 </style>206 </style>
207
7</head>208</head>
8<body>209<body>
9 <%page expression_filter="entity"/>210 <%page expression_filter="entity"/>
10 <%211
11 def carriage_returns(text):212 <%def name="address(partner, commercial_partner=None)">
12 return text.replace('\n', '<br />')213 <%doc>
13214 XXX add a helper for address in report_webkit module as this won't be suported in v8.0
14 %>215 </%doc>
216 <% company_partner = False %>
217 %if commercial_partner:
218 %if commercial_partner.id != partner.id:
219 <% company_partner = commercial_partner %>
220 %endif
221 %elif partner.parent_id:
222 <% company_partner = partner.parent_id %>
223 %endif
224
225 %if company_partner:
226 <tr><td class="name">${company_partner.name or ''}</td></tr>
227 <tr><td>${partner.title and partner.title.name or ''} ${partner.name}</td></tr>
228 <% address_lines = partner.contact_address.split("\n")[1:] %>
229 %else:
230 <tr><td class="name">${partner.title and partner.title.name or ''} ${partner.name}</td></tr>
231 <% address_lines = partner.contact_address.split("\n") %>
232 %endif
233 %for part in address_lines:
234 % if part:
235 <tr><td>${part}</td></tr>
236 % endif
237 %endfor
238 </%def>
15239
16 %for purch in objects :240 %for purch in objects :
17 <%241 <%
@@ -21,110 +245,116 @@
21 <% setLang(purch.partner_id.lang) %>245 <% setLang(purch.partner_id.lang) %>
22 <div class="address">246 <div class="address">
23 <table class="recipient">247 <table class="recipient">
24 <tr><td class="name">${purch.partner_id.title and purch.partner_id.title.name or ''} ${purch.partner_id.name }</td></tr>248 ${address(partner=purch.partner_id)}
25 <tr><td>${purch.partner_address_id.street or ''}</td></tr>
26 <tr><td>${purch.partner_address_id.street2 or ''}</td></tr>
27 <tr><td>${purch.partner_address_id.zip or ''} ${purch.partner_address_id.city or ''}</td></tr>
28 %if purch.partner_address_id.country_id :
29 <tr><td>${purch.partner_address_id.country_id.name or ''} </td></tr>
30 %endif
31 %if purch.partner_address_id.phone :
32 <tr><td>${_("Tel")}: ${purch.partner_address_id.phone}</td></tr>
33 %endif
34 %if purch.partner_address_id.fax :
35 <tr><td>${_("Fax")}: ${purch.partner_address_id.fax}</td></tr>
36 %endif
37 %if purch.partner_address_id.email :
38 <tr><td>${_("E-mail")}: ${purch.partner_address_id.email}</td></tr>
39 %endif
40 %if purch.partner_id.vat :
41 <tr><td>${_("VAT")}: ${purch.partner_id.vat}</td></tr>
42 %endif
43 </table>249 </table>
44250
45 %if purch.dest_address_id:251 %if purch.dest_address_id:
46 <table class="shipping">252 <table class="shipping">
47 <tr><td class="address_title">${_("Shipping address:")}</td></tr>253 ${address(partner=purch.dest_address_id)}
48 <tr><td>${purch.partner_id.title and purch.partner_id.title.name or ''} ${purch.partner_id.name }</td></tr>
49 <tr><td>${purch.dest_address_id.street or ''}</td></tr>
50 <tr><td>${purch.dest_address_id.street2 or ''}</td></tr>
51 <tr><td>${purch.dest_address_id.zip or ''} ${purch.dest_address_id.city or ''}</td></tr>
52 %if purch.dest_address_id.state_id:
53 <tr><td>${purch.dest_address_id.state_id.name or ''} </td></tr>
54 %endif
55 %if purch.dest_address_id.country_id:
56 <tr><td>${purch.dest_address_id.country_id.name or ''} </td></tr>
57 %endif
58 </table>254 </table>
59 %endif255 %endif
60 </div>256 </div>
61257
62 <h1 style="clear:both; padding-top: 20px;">${quotation and _(u'Quotation N°') or _(u'Purchase Order N°') } ${purch.name}</h1>258 <h3 style="clear: both; padding-top: 20px;">
63259 ${quotation and _(u'Quotation N°') or _(u'Purchase Order N°') } ${purch.name}
260 </h3>
64 <table class="basic_table" width="100%">261 <table class="basic_table" width="100%">
65 <tr>262 <tr>
66 <td>${_("Document")}</td>263 <th>${_("Source Document")}</th>
67 <td>${_("Your Order Reference")}</td>264 <th style="text-align:center">${_("Your Order Reference")}</th>
68 <td>${_("Date Ordered")}</td>265 <th class="date">${_("Date Ordered")}</th>
69 <td>${_("Validated by")}</td>266 <th style="text-align:center">${_("Validated by")}</th>
70 </tr>267 </tr>
71 <tr>268 <tr>
72 <td>${purch.name}</td>269 <td>${purch.origin or ''}</td>
73 <td>${purch.partner_ref or ''}</td>270 <td style="text-align:center">${purch.partner_ref or ''}</td>
74 <td>${formatLang(purch.date_order, date=True)}</td>271 <td class="date">${formatLang(purch.date_order, date=True)}</td>
75 <td>${purch.validator and purch.validator.name or '' }</td>272 <td style="text-align:center">${purch.validator and purch.validator.name or '' }</td>
76 </tr>273 </tr>
77 </table>274 </table>
78275 %if purch.note1:
79 <table class="list_table" width="100%" style="margin-top: 30px;">276 <p>${purch.note1 or '' | n}</p>
277 %endif
278 <table class="list_main_table" width="100%" >
80 <thead>279 <thead>
81 <tr>280 <tr>
82 <th>${_("Description")}</th>281 <th class="list_main_headers" style="width: 100%">
83 <th>${_("Taxes")}</th>282 <table style="width:100%">
84 <th>${_("Date Req.")}</th>283 <tr>
85 <th class="amount">${_("Qty")}</th>284 <th class="main_col1">${_("Description")}</th>
86 <th class="amount">${_("Unit Price")}</th>285 <th class="main_col2">${_("Taxes")}</th>
87 <th class="amount">${_("Net Price")}</th>286 <th class="main_col3">${_("Date Req.")}</th>
287 <th style="text-align:center" class="amount main_col4">${_("Qty")}</th>
288 <th class="main_col5">${_("UoM")}</th>
289 <th class="amount main_col6">${_("Unit Price")}</th>
290 <th class="amount main_col7">${_("Net Price")}</th>
291 </tr>
292 </table>
293 </th>
88 </tr>294 </tr>
89 </thead>295 </thead>
90 <tbody>296 <tbody>
91 %for line in purch.order_line :297 %for line in purch.order_line :
92 <tr class="line">298 <tr>
93 <td>${line.name}</td>299 <td class="list_main_lines" style="width: 100%">
94 <td>${ ', '.join([ tax.name or '' for tax in line.taxes_id ])}</td>300 <div class="nobreak">
95 <td>${formatLang(line.date_order, date=True)}</td>301 <table style="width:100%">
96 <td class="amount">${line.product_qty} ${line.product_uom.name}</td>302 <tr>
97 <td class="amount">${formatLang(line.price_unit, digits=get_digits(dp='Purchase Price'))}</td>303 <td class="main_col1">${line.name}</td>
98 <td class="amount">${formatLang(line.price_subtotal, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}</td>304 <td style="text-align:center" class="main_col2">${ ', '.join([ tax.name or '' for tax in line.taxes_id ])}</td>
99 </tr>305 <td style="text-align:center" class="main_col3">${formatLang(line.date_order, date=True)}</td>
100 %if line.notes :306 <td class="amount main_col4">${line.product_qty}</td>
101 <tr class="line">307 <td class="main_col5">${line.product_uom.name}</td>
102 <td colspan="6" class="note">${line.notes | carriage_returns}</td>308 <td class="amount main col6">${formatLang(line.price_unit, digits=get_digits(dp='Purchase Price'))}</td>
103 </tr>309 <td class="amount main_col7">${formatLang(line.price_subtotal, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}</td>
104 %endif310 </tr>
105 %endfor311 </table>
312 </div>
313 </td>
314 </tr>
315 %endfor
106 </tbody>316 </tbody>
107 <tfoot>317 <tfoot class="totals">
108 <tr>318 <tr>
109 <td colspan="4" style="border-style:none"/>319 <td class="list_main_footers" style="width: 100%">
110 <td style="border-top:2px solid"><b>${_("Net Total:")}</b></td>320 <div class="nobreak">
111 <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>321 <table style="width:100%">
112 </tr>322 <tr>
113 <tr>323 <td class="total_empty_cell"/>
114 <td colspan="4" style="border-style:none"/>324 <th>
115 <td style="border-style:none"><b>${_("Taxes:")}</b></td>325 ${_("Net :")}
116 <td class="amount">${formatLang(purch.amount_tax, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}</td>326 </th>
117 </tr>327 <td class="amount total_sum_cell">
118 <tr>328 ${formatLang(purch.amount_untaxed, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}
119 <td colspan="4" style="border-style:none"/>329 </td>
120 <td style="border-top:2px solid"><b>${_("Total:")}</b></td>330 </tr>
121 <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>331 <tr>
122 </tr>332 <td class="total_empty_cell"/>
123 </tfoot>333 <th>
124 </table>334 ${_("Taxes:")}
125335 </th>
126 <p style="margin-top: 40px;">${purch.notes or '' | carriage_returns}</p>336 <td class="amount total_sum_cell">
127337 ${formatLang(purch.amount_tax, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}
338 </td>
339 </tr>
340 <tr>
341 <td class="total_empty_cell"/>
342 <th>
343 ${_("Total:")}
344 </th>
345 <td class="amount total_sum_cell">
346 ${formatLang(purch.amount_total, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}
347 </td>
348 </tr>
349 </table>
350 </div>
351 </td>
352 </tr>
353 </tfoot>
354 </table>
355 %if purch.note2:
356 <p>${purch.note2 or '' | n}</p>
357 %endif
128 <p style="page-break-after:always"/>358 <p style="page-break-after:always"/>
129 <br/>359 <br/>
130 %endfor360 %endfor
131361
=== modified file 'purchase_order_webkit_with_notes/report/request_quotation.mako'
--- purchase_order_webkit/report/request_quotation.mako 2013-11-21 14:53:56 +0000
+++ purchase_order_webkit_with_notes/report/request_quotation.mako 2014-01-17 15:12:05 +0000
@@ -1,12 +1,242 @@
1## -*- coding: utf-8 -*-1## -*- coding: utf-8 -*-
2<html>2<html>
3<head>3<head>
4 <style type="text/css">4 <style type="text/css">
5 ${css}5 ${css}
6
7.list_main_table {
8border:thin solid #E3E4EA;
9text-align:center;
10border-collapse: collapse;
11}
12table.list_main_table {
13 margin-top: 20px;
14}
15.list_main_headers {
16 padding: 0;
17}
18.list_main_headers th {
19 border: thin solid #000000;
20 padding-right:3px;
21 padding-left:3px;
22 background-color: #EEEEEE;
23 text-align:center;
24 font-size:12;
25 font-weight:bold;
26}
27.list_main_table td {
28 padding-right:3px;
29 padding-left:3px;
30 padding-top:3px;
31 padding-bottom:3px;
32}
33.list_main_lines,
34.list_main_footers {
35 padding: 0;
36}
37.list_main_footers {
38 padding-top: 15px;
39}
40.list_main_lines td,
41.list_main_footers td,
42.list_main_footers th {
43 border-style: none;
44 text-align:left;
45 font-size:12;
46 padding:0;
47}
48.list_main_footers th {
49 text-align:right;
50}
51
52td .total_empty_cell {
53 width: 77%;
54}
55td .total_sum_cell {
56 width: 13%;
57}
58
59.nobreak {
60 page-break-inside: avoid;
61}
62caption.formatted_note {
63 text-align:left;
64 border-right:thin solid #EEEEEE;
65 border-left:thin solid #EEEEEE;
66 border-top:thin solid #EEEEEE;
67 padding-left:10px;
68 font-size:11;
69 caption-side: bottom;
70}
71caption.formatted_note p {
72 margin: 0;
73}
74.list_bank_table {
75 text-align:center;
76 border-collapse: collapse;
77 page-break-inside: avoid;
78 display:table;
79}
80
81.act_as_row {
82 display:table-row;
83}
84.list_bank_table .act_as_thead {
85 background-color: #EEEEEE;
86 text-align:left;
87 font-size:12;
88 font-weight:bold;
89 padding-right:3px;
90 padding-left:3px;
91 white-space:nowrap;
92 background-clip:border-box;
93 display:table-cell;
94}
95.list_bank_table .act_as_cell {
96 text-align:left;
97 font-size:12;
98 padding-right:3px;
99 padding-left:3px;
100 padding-top:3px;
101 padding-bottom:3px;
102 white-space:nowrap;
103 display:table-cell;
104}
105
106
107.list_tax_table {
108}
109.list_tax_table td {
110 text-align:left;
111 font-size:12;
112}
113.list_tax_table th {
114}
115.list_tax_table thead {
116 display:table-header-group;
117}
118
119
120.list_total_table {
121 border:thin solid #E3E4EA;
122 text-align:center;
123 border-collapse: collapse;
124}
125.list_total_table td {
126 border-top : thin solid #EEEEEE;
127 text-align:left;
128 font-size:12;
129 padding-right:3px;
130 padding-left:3px;
131 padding-top:3px;
132 padding-bottom:3px;
133}
134.list_total_table th {
135 background-color: #EEEEEE;
136 border: thin solid #000000;
137 text-align:center;
138 font-size:12;
139 font-weight:bold;
140 padding-right:3px
141 padding-left:3px
142}
143.list_total_table thead {
144 display:table-header-group;
145}
146
147.right_table {
148 right: 4cm;
149 width:"100%";
150}
151
152.std_text {
153 font-size:12;
154}
155
156
157td.amount, th.amount {
158 text-align: right;
159 white-space: nowrap;
160}
161
162td.date {
163 white-space: nowrap;
164 width: 90px;
165}
166
167td.vat {
168 white-space: nowrap;
169}
170.address .recipient {
171 font-size: 12px;
172 margin-left: 350px;
173 margin-right: 120px;
174 float: right;
175}
176
177.main_col1 {
178 width: 40%;
179}
180td.main_col1 {
181 text-align:left;
182}
183.main_col2 {
184 width: 10%;
185}
186.main_col3 {
187 width: 10%;
188 text-align:center;
189}
190.main_col6 {
191 width: 10%;
192}
193.main_col4 {
194 width: 10%;
195 text-align:right;
196}
197.main_col5 {
198 width: 7%;
199 text-align:left;
200}
201.main_col7 {
202 width: 13%;
203}
204
205
6 </style>206 </style>
7</head>207</head>
8<body>208<body>
9 <%page expression_filter="entity"/>209 <%page expression_filter="entity"/>
210
211 <%def name="address(partner, commercial_partner=None)">
212 <%doc>
213 XXX add a helper for address in report_webkit module as this won't be suported in v8.0
214 </%doc>
215 <% company_partner = False %>
216 %if commercial_partner:
217 %if commercial_partner.id != partner.id:
218 <% company_partner = commercial_partner %>
219 %endif
220 %elif partner.parent_id:
221 <% company_partner = partner.parent_id %>
222 %endif
223
224 %if company_partner:
225 <tr><td class="name">${company_partner.name or ''}</td></tr>
226 <tr><td>${partner.title and partner.title.name or ''} ${partner.name}</td></tr>
227 <% address_lines = partner.contact_address.split("\n")[1:] %>
228 %else:
229 <tr><td class="name">${partner.title and partner.title.name or ''} ${partner.name}</td></tr>
230 <% address_lines = partner.contact_address.split("\n") %>
231 %endif
232 %for part in address_lines:
233 % if part:
234 <tr><td>${part}</td></tr>
235 % endif
236 %endfor
237 </%def>
238
239
10 <%240 <%
11 def carriage_returns(text):241 def carriage_returns(text):
12 return text.replace('\n', '<br />')242 return text.replace('\n', '<br />')
@@ -17,91 +247,56 @@
17 <% setLang(purch.partner_id.lang) %>247 <% setLang(purch.partner_id.lang) %>
18 <div class="address">248 <div class="address">
19 <table class="recipient">249 <table class="recipient">
20 <tr><td class="name">${purch.partner_id.title and purch.partner_id.title.name or ''} ${purch.partner_id.name }</td></tr>250 ${address(partner=purch.partner_id)}
21 <tr><td>${purch.partner_address_id.street or ''}</td></tr>
22 <tr><td>${purch.partner_address_id.street2 or ''}</td></tr>
23 <tr><td>${purch.partner_address_id.zip or ''} ${purch.partner_address_id.city or ''}</td></tr>
24 %if purch.partner_address_id.country_id :
25 <tr><td>${purch.partner_address_id.country_id.name or ''} </td></tr>
26 %endif
27 %if purch.partner_address_id.phone :
28 <tr><td>${_("Tel")}: ${purch.partner_address_id.phone}</td></tr>
29 %endif
30 %if purch.partner_address_id.fax :
31 <tr><td>${_("Fax")}: ${purch.partner_address_id.fax}</td></tr>
32 %endif
33 %if purch.partner_address_id.email :
34 <tr><td>${_("E-mail")}: ${purch.partner_address_id.email}</td></tr>
35 %endif
36 %if purch.partner_id.vat :
37 <tr><td>${_("VAT")}: ${purch.partner_id.vat}</td></tr>
38 %endif
39 </table>251 </table>
40252
41 <table class="shipping">253 %if purch.dest_address_id:
42 <tr><td class="address_title">${_("Expected Delivery address:")}</td></tr>254 <table class="shipping">
43 %if purch.dest_address_id:255 ${address(partner=purch.dest_address_id)}
44 <tr><td>${purch.partner_id.title and purch.partner_id.title.name or ''} ${purch.partner_id.name }</td></tr>256 </table>
45 <tr><td>${purch.dest_address_id.street or ''}</td></tr>257 %endif
46 <tr><td>${purch.dest_address_id.street2 or ''}</td></tr>
47 <tr><td>${purch.dest_address_id.zip or ''} ${purch.dest_address_id.city or ''}</td></tr>
48 %if purch.dest_address_id.state_id:
49 <tr><td>${purch.dest_address_id.state_id.name or ''} </td></tr>
50 %endif
51 %if purch.dest_address_id.country_id:
52 <tr><td>${purch.dest_address_id.country_id.name or ''} </td></tr>
53 %endif
54 %elif purch.warehouse_id:
55 <tr><td>${purch.warehouse_id.name }</td></tr>
56 %if purch.warehouse_id.partner_address_id:
57 <tr><td>${purch.warehouse_id.partner_address_id.street or ''}</td></tr>
58 <tr><td>${purch.warehouse_id.partner_address_id.street2 or ''}</td></tr>
59 <tr><td>${purch.warehouse_id.partner_address_id.zip or ''} ${purch.warehouse_id.partner_address_id.city or ''}</td></tr>
60 %if purch.warehouse_id.partner_address_id.state_id:
61 <tr><td>${purch.warehouse_id.partner_address_id.state_id.name or ''} </td></tr>
62 %endif
63 %if purch.warehouse_id.partner_address_id.country_id:
64 <tr><td>${purch.warehouse_id.partner_address_id.country_id.name or ''} </td></tr>
65 %endif
66 %endif
67 %endif
68 </table>
69 </div>258 </div>
70259
71 <h1 style="clear:both; padding-top: 20px;">${_("Request for Quotation:")} ${purch.name}</h1>260 <h3 style="clear:both; padding-top: 20px;">${_("Request for Quotation:")} ${purch.name}</h3>
72261 %if purch.note1:
73 <table class="list_table" width="100%" style="margin-top: 40px;">262 <p>${purch.note1 or '' | n}</p>
263 %endif
264 <table class="list_main_table" width="100%" >
74 <thead>265 <thead>
75 <tr>266 <tr>
267 <th class="list_main_headers" style="width: 100%">
268 <table style="width:100%">
76 <th>${_("Description")}</th>269 <th>${_("Description")}</th>
77 <th>${_("Expected Date")}</th>270 <th>${_("Expected Date")}</th>
78 <th class="amount">${_("Qty")}</th>271 <th class="amount">${_("Qty")}</th>
272 </tr>
273 </table>
274 </th>
79 </tr>275 </tr>
80 </thead>276 </thead>
81 <tbody>277 <tbody>
82 %for line in purch.order_line :278 <tr>
83 <tr class="line">279 <td class="list_main_lines" style="width: 100%">
84 <td>${line.name}</td>280 <div class="nobreak">
85 <td>${formatLang(line.date_planned, date=True)}</td>281 <table style="width:100%">
86 <td class="amount">${line.product_qty} ${line.product_uom and line.product_uom.name or ''}</td>282 <tr>
87 </tr>283 %for line in purch.order_line :
88 %if line.notes :284 <tr class="line">
89 <tr class="line">285 <td>${line.name}</td>
90 <td colspan="6" class="note">${line.notes | carriage_returns}</td>286 <td>${formatLang(line.date_planned, date=True)}</td>
91 </tr>287 <td class="amount">${line.product_qty} ${line.product_uom and line.product_uom.name or ''}</td>
92 %endif288 </tr>
93 %endfor289 %endfor
290 </table>
291 </div>
292 </td>
293 </tr>
94 </tbody>294 </tbody>
95 </table>295 </table>
96296
97 <p style="margin-top: 20px;">${purch.notes or '' | carriage_returns}</p>297 %if purch.note2:
98298 <p>${purch.note2 or '' | n}</p>
99 <p style="margin-top: 20px;">299 %endif
100 ${_("Regards,")}
101 </p>
102
103 <p style="margin-top: 20px;">${user.signature or ''}</p>
104
105 <p style="page-break-after:always"/>300 <p style="page-break-after:always"/>
106 <br/>301 <br/>
107 %endfor302 %endfor
108303
=== added directory 'purchase_order_webkit_with_notes/view'
=== added file 'purchase_order_webkit_with_notes/view/purchase_view.xml'
--- purchase_order_webkit_with_notes/view/purchase_view.xml 1970-01-01 00:00:00 +0000
+++ purchase_order_webkit_with_notes/view/purchase_view.xml 2014-01-17 15:12:05 +0000
@@ -0,0 +1,69 @@
1<?xml version="1.0"?>
2<openerp>
3 <data>
4 <!-- Sale condition text views -->
5 <record model="ir.ui.view" id="view_purchase_condition_webkit">
6 <field name="name">purchase.condition_text.form</field>
7 <field name="model">purchase.condition_text</field>
8 <field name="type">form</field>
9 <field name="arch" type="xml">
10 <form string="purchase condition text">
11 <field name="name" select="1"/>
12 <field name="type" select="1"/>
13 <field name="text" colspan="4"/>
14 </form>
15 </field>
16 </record>
17 <record model="ir.ui.view" id="view_purchase_condition_list_webkit">
18 <field name="name">purchase.condition_text.list</field>
19 <field name="model">purchase.condition_text</field>
20 <field name="type">tree</field>
21 <field name="priority" eval="6"/>
22 <field name="arch" type="xml">
23 <tree string="Purchase condition text">
24 <field name="name" select="1"/>
25 <field name="type" select="1"/>
26 <field name="text"/>
27 </tree>
28 </field>
29 </record>
30 <record model="ir.actions.act_window" id="action_purchase_condition_webkit">
31 <field name="name">purchase.condition_text</field>
32 <field name="type">ir.actions.act_window</field>
33 <field name="res_model">purchase.condition_text</field>
34 <field name="view_type">form</field>
35 <field name="view_mode">tree,form</field>
36 <field name="view_id" ref="view_purchase_condition_list_webkit"/>
37 </record>
38 <record model="ir.actions.act_window" id="action_purchase_condition_form_webkit">
39 <field name="name">purchase.condition_text</field>
40 <field name="type">ir.actions.act_window</field>
41 <field name="res_model">purchase.condition_text</field>
42 <field name="view_type">form</field>
43 <field name="view_id" ref="view_purchase_condition_webkit"/>
44 </record>
45
46 <!-- Overwrite of sale order / sale order line form view -->
47
48 <record model="ir.ui.view" id="purchase_order_form_over">
49 <field name="name">purchase.order.form.add.notes</field>
50 <field name="model">purchase.order</field>
51 <field name="inherit_id" ref="purchase.purchase_order_form"/>
52 <field name="arch" type="xml">
53 <xpath expr="//page[last()]" position="after">
54 <page string="Conditions">
55 <group>
56 <field name="text_condition1" domain="[('type','=','header')]"
57 on_change="set_header(text_condition1)" colspan="2"/>
58 <field name="text_condition2" domain="[('type','=','footer')]"
59 on_change="set_footer(text_condition2)" colspan="2"/>
60 <field name="note1" colspan="4" nolabel="1" placeholder="Your top conditions here"/>
61 <field name="note2" colspan="4" nolabel="1" placeholder="Your bottom conditions here"/>
62 </group>
63 </page>
64 </xpath>
65 </field>
66 </record>
67
68 </data>
69</openerp>

Subscribers

People subscribed via source and target branches