Merge lp:~camptocamp/purchase-report/purchase_report_port_vre into lp:~purchase-core-editors/purchase-report/7.0
- purchase_report_port_vre
- Merge into 7.0
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 |
Related bugs: |
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 |
Commit message
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.
- 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
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : | # |
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
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
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
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
Vincent Renaville@camptocamp (vrenaville-c2c) wrote : | # |
Hello,
thanks for the Review !
I agree with Guewen
So I split it in 2 modules :
- purchase_
- purchase_
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
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
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
- 29. By Romain Deheele - Camptocamp
-
[FIX] set active to False on 2 modules : to avoid automatic install
Romain Deheele - Camptocamp (romaindeheele) : | # |
Vincent Renaville@camptocamp (vrenaville-c2c) wrote : | # |
Hello
Thanks for the review and the fix, I missed the case.
Vincent
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
- 30. By Vincent Renaville@camptocamp
-
[FIX] change date and website in module description
- 31. By Vincent Renaville@camptocamp
-
[FIX] improve description
Leonardo Pistone (lepistone) wrote : | # |
Thanks for the changes Vincent.
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : | # |
Thanks!
Preview Diff
1 | === added directory 'purchase_order_webkit' |
2 | === added file 'purchase_order_webkit/__init__.py' |
3 | --- purchase_order_webkit/__init__.py 1970-01-01 00:00:00 +0000 |
4 | +++ purchase_order_webkit/__init__.py 2014-01-17 15:12:05 +0000 |
5 | @@ -0,0 +1,30 @@ |
6 | +# -*- coding: utf-8 -*- |
7 | +############################################################################## |
8 | +# |
9 | +# Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com) |
10 | +# @author Guewen Baconnier |
11 | +# |
12 | +# WARNING: This program as such is intended to be used by professional |
13 | +# programmers who take the whole responsability of assessing all potential |
14 | +# consequences resulting from its eventual inadequacies and bugs |
15 | +# End users who are looking for a ready-to-use solution with commercial |
16 | +# garantees and support are strongly adviced to contract a Free Software |
17 | +# Service Company |
18 | +# |
19 | +# This program is Free Software; you can redistribute it and/or |
20 | +# modify it under the terms of the GNU General Public License |
21 | +# as published by the Free Software Foundation; either version 2 |
22 | +# of the License, or (at your option) any later version. |
23 | +# |
24 | +# This program is distributed in the hope that it will be useful, |
25 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
26 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
27 | +# GNU General Public License for more details. |
28 | +# |
29 | +# You should have received a copy of the GNU General Public License |
30 | +# along with this program; if not, write to the Free Software |
31 | +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
32 | +# |
33 | +############################################################################## |
34 | + |
35 | +from . import report |
36 | \ No newline at end of file |
37 | |
38 | === added file 'purchase_order_webkit/__openerp__.py' |
39 | --- purchase_order_webkit/__openerp__.py 1970-01-01 00:00:00 +0000 |
40 | +++ purchase_order_webkit/__openerp__.py 2014-01-17 15:12:05 +0000 |
41 | @@ -0,0 +1,46 @@ |
42 | +# -*- coding: utf-8 -*- |
43 | +############################################################################## |
44 | +# |
45 | +# Copyright (c) 2014 Camptocamp SA (http://www.camptocamp.com) |
46 | +# @author Guewen Baconnier Vincent Renaville |
47 | +# |
48 | +# WARNING: This program as such is intended to be used by professional |
49 | +# programmers who take the whole responsability of assessing all potential |
50 | +# consequences resulting from its eventual inadequacies and bugs |
51 | +# End users who are looking for a ready-to-use solution with commercial |
52 | +# garantees and support are strongly adviced to contract a Free Software |
53 | +# Service Company |
54 | +# |
55 | +# This program is Free Software; you can redistribute it and/or |
56 | +# modify it under the terms of the GNU General Public License |
57 | +# as published by the Free Software Foundation; either version 2 |
58 | +# of the License, or (at your option) any later version. |
59 | +# |
60 | +# This program is distributed in the hope that it will be useful, |
61 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
62 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
63 | +# GNU General Public License for more details. |
64 | +# |
65 | +# You should have received a copy of the GNU General Public License |
66 | +# along with this program; if not, write to the Free Software |
67 | +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
68 | +# |
69 | +############################################################################## |
70 | + |
71 | +{ |
72 | + 'name': 'Purchase Order Report using Webkit Library', |
73 | + 'version': '1.0', |
74 | + 'category': 'Reports/Webkit', |
75 | + 'description': """ |
76 | +Replaces the legacy rml Quotation / Purchase Order report by |
77 | +a brand new webkit report. |
78 | +It's the same report as purchase_report_webkit_with_notes, but without header and footer notes |
79 | + """, |
80 | + 'author': 'Camptocamp', |
81 | + 'website': 'http://www.camptocamp.com', |
82 | + 'depends': ['base', 'report_webkit', 'base_headers_webkit', 'purchase'], |
83 | + 'data': ['purchase_report.xml'], |
84 | + 'test': [], |
85 | + 'installable': True, |
86 | + 'active': False, |
87 | +} |
88 | |
89 | === added directory 'purchase_order_webkit/i18n' |
90 | === added file 'purchase_order_webkit/i18n/fr.po' |
91 | --- purchase_order_webkit/i18n/fr.po 1970-01-01 00:00:00 +0000 |
92 | +++ purchase_order_webkit/i18n/fr.po 2014-01-17 15:12:05 +0000 |
93 | @@ -0,0 +1,136 @@ |
94 | +# Translation of OpenERP Server. |
95 | +# This file contains the translation of the following modules: |
96 | +# * purchase_order_webkit |
97 | +# |
98 | +msgid "" |
99 | +msgstr "" |
100 | +"Project-Id-Version: OpenERP Server 7.0\n" |
101 | +"Report-Msgid-Bugs-To: \n" |
102 | +"POT-Creation-Date: 2013-12-11 13:01+0000\n" |
103 | +"PO-Revision-Date: 2013-12-11 13:01+0000\n" |
104 | +"Last-Translator: <>\n" |
105 | +"Language-Team: \n" |
106 | +"MIME-Version: 1.0\n" |
107 | +"Content-Type: text/plain; charset=UTF-8\n" |
108 | +"Content-Transfer-Encoding: \n" |
109 | +"Plural-Forms: \n" |
110 | + |
111 | +#. module: purchase_order_webkit |
112 | +#: model:ir.model,name:purchase_order_webkit.model_purchase_condition_text |
113 | +msgid "purchase conditions" |
114 | +msgstr "Conditions d'achats" |
115 | + |
116 | +#. module: purchase_order_webkit |
117 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:282 |
118 | +msgid "Date Req." |
119 | +msgstr "Date prévue" |
120 | + |
121 | +#. module: purchase_order_webkit |
122 | +#: selection:purchase.condition_text,type:0 |
123 | +msgid "Top condition" |
124 | +msgstr "Conditions d'entête" |
125 | + |
126 | +#. module: purchase_order_webkit |
127 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:328 |
128 | +msgid "Taxes:" |
129 | +msgstr "Taxes :" |
130 | + |
131 | +#. module: purchase_order_webkit |
132 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:262 |
133 | +msgid "Your Order Reference" |
134 | +msgstr "Votre Référence de commande" |
135 | + |
136 | +#. module: purchase_order_webkit |
137 | +#: report:addons/purchase_order_webkit/report/request_quotation.mako:267 |
138 | +msgid "Expected Date" |
139 | +msgstr "Date d'échéance" |
140 | + |
141 | +#. module: purchase_order_webkit |
142 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:261 |
143 | +msgid "Source Document" |
144 | +msgstr "Document d'origine" |
145 | + |
146 | +#. module: purchase_order_webkit |
147 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:280 |
148 | +#: report:addons/purchase_order_webkit/report/request_quotation.mako:266 |
149 | +msgid "Description" |
150 | +msgstr "Description" |
151 | + |
152 | +#. module: purchase_order_webkit |
153 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:257 |
154 | +msgid "Purchase Order N°" |
155 | +msgstr "N° de confirmation du bon de commande" |
156 | + |
157 | + |
158 | +#. module: purchase_order_webkit |
159 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:284 |
160 | +msgid "Unit Price" |
161 | +msgstr "Prix" |
162 | + |
163 | +#. module: purchase_order_webkit |
164 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:288 |
165 | +msgid "UoM" |
166 | +msgstr "UdM" |
167 | + |
168 | +#. module: purchase_order_webkit |
169 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:337 |
170 | +msgid "Total:" |
171 | +msgstr "Total :" |
172 | + |
173 | +#. module: purchase_order_webkit |
174 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:263 |
175 | +msgid "Date Ordered" |
176 | +msgstr "Date de Commande" |
177 | + |
178 | +#. module: purchase_order_webkit |
179 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:281 |
180 | +msgid "Taxes" |
181 | +msgstr "Taxes" |
182 | + |
183 | +#. module: purchase_order_webkit |
184 | +#: model:ir.model,name:purchase_order_webkit.model_purchase_order |
185 | +msgid "Purchase Order" |
186 | +msgstr "Bon de commande" |
187 | + |
188 | +#. module: purchase_order_webkit |
189 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:264 |
190 | +msgid "Validated by" |
191 | +msgstr "Validée par" |
192 | + |
193 | +#. module: purchase_order_webkit |
194 | +#: model:ir.actions.act_window,name:purchase_order_webkit.action_purchase_condition_form_webkit |
195 | +#: model:ir.actions.act_window,name:purchase_order_webkit.action_purchase_condition_webkit |
196 | +msgid "purchase.condition_text" |
197 | +msgstr "purchase.condition_text" |
198 | + |
199 | +#. module: purchase_order_webkit |
200 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:283 |
201 | +#: report:addons/purchase_order_webkit/report/request_quotation.mako:268 |
202 | +msgid "Qty" |
203 | +msgstr "Qté" |
204 | + |
205 | +#. module: purchase_order_webkit |
206 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:257 |
207 | +msgid "Quotation N°" |
208 | +msgstr "Demande de prix N°" |
209 | + |
210 | +#. module: purchase_order_webkit |
211 | +#: selection:purchase.condition_text,type:0 |
212 | +msgid "Bottom condition" |
213 | +msgstr "Conditions de bas de page" |
214 | + |
215 | +#. module: purchase_order_webkit |
216 | +#: report:addons/purchase_order_webkit/report/request_quotation.mako:259 |
217 | +msgid "Request for Quotation:" |
218 | +msgstr "Demande de prix :" |
219 | + |
220 | +#. module: purchase_order_webkit |
221 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:285 |
222 | +msgid "Net Price" |
223 | +msgstr "Prix net" |
224 | + |
225 | +#. module: purchase_order_webkit |
226 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:319 |
227 | +msgid "Net :" |
228 | +msgstr "Net :" |
229 | + |
230 | |
231 | === added file 'purchase_order_webkit/i18n/purchase_order_webkit.pot' |
232 | --- purchase_order_webkit/i18n/purchase_order_webkit.pot 1970-01-01 00:00:00 +0000 |
233 | +++ purchase_order_webkit/i18n/purchase_order_webkit.pot 2014-01-17 15:12:05 +0000 |
234 | @@ -0,0 +1,137 @@ |
235 | +# Translation of OpenERP Server. |
236 | +# This file contains the translation of the following modules: |
237 | +# * purchase_order_webkit |
238 | +# |
239 | +msgid "" |
240 | +msgstr "" |
241 | +"Project-Id-Version: OpenERP Server 7.0\n" |
242 | +"Report-Msgid-Bugs-To: \n" |
243 | +"POT-Creation-Date: 2013-12-11 12:59+0000\n" |
244 | +"PO-Revision-Date: 2013-12-11 12:59+0000\n" |
245 | +"Last-Translator: <>\n" |
246 | +"Language-Team: \n" |
247 | +"MIME-Version: 1.0\n" |
248 | +"Content-Type: text/plain; charset=UTF-8\n" |
249 | +"Content-Transfer-Encoding: \n" |
250 | +"Plural-Forms: \n" |
251 | + |
252 | + |
253 | +#. module: purchase_order_webkit |
254 | +#: model:ir.model,name:purchase_order_webkit.model_purchase_condition_text |
255 | +msgid "purchase conditions" |
256 | +msgstr "" |
257 | + |
258 | +#. module: purchase_order_webkit |
259 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:282 |
260 | +msgid "Date Req." |
261 | +msgstr "" |
262 | + |
263 | +#. module: purchase_order_webkit |
264 | +#: selection:purchase.condition_text,type:0 |
265 | +msgid "Top condition" |
266 | +msgstr "" |
267 | + |
268 | +#. module: purchase_order_webkit |
269 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:328 |
270 | +msgid "Taxes:" |
271 | +msgstr "" |
272 | + |
273 | +#. module: purchase_order_webkit |
274 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:262 |
275 | +msgid "Your Order Reference" |
276 | +msgstr "" |
277 | + |
278 | +#. module: purchase_order_webkit |
279 | +#: report:addons/purchase_order_webkit/report/request_quotation.mako:267 |
280 | +msgid "Expected Date" |
281 | +msgstr "" |
282 | + |
283 | +#. module: purchase_order_webkit |
284 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:261 |
285 | +msgid "Source Document" |
286 | +msgstr "" |
287 | + |
288 | +#. module: purchase_order_webkit |
289 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:280 |
290 | +#: report:addons/purchase_order_webkit/report/request_quotation.mako:266 |
291 | +msgid "Description" |
292 | +msgstr "" |
293 | + |
294 | +#. module: purchase_order_webkit |
295 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:257 |
296 | +msgid "Purchase Order N°" |
297 | +msgstr "" |
298 | + |
299 | +#. module: purchase_order_webkit |
300 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:284 |
301 | +msgid "Unit Price" |
302 | +msgstr "" |
303 | + |
304 | +#. module: purchase_order_webkit |
305 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:288 |
306 | +msgid "UoM" |
307 | +msgstr "UdM" |
308 | + |
309 | + |
310 | +#. module: purchase_order_webkit |
311 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:337 |
312 | +msgid "Total:" |
313 | +msgstr "" |
314 | + |
315 | +#. module: purchase_order_webkit |
316 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:263 |
317 | +msgid "Date Ordered" |
318 | +msgstr "" |
319 | + |
320 | +#. module: purchase_order_webkit |
321 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:281 |
322 | +msgid "Taxes" |
323 | +msgstr "" |
324 | + |
325 | +#. module: purchase_order_webkit |
326 | +#: model:ir.model,name:purchase_order_webkit.model_purchase_order |
327 | +msgid "Purchase Order" |
328 | +msgstr "" |
329 | + |
330 | +#. module: purchase_order_webkit |
331 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:264 |
332 | +msgid "Validated by" |
333 | +msgstr "" |
334 | + |
335 | +#. module: purchase_order_webkit |
336 | +#: model:ir.actions.act_window,name:purchase_order_webkit.action_purchase_condition_form_webkit |
337 | +#: model:ir.actions.act_window,name:purchase_order_webkit.action_purchase_condition_webkit |
338 | +msgid "purchase.condition_text" |
339 | +msgstr "" |
340 | + |
341 | +#. module: purchase_order_webkit |
342 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:283 |
343 | +#: report:addons/purchase_order_webkit/report/request_quotation.mako:268 |
344 | +msgid "Qty" |
345 | +msgstr "" |
346 | + |
347 | +#. module: purchase_order_webkit |
348 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:257 |
349 | +msgid "Quotation N°" |
350 | +msgstr "" |
351 | + |
352 | +#. module: purchase_order_webkit |
353 | +#: selection:purchase.condition_text,type:0 |
354 | +msgid "Bottom condition" |
355 | +msgstr "" |
356 | + |
357 | +#. module: purchase_order_webkit |
358 | +#: report:addons/purchase_order_webkit/report/request_quotation.mako:259 |
359 | +msgid "Request for Quotation:" |
360 | +msgstr "" |
361 | + |
362 | +#. module: purchase_order_webkit |
363 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:285 |
364 | +msgid "Net Price" |
365 | +msgstr "" |
366 | + |
367 | +#. module: purchase_order_webkit |
368 | +#: report:addons/purchase_order_webkit/report/purchase_order.mako:319 |
369 | +msgid "Net :" |
370 | +msgstr "" |
371 | + |
372 | |
373 | === added file 'purchase_order_webkit/purchase_report.xml' |
374 | --- purchase_order_webkit/purchase_report.xml 1970-01-01 00:00:00 +0000 |
375 | +++ purchase_order_webkit/purchase_report.xml 2014-01-17 15:12:05 +0000 |
376 | @@ -0,0 +1,29 @@ |
377 | +<?xml version="1.0" encoding="utf-8"?> |
378 | +<openerp> |
379 | + <data> |
380 | + <report id="purchase.report_purchase_order" |
381 | + name="purchase.order.webkit" |
382 | + auto="False" |
383 | + model="purchase.order" |
384 | + file="purchase_order_webkit/report/purchase_order.mako" |
385 | + string="Purchase Order" |
386 | + report_type="webkit" /> |
387 | + |
388 | + <record id="purchase.report_purchase_order" model="ir.actions.report.xml"> |
389 | + <field name="webkit_header" ref="base_headers_webkit.base_reports_portrait_header"/> |
390 | + </record> |
391 | + |
392 | + <report id="purchase.report_purchase_quotation" |
393 | + name="purchase.quotation.webkit" |
394 | + auto="False" |
395 | + model="purchase.order" |
396 | + file="purchase_order_webkit/report/request_quotation.mako" |
397 | + string="Request for Quotation" |
398 | + report_type="webkit" /> |
399 | + |
400 | + <record id="purchase.report_purchase_quotation" model="ir.actions.report.xml"> |
401 | + <field name="webkit_header" ref="base_headers_webkit.base_reports_portrait_header"/> |
402 | + </record> |
403 | + |
404 | + </data> |
405 | +</openerp> |
406 | |
407 | === added directory 'purchase_order_webkit/report' |
408 | === added file 'purchase_order_webkit/report/__init__.py' |
409 | --- purchase_order_webkit/report/__init__.py 1970-01-01 00:00:00 +0000 |
410 | +++ purchase_order_webkit/report/__init__.py 2014-01-17 15:12:05 +0000 |
411 | @@ -0,0 +1,28 @@ |
412 | +# -*- coding: utf-8 -*- |
413 | +############################################################################## |
414 | +# |
415 | +# Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com) |
416 | +# @author Guewen Baconnier |
417 | +# |
418 | +# WARNING: This program as such is intended to be used by professional |
419 | +# programmers who take the whole responsability of assessing all potential |
420 | +# consequences resulting from its eventual inadequacies and bugs |
421 | +# End users who are looking for a ready-to-use solution with commercial |
422 | +# garantees and support are strongly adviced to contract a Free Software |
423 | +# Service Company |
424 | +# |
425 | +# This program is Free Software; you can redistribute it and/or |
426 | +# modify it under the terms of the GNU General Public License |
427 | +# as published by the Free Software Foundation; either version 2 |
428 | +# of the License, or (at your option) any later version. |
429 | +# |
430 | +# This program is distributed in the hope that it will be useful, |
431 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
432 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
433 | +# GNU General Public License for more details. |
434 | +# |
435 | +# You should have received a copy of the GNU General Public License |
436 | +# along with this program; if not, write to the Free Software |
437 | +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
438 | +# |
439 | +############################################################################## |
440 | |
441 | === added file 'purchase_order_webkit/report/purchase_order.mako' |
442 | --- purchase_order_webkit/report/purchase_order.mako 1970-01-01 00:00:00 +0000 |
443 | +++ purchase_order_webkit/report/purchase_order.mako 2014-01-17 15:12:05 +0000 |
444 | @@ -0,0 +1,356 @@ |
445 | +## -*- coding: utf-8 -*- |
446 | +<html> |
447 | +<head> |
448 | + <style type="text/css"> |
449 | + ${css} |
450 | + |
451 | +.list_main_table { |
452 | +border:thin solid #E3E4EA; |
453 | +text-align:center; |
454 | +border-collapse: collapse; |
455 | +} |
456 | +table.list_main_table { |
457 | + margin-top: 20px; |
458 | +} |
459 | +.list_main_headers { |
460 | + padding: 0; |
461 | +} |
462 | +.list_main_headers th { |
463 | + border: thin solid #000000; |
464 | + padding-right:3px; |
465 | + padding-left:3px; |
466 | + background-color: #EEEEEE; |
467 | + text-align:center; |
468 | + font-size:12; |
469 | + font-weight:bold; |
470 | +} |
471 | +.list_main_table td { |
472 | + padding-right:3px; |
473 | + padding-left:3px; |
474 | + padding-top:3px; |
475 | + padding-bottom:3px; |
476 | +} |
477 | +.list_main_lines, |
478 | +.list_main_footers { |
479 | + padding: 0; |
480 | +} |
481 | +.list_main_footers { |
482 | + padding-top: 15px; |
483 | +} |
484 | +.list_main_lines td, |
485 | +.list_main_footers td, |
486 | +.list_main_footers th { |
487 | + border-style: none; |
488 | + text-align:left; |
489 | + font-size:12; |
490 | + padding:0; |
491 | +} |
492 | +.list_main_footers th { |
493 | + text-align:right; |
494 | +} |
495 | + |
496 | +td .total_empty_cell { |
497 | + width: 77%; |
498 | +} |
499 | +td .total_sum_cell { |
500 | + width: 13%; |
501 | +} |
502 | + |
503 | +.nobreak { |
504 | + page-break-inside: avoid; |
505 | +} |
506 | +caption.formatted_note { |
507 | + text-align:left; |
508 | + border-right:thin solid #EEEEEE; |
509 | + border-left:thin solid #EEEEEE; |
510 | + border-top:thin solid #EEEEEE; |
511 | + padding-left:10px; |
512 | + font-size:11; |
513 | + caption-side: bottom; |
514 | +} |
515 | +caption.formatted_note p { |
516 | + margin: 0; |
517 | +} |
518 | +.list_bank_table { |
519 | + text-align:center; |
520 | + border-collapse: collapse; |
521 | + page-break-inside: avoid; |
522 | + display:table; |
523 | +} |
524 | + |
525 | +.act_as_row { |
526 | + display:table-row; |
527 | +} |
528 | +.list_bank_table .act_as_thead { |
529 | + background-color: #EEEEEE; |
530 | + text-align:left; |
531 | + font-size:12; |
532 | + font-weight:bold; |
533 | + padding-right:3px; |
534 | + padding-left:3px; |
535 | + white-space:nowrap; |
536 | + background-clip:border-box; |
537 | + display:table-cell; |
538 | +} |
539 | +.list_bank_table .act_as_cell { |
540 | + text-align:left; |
541 | + font-size:12; |
542 | + padding-right:3px; |
543 | + padding-left:3px; |
544 | + padding-top:3px; |
545 | + padding-bottom:3px; |
546 | + white-space:nowrap; |
547 | + display:table-cell; |
548 | +} |
549 | + |
550 | + |
551 | +.list_tax_table { |
552 | +} |
553 | +.list_tax_table td { |
554 | + text-align:left; |
555 | + font-size:12; |
556 | +} |
557 | +.list_tax_table th { |
558 | +} |
559 | +.list_tax_table thead { |
560 | + display:table-header-group; |
561 | +} |
562 | + |
563 | + |
564 | +.list_total_table { |
565 | + border:thin solid #E3E4EA; |
566 | + text-align:center; |
567 | + border-collapse: collapse; |
568 | +} |
569 | +.list_total_table td { |
570 | + border-top : thin solid #EEEEEE; |
571 | + text-align:left; |
572 | + font-size:12; |
573 | + padding-right:3px; |
574 | + padding-left:3px; |
575 | + padding-top:3px; |
576 | + padding-bottom:3px; |
577 | +} |
578 | +.list_total_table th { |
579 | + background-color: #EEEEEE; |
580 | + border: thin solid #000000; |
581 | + text-align:center; |
582 | + font-size:12; |
583 | + font-weight:bold; |
584 | + padding-right:3px |
585 | + padding-left:3px |
586 | +} |
587 | +.list_total_table thead { |
588 | + display:table-header-group; |
589 | +} |
590 | + |
591 | +.right_table { |
592 | + right: 4cm; |
593 | + width:"100%"; |
594 | +} |
595 | + |
596 | +.std_text { |
597 | + font-size:12; |
598 | +} |
599 | + |
600 | + |
601 | +td.amount, th.amount { |
602 | + text-align: right; |
603 | + white-space: nowrap; |
604 | +} |
605 | + |
606 | +td.date { |
607 | + white-space: nowrap; |
608 | + width: 90px; |
609 | +} |
610 | + |
611 | +td.vat { |
612 | + white-space: nowrap; |
613 | +} |
614 | +.address .recipient { |
615 | + font-size: 12px; |
616 | + margin-left: 350px; |
617 | + margin-right: 120px; |
618 | + float: right; |
619 | +} |
620 | + |
621 | +.main_col1 { |
622 | + width: 40%; |
623 | +} |
624 | +td.main_col1 { |
625 | + text-align:left; |
626 | +} |
627 | +.main_col2 { |
628 | + width: 10%; |
629 | +} |
630 | +.main_col3 { |
631 | + width: 10%; |
632 | + text-align:center; |
633 | +} |
634 | +.main_col6 { |
635 | + width: 10%; |
636 | +} |
637 | +.main_col4 { |
638 | + width: 10%; |
639 | + text-align:right; |
640 | +} |
641 | +.main_col5 { |
642 | + width: 7%; |
643 | + text-align:left; |
644 | +} |
645 | +.main_col7 { |
646 | + width: 13%; |
647 | +} |
648 | + |
649 | + |
650 | + </style> |
651 | + |
652 | +</head> |
653 | +<body> |
654 | + <%page expression_filter="entity"/> |
655 | + |
656 | + <%def name="address(partner, commercial_partner=None)"> |
657 | + <%doc> |
658 | + XXX add a helper for address in report_webkit module as this won't be suported in v8.0 |
659 | + </%doc> |
660 | + <% company_partner = False %> |
661 | + %if commercial_partner: |
662 | + %if commercial_partner.id != partner.id: |
663 | + <% company_partner = commercial_partner %> |
664 | + %endif |
665 | + %elif partner.parent_id: |
666 | + <% company_partner = partner.parent_id %> |
667 | + %endif |
668 | + |
669 | + %if company_partner: |
670 | + <tr><td class="name">${company_partner.name or ''}</td></tr> |
671 | + <tr><td>${partner.title and partner.title.name or ''} ${partner.name}</td></tr> |
672 | + <% address_lines = partner.contact_address.split("\n")[1:] %> |
673 | + %else: |
674 | + <tr><td class="name">${partner.title and partner.title.name or ''} ${partner.name}</td></tr> |
675 | + <% address_lines = partner.contact_address.split("\n") %> |
676 | + %endif |
677 | + %for part in address_lines: |
678 | + % if part: |
679 | + <tr><td>${part}</td></tr> |
680 | + % endif |
681 | + %endfor |
682 | + </%def> |
683 | + |
684 | + %for purch in objects : |
685 | + <% |
686 | + quotation = purch.state == 'draft' |
687 | + %> |
688 | + |
689 | + <% setLang(purch.partner_id.lang) %> |
690 | + <div class="address"> |
691 | + <table class="recipient"> |
692 | + ${address(partner=purch.partner_id)} |
693 | + </table> |
694 | + |
695 | + %if purch.dest_address_id: |
696 | + <table class="shipping"> |
697 | + ${address(partner=purch.dest_address_id)} |
698 | + </table> |
699 | + %endif |
700 | + </div> |
701 | + |
702 | + <h3 style="clear: both; padding-top: 20px;"> |
703 | + ${quotation and _(u'Quotation N°') or _(u'Purchase Order N°') } ${purch.name} |
704 | + </h3> |
705 | + <table class="basic_table" width="100%"> |
706 | + <tr> |
707 | + <th>${_("Source Document")}</th> |
708 | + <th style="text-align:center">${_("Your Order Reference")}</th> |
709 | + <th class="date">${_("Date Ordered")}</th> |
710 | + <th style="text-align:center">${_("Validated by")}</th> |
711 | + </tr> |
712 | + <tr> |
713 | + <td>${purch.origin or ''}</td> |
714 | + <td style="text-align:center">${purch.partner_ref or ''}</td> |
715 | + <td class="date">${formatLang(purch.date_order, date=True)}</td> |
716 | + <td style="text-align:center">${purch.validator and purch.validator.name or '' }</td> |
717 | + </tr> |
718 | + </table> |
719 | + <table class="list_main_table" width="100%" > |
720 | + <thead> |
721 | + <tr> |
722 | + <th class="list_main_headers" style="width: 100%"> |
723 | + <table style="width:100%"> |
724 | + <tr> |
725 | + <th class="main_col1">${_("Description")}</th> |
726 | + <th class="main_col2">${_("Taxes")}</th> |
727 | + <th class="main_col3">${_("Date Req.")}</th> |
728 | + <th style="text-align:center" class="amount main_col4">${_("Qty")}</th> |
729 | + <th class="main_col5">${_("UoM")}</th> |
730 | + <th class="amount main_col6">${_("Unit Price")}</th> |
731 | + <th class="amount main_col7">${_("Net Price")}</th> |
732 | + </tr> |
733 | + </table> |
734 | + </th> |
735 | + </tr> |
736 | + </thead> |
737 | + <tbody> |
738 | + %for line in purch.order_line : |
739 | + <tr> |
740 | + <td class="list_main_lines" style="width: 100%"> |
741 | + <div class="nobreak"> |
742 | + <table style="width:100%"> |
743 | + <tr> |
744 | + <td class="main_col1">${line.name}</td> |
745 | + <td style="text-align:center" class="main_col2">${ ', '.join([ tax.name or '' for tax in line.taxes_id ])}</td> |
746 | + <td style="text-align:center" class="main_col3">${formatLang(line.date_order, date=True)}</td> |
747 | + <td class="amount main_col4">${line.product_qty}</td> |
748 | + <td class="main_col5">${line.product_uom.name}</td> |
749 | + <td class="amount main col6">${formatLang(line.price_unit, digits=get_digits(dp='Purchase Price'))}</td> |
750 | + <td class="amount main_col7">${formatLang(line.price_subtotal, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}</td> |
751 | + </tr> |
752 | + </table> |
753 | + </div> |
754 | + </td> |
755 | + </tr> |
756 | + %endfor |
757 | + </tbody> |
758 | + <tfoot class="totals"> |
759 | + <tr> |
760 | + <td class="list_main_footers" style="width: 100%"> |
761 | + <div class="nobreak"> |
762 | + <table style="width:100%"> |
763 | + <tr> |
764 | + <td class="total_empty_cell"/> |
765 | + <th> |
766 | + ${_("Net :")} |
767 | + </th> |
768 | + <td class="amount total_sum_cell"> |
769 | + ${formatLang(purch.amount_untaxed, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol} |
770 | + </td> |
771 | + </tr> |
772 | + <tr> |
773 | + <td class="total_empty_cell"/> |
774 | + <th> |
775 | + ${_("Taxes:")} |
776 | + </th> |
777 | + <td class="amount total_sum_cell"> |
778 | + ${formatLang(purch.amount_tax, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol} |
779 | + </td> |
780 | + </tr> |
781 | + <tr> |
782 | + <td class="total_empty_cell"/> |
783 | + <th> |
784 | + ${_("Total:")} |
785 | + </th> |
786 | + <td class="amount total_sum_cell"> |
787 | + ${formatLang(purch.amount_total, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol} |
788 | + </td> |
789 | + </tr> |
790 | + </table> |
791 | + </div> |
792 | + </td> |
793 | + </tr> |
794 | + </tfoot> |
795 | + </table> |
796 | + <p style="page-break-after:always"/> |
797 | + <br/> |
798 | + %endfor |
799 | +</body> |
800 | +</html> |
801 | |
802 | === removed file 'purchase_order_webkit/report/purchase_order.py' |
803 | --- purchase_order_webkit/report/purchase_order.py 2011-12-20 11:27:12 +0000 |
804 | +++ purchase_order_webkit/report/purchase_order.py 1970-01-01 00:00:00 +0000 |
805 | @@ -1,45 +0,0 @@ |
806 | -# -*- coding: utf-8 -*- |
807 | -############################################################################## |
808 | -# |
809 | -# Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com) |
810 | -# @author Guewen Baconnier |
811 | -# |
812 | -# WARNING: This program as such is intended to be used by professional |
813 | -# programmers who take the whole responsability of assessing all potential |
814 | -# consequences resulting from its eventual inadequacies and bugs |
815 | -# End users who are looking for a ready-to-use solution with commercial |
816 | -# garantees and support are strongly adviced to contract a Free Software |
817 | -# Service Company |
818 | -# |
819 | -# This program is Free Software; you can redistribute it and/or |
820 | -# modify it under the terms of the GNU General Public License |
821 | -# as published by the Free Software Foundation; either version 2 |
822 | -# of the License, or (at your option) any later version. |
823 | -# |
824 | -# This program is distributed in the hope that it will be useful, |
825 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
826 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
827 | -# GNU General Public License for more details. |
828 | -# |
829 | -# You should have received a copy of the GNU General Public License |
830 | -# along with this program; if not, write to the Free Software |
831 | -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
832 | -# |
833 | -############################################################################## |
834 | - |
835 | -import time |
836 | -from report import report_sxw |
837 | - |
838 | -class purchase_report_webkit(report_sxw.rml_parse): |
839 | - def __init__(self, cr, uid, name, context): |
840 | - super(purchase_report_webkit, self).__init__(cr, uid, name, context=context) |
841 | - self.localcontext.update({ |
842 | - 'time': time, |
843 | - 'cr':cr, |
844 | - 'uid': uid, |
845 | - }) |
846 | - |
847 | -report_sxw.report_sxw('report.purchase.order.webkit', |
848 | - 'purchase.order', |
849 | - 'addons/purchase_report_webkit/report/purchase_order.mako', |
850 | - parser=purchase_report_webkit) |
851 | |
852 | === added file 'purchase_order_webkit/report/request_quotation.mako' |
853 | --- purchase_order_webkit/report/request_quotation.mako 1970-01-01 00:00:00 +0000 |
854 | +++ purchase_order_webkit/report/request_quotation.mako 2014-01-17 15:12:05 +0000 |
855 | @@ -0,0 +1,298 @@ |
856 | +## -*- coding: utf-8 -*- |
857 | +<html> |
858 | +<head> |
859 | + <style type="text/css"> |
860 | + ${css} |
861 | + |
862 | +.list_main_table { |
863 | +border:thin solid #E3E4EA; |
864 | +text-align:center; |
865 | +border-collapse: collapse; |
866 | +} |
867 | +table.list_main_table { |
868 | + margin-top: 20px; |
869 | +} |
870 | +.list_main_headers { |
871 | + padding: 0; |
872 | +} |
873 | +.list_main_headers th { |
874 | + border: thin solid #000000; |
875 | + padding-right:3px; |
876 | + padding-left:3px; |
877 | + background-color: #EEEEEE; |
878 | + text-align:center; |
879 | + font-size:12; |
880 | + font-weight:bold; |
881 | +} |
882 | +.list_main_table td { |
883 | + padding-right:3px; |
884 | + padding-left:3px; |
885 | + padding-top:3px; |
886 | + padding-bottom:3px; |
887 | +} |
888 | +.list_main_lines, |
889 | +.list_main_footers { |
890 | + padding: 0; |
891 | +} |
892 | +.list_main_footers { |
893 | + padding-top: 15px; |
894 | +} |
895 | +.list_main_lines td, |
896 | +.list_main_footers td, |
897 | +.list_main_footers th { |
898 | + border-style: none; |
899 | + text-align:left; |
900 | + font-size:12; |
901 | + padding:0; |
902 | +} |
903 | +.list_main_footers th { |
904 | + text-align:right; |
905 | +} |
906 | + |
907 | +td .total_empty_cell { |
908 | + width: 77%; |
909 | +} |
910 | +td .total_sum_cell { |
911 | + width: 13%; |
912 | +} |
913 | + |
914 | +.nobreak { |
915 | + page-break-inside: avoid; |
916 | +} |
917 | +caption.formatted_note { |
918 | + text-align:left; |
919 | + border-right:thin solid #EEEEEE; |
920 | + border-left:thin solid #EEEEEE; |
921 | + border-top:thin solid #EEEEEE; |
922 | + padding-left:10px; |
923 | + font-size:11; |
924 | + caption-side: bottom; |
925 | +} |
926 | +caption.formatted_note p { |
927 | + margin: 0; |
928 | +} |
929 | +.list_bank_table { |
930 | + text-align:center; |
931 | + border-collapse: collapse; |
932 | + page-break-inside: avoid; |
933 | + display:table; |
934 | +} |
935 | + |
936 | +.act_as_row { |
937 | + display:table-row; |
938 | +} |
939 | +.list_bank_table .act_as_thead { |
940 | + background-color: #EEEEEE; |
941 | + text-align:left; |
942 | + font-size:12; |
943 | + font-weight:bold; |
944 | + padding-right:3px; |
945 | + padding-left:3px; |
946 | + white-space:nowrap; |
947 | + background-clip:border-box; |
948 | + display:table-cell; |
949 | +} |
950 | +.list_bank_table .act_as_cell { |
951 | + text-align:left; |
952 | + font-size:12; |
953 | + padding-right:3px; |
954 | + padding-left:3px; |
955 | + padding-top:3px; |
956 | + padding-bottom:3px; |
957 | + white-space:nowrap; |
958 | + display:table-cell; |
959 | +} |
960 | + |
961 | + |
962 | +.list_tax_table { |
963 | +} |
964 | +.list_tax_table td { |
965 | + text-align:left; |
966 | + font-size:12; |
967 | +} |
968 | +.list_tax_table th { |
969 | +} |
970 | +.list_tax_table thead { |
971 | + display:table-header-group; |
972 | +} |
973 | + |
974 | + |
975 | +.list_total_table { |
976 | + border:thin solid #E3E4EA; |
977 | + text-align:center; |
978 | + border-collapse: collapse; |
979 | +} |
980 | +.list_total_table td { |
981 | + border-top : thin solid #EEEEEE; |
982 | + text-align:left; |
983 | + font-size:12; |
984 | + padding-right:3px; |
985 | + padding-left:3px; |
986 | + padding-top:3px; |
987 | + padding-bottom:3px; |
988 | +} |
989 | +.list_total_table th { |
990 | + background-color: #EEEEEE; |
991 | + border: thin solid #000000; |
992 | + text-align:center; |
993 | + font-size:12; |
994 | + font-weight:bold; |
995 | + padding-right:3px |
996 | + padding-left:3px |
997 | +} |
998 | +.list_total_table thead { |
999 | + display:table-header-group; |
1000 | +} |
1001 | + |
1002 | +.right_table { |
1003 | + right: 4cm; |
1004 | + width:"100%"; |
1005 | +} |
1006 | + |
1007 | +.std_text { |
1008 | + font-size:12; |
1009 | +} |
1010 | + |
1011 | + |
1012 | +td.amount, th.amount { |
1013 | + text-align: right; |
1014 | + white-space: nowrap; |
1015 | +} |
1016 | + |
1017 | +td.date { |
1018 | + white-space: nowrap; |
1019 | + width: 90px; |
1020 | +} |
1021 | + |
1022 | +td.vat { |
1023 | + white-space: nowrap; |
1024 | +} |
1025 | +.address .recipient { |
1026 | + font-size: 12px; |
1027 | + margin-left: 350px; |
1028 | + margin-right: 120px; |
1029 | + float: right; |
1030 | +} |
1031 | + |
1032 | +.main_col1 { |
1033 | + width: 40%; |
1034 | +} |
1035 | +td.main_col1 { |
1036 | + text-align:left; |
1037 | +} |
1038 | +.main_col2 { |
1039 | + width: 10%; |
1040 | +} |
1041 | +.main_col3 { |
1042 | + width: 10%; |
1043 | + text-align:center; |
1044 | +} |
1045 | +.main_col6 { |
1046 | + width: 10%; |
1047 | +} |
1048 | +.main_col4 { |
1049 | + width: 10%; |
1050 | + text-align:right; |
1051 | +} |
1052 | +.main_col5 { |
1053 | + width: 7%; |
1054 | + text-align:left; |
1055 | +} |
1056 | +.main_col7 { |
1057 | + width: 13%; |
1058 | +} |
1059 | + |
1060 | + |
1061 | + </style> |
1062 | +</head> |
1063 | +<body> |
1064 | + <%page expression_filter="entity"/> |
1065 | + |
1066 | + <%def name="address(partner, commercial_partner=None)"> |
1067 | + <%doc> |
1068 | + XXX add a helper for address in report_webkit module as this won't be suported in v8.0 |
1069 | + </%doc> |
1070 | + <% company_partner = False %> |
1071 | + %if commercial_partner: |
1072 | + %if commercial_partner.id != partner.id: |
1073 | + <% company_partner = commercial_partner %> |
1074 | + %endif |
1075 | + %elif partner.parent_id: |
1076 | + <% company_partner = partner.parent_id %> |
1077 | + %endif |
1078 | + |
1079 | + %if company_partner: |
1080 | + <tr><td class="name">${company_partner.name or ''}</td></tr> |
1081 | + <tr><td>${partner.title and partner.title.name or ''} ${partner.name}</td></tr> |
1082 | + <% address_lines = partner.contact_address.split("\n")[1:] %> |
1083 | + %else: |
1084 | + <tr><td class="name">${partner.title and partner.title.name or ''} ${partner.name}</td></tr> |
1085 | + <% address_lines = partner.contact_address.split("\n") %> |
1086 | + %endif |
1087 | + %for part in address_lines: |
1088 | + % if part: |
1089 | + <tr><td>${part}</td></tr> |
1090 | + % endif |
1091 | + %endfor |
1092 | + </%def> |
1093 | + |
1094 | + |
1095 | + <% |
1096 | + def carriage_returns(text): |
1097 | + return text.replace('\n', '<br />') |
1098 | + |
1099 | + %> |
1100 | + |
1101 | + %for purch in objects : |
1102 | + <% setLang(purch.partner_id.lang) %> |
1103 | + <div class="address"> |
1104 | + <table class="recipient"> |
1105 | + ${address(partner=purch.partner_id)} |
1106 | + </table> |
1107 | + |
1108 | + %if purch.dest_address_id: |
1109 | + <table class="shipping"> |
1110 | + ${address(partner=purch.dest_address_id)} |
1111 | + </table> |
1112 | + %endif |
1113 | + </div> |
1114 | + |
1115 | + <h3 style="clear:both; padding-top: 20px;">${_("Request for Quotation:")} ${purch.name}</h3> |
1116 | + <table class="list_main_table" width="100%" > |
1117 | + <thead> |
1118 | + <tr> |
1119 | + <th class="list_main_headers" style="width: 100%"> |
1120 | + <table style="width:100%"> |
1121 | + <th>${_("Description")}</th> |
1122 | + <th>${_("Expected Date")}</th> |
1123 | + <th class="amount">${_("Qty")}</th> |
1124 | + </tr> |
1125 | + </table> |
1126 | + </th> |
1127 | + </tr> |
1128 | + </thead> |
1129 | + <tbody> |
1130 | + <tr> |
1131 | + <td class="list_main_lines" style="width: 100%"> |
1132 | + <div class="nobreak"> |
1133 | + <table style="width:100%"> |
1134 | + <tr> |
1135 | + %for line in purch.order_line : |
1136 | + <tr class="line"> |
1137 | + <td>${line.name}</td> |
1138 | + <td>${formatLang(line.date_planned, date=True)}</td> |
1139 | + <td class="amount">${line.product_qty} ${line.product_uom and line.product_uom.name or ''}</td> |
1140 | + </tr> |
1141 | + %endfor |
1142 | + </table> |
1143 | + </div> |
1144 | + </td> |
1145 | + </tr> |
1146 | + </tbody> |
1147 | + </table> |
1148 | + |
1149 | + <p style="page-break-after:always"/> |
1150 | + <br/> |
1151 | + %endfor |
1152 | +</body> |
1153 | +</html> |
1154 | |
1155 | === removed file 'purchase_order_webkit/report/request_quotation.py' |
1156 | --- purchase_order_webkit/report/request_quotation.py 2011-12-20 11:27:12 +0000 |
1157 | +++ purchase_order_webkit/report/request_quotation.py 1970-01-01 00:00:00 +0000 |
1158 | @@ -1,46 +0,0 @@ |
1159 | -# -*- coding: utf-8 -*- |
1160 | -############################################################################## |
1161 | -# |
1162 | -# Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com) |
1163 | -# @author Guewen Baconnier |
1164 | -# |
1165 | -# WARNING: This program as such is intended to be used by professional |
1166 | -# programmers who take the whole responsability of assessing all potential |
1167 | -# consequences resulting from its eventual inadequacies and bugs |
1168 | -# End users who are looking for a ready-to-use solution with commercial |
1169 | -# garantees and support are strongly adviced to contract a Free Software |
1170 | -# Service Company |
1171 | -# |
1172 | -# This program is Free Software; you can redistribute it and/or |
1173 | -# modify it under the terms of the GNU General Public License |
1174 | -# as published by the Free Software Foundation; either version 2 |
1175 | -# of the License, or (at your option) any later version. |
1176 | -# |
1177 | -# This program is distributed in the hope that it will be useful, |
1178 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1179 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1180 | -# GNU General Public License for more details. |
1181 | -# |
1182 | -# You should have received a copy of the GNU General Public License |
1183 | -# along with this program; if not, write to the Free Software |
1184 | -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1185 | -# |
1186 | -############################################################################## |
1187 | - |
1188 | -import time |
1189 | -from report import report_sxw |
1190 | - |
1191 | - |
1192 | -class request_quotation(report_sxw.rml_parse): |
1193 | - def __init__(self, cr, uid, name, context): |
1194 | - super(request_quotation, self).__init__(cr, uid, name, context=context) |
1195 | - self.localcontext.update({ |
1196 | - 'time': time, |
1197 | - 'cr':cr, |
1198 | - 'uid': uid, |
1199 | - }) |
1200 | - |
1201 | -report_sxw.report_sxw('report.purchase.quotation.webkit', |
1202 | - 'purchase.order', |
1203 | - 'addons/purchase_report_webkit/report/request_quotation.mako', |
1204 | - parser=request_quotation) |
1205 | |
1206 | === renamed directory 'purchase_order_webkit' => 'purchase_order_webkit_with_notes' |
1207 | === modified file 'purchase_order_webkit_with_notes/__init__.py' |
1208 | --- purchase_order_webkit/__init__.py 2011-12-20 11:27:12 +0000 |
1209 | +++ purchase_order_webkit_with_notes/__init__.py 2014-01-17 15:12:05 +0000 |
1210 | @@ -27,4 +27,5 @@ |
1211 | # |
1212 | ############################################################################## |
1213 | |
1214 | -import report |
1215 | +from . import report |
1216 | +from . import purchase_order |
1217 | |
1218 | === modified file 'purchase_order_webkit_with_notes/__openerp__.py' |
1219 | --- purchase_order_webkit/__openerp__.py 2013-04-18 08:41:12 +0000 |
1220 | +++ purchase_order_webkit_with_notes/__openerp__.py 2014-01-17 15:12:05 +0000 |
1221 | @@ -1,8 +1,8 @@ |
1222 | # -*- coding: utf-8 -*- |
1223 | ############################################################################## |
1224 | # |
1225 | -# Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com) |
1226 | -# @author Guewen Baconnier |
1227 | +# Copyright (c) 2014 Camptocamp SA (http://www.camptocamp.com) |
1228 | +# @author Guewen Baconnier Vincent Renaville |
1229 | # |
1230 | # WARNING: This program as such is intended to be used by professional |
1231 | # programmers who take the whole responsability of assessing all potential |
1232 | @@ -28,19 +28,21 @@ |
1233 | ############################################################################## |
1234 | |
1235 | { |
1236 | - 'name': 'Purchase Order Report using Webkit Library', |
1237 | + 'name': 'Purchase Order Report using Webkit Library and notes', |
1238 | 'version': '1.0', |
1239 | 'category': 'Reports/Webkit', |
1240 | 'description': """ |
1241 | -Replaces the legacy rml Quotation / Purchase Order report by a brand new webkit report. |
1242 | +Replaces the legacy rml Quotation / Purchase Order report by |
1243 | +a brand new webkit report with header and footer notes on the purchase order and quotation |
1244 | + |
1245 | +It's the same report as purchase_order_webkit, but add notes for header and footer |
1246 | """, |
1247 | 'author': 'Camptocamp', |
1248 | - 'website': 'http://www.openerp.com', |
1249 | - 'depends': ['base', 'report_webkit', 'base_headers_webkit', 'purchase',], |
1250 | - 'init_xml': [], |
1251 | - 'update_xml': ['purchase_report.xml'], |
1252 | - 'demo_xml': [], |
1253 | + 'website': 'http://www.camptocamp.com', |
1254 | + 'depends': ['base', 'report_webkit', 'base_headers_webkit', 'purchase'], |
1255 | + 'data': ['purchase_report.xml', |
1256 | + 'view/purchase_view.xml'], |
1257 | 'test': [], |
1258 | - 'installable': False, |
1259 | + 'installable': True, |
1260 | 'active': False, |
1261 | } |
1262 | |
1263 | === modified file 'purchase_order_webkit_with_notes/i18n/fr.po' |
1264 | --- purchase_order_webkit/i18n/fr.po 2011-12-20 11:27:12 +0000 |
1265 | +++ purchase_order_webkit_with_notes/i18n/fr.po 2014-01-17 15:12:05 +0000 |
1266 | @@ -1,13 +1,13 @@ |
1267 | # Translation of OpenERP Server. |
1268 | # This file contains the translation of the following modules: |
1269 | -# * purchase_order_webkit |
1270 | +# * purchase_order_webkit_with_notes |
1271 | # |
1272 | msgid "" |
1273 | msgstr "" |
1274 | -"Project-Id-Version: OpenERP Server 6.0.3\n" |
1275 | -"Report-Msgid-Bugs-To: support@openerp.com\n" |
1276 | -"POT-Creation-Date: 2011-12-12 11:14+0000\n" |
1277 | -"PO-Revision-Date: 2011-12-12 11:14+0000\n" |
1278 | +"Project-Id-Version: OpenERP Server 7.0\n" |
1279 | +"Report-Msgid-Bugs-To: \n" |
1280 | +"POT-Creation-Date: 2013-12-11 13:01+0000\n" |
1281 | +"PO-Revision-Date: 2013-12-11 13:01+0000\n" |
1282 | "Last-Translator: <>\n" |
1283 | "Language-Team: \n" |
1284 | "MIME-Version: 1.0\n" |
1285 | @@ -15,94 +15,173 @@ |
1286 | "Content-Transfer-Encoding: \n" |
1287 | "Plural-Forms: \n" |
1288 | |
1289 | -#. module: purchase_order_webkit |
1290 | -#: report:addons/purchase_order_webkit/report/request_quotation.mako:76 |
1291 | +#. module: purchase_order_webkit_with_notes |
1292 | +#: view:purchase.condition_text:0 |
1293 | +msgid "purchase condition text" |
1294 | +msgstr "Textes des conditions d'achat" |
1295 | + |
1296 | +#. module: purchase_order_webkit_with_notes |
1297 | +#: field:purchase.condition_text,name:0 |
1298 | +msgid "Condition summary" |
1299 | +msgstr "Résumé des conditions" |
1300 | + |
1301 | +#. module: purchase_order_webkit_with_notes |
1302 | +#: model:ir.model,name:purchase_order_webkit_with_notes.model_purchase_condition_text |
1303 | +msgid "purchase conditions" |
1304 | +msgstr "Conditions d'achats" |
1305 | + |
1306 | +#. module: purchase_order_webkit_with_notes |
1307 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:282 |
1308 | +msgid "Date Req." |
1309 | +msgstr "Date prévue" |
1310 | + |
1311 | +#. module: purchase_order_webkit_with_notes |
1312 | +#: view:purchase.order:0 |
1313 | +msgid "Your bottom conditions here" |
1314 | +msgstr "Vos conditions de bas de page" |
1315 | + |
1316 | +#. module: purchase_order_webkit_with_notes |
1317 | +#: selection:purchase.condition_text,type:0 |
1318 | +msgid "Top condition" |
1319 | +msgstr "Conditions d'entête" |
1320 | + |
1321 | +#. module: purchase_order_webkit_with_notes |
1322 | +#: view:purchase.order:0 |
1323 | +msgid "Conditions" |
1324 | +msgstr "Conditions" |
1325 | + |
1326 | +#. module: purchase_order_webkit_with_notes |
1327 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:328 |
1328 | +msgid "Taxes:" |
1329 | +msgstr "Taxes :" |
1330 | + |
1331 | +#. module: purchase_order_webkit_with_notes |
1332 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:262 |
1333 | +msgid "Your Order Reference" |
1334 | +msgstr "Votre Référence de commande" |
1335 | + |
1336 | +#. module: purchase_order_webkit_with_notes |
1337 | +#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:267 |
1338 | msgid "Expected Date" |
1339 | msgstr "Date d'échéance" |
1340 | |
1341 | -#. module: purchase_order_webkit |
1342 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:35 |
1343 | -#: report:addons/purchase_order_webkit/report/request_quotation.mako:30 |
1344 | -msgid "Fax" |
1345 | -msgstr "Fax" |
1346 | - |
1347 | -#. module: purchase_order_webkit |
1348 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:87 |
1349 | -msgid "Net Price" |
1350 | -msgstr "Prix net" |
1351 | - |
1352 | -#. module: purchase_order_webkit |
1353 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:32 |
1354 | -#: report:addons/purchase_order_webkit/report/request_quotation.mako:27 |
1355 | -msgid "Tel" |
1356 | -msgstr "Tél" |
1357 | - |
1358 | -#. module: purchase_order_webkit |
1359 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:82 |
1360 | -#: report:addons/purchase_order_webkit/report/request_quotation.mako:75 |
1361 | +#. module: purchase_order_webkit_with_notes |
1362 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:261 |
1363 | +msgid "Source Document" |
1364 | +msgstr "Document d'origine" |
1365 | + |
1366 | +#. module: purchase_order_webkit_with_notes |
1367 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:280 |
1368 | +#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:266 |
1369 | msgid "Description" |
1370 | msgstr "Description" |
1371 | |
1372 | -#. module: purchase_order_webkit |
1373 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:67 |
1374 | -msgid "Your Order Reference" |
1375 | -msgstr "Votre Référence Commande" |
1376 | - |
1377 | -#. module: purchase_order_webkit |
1378 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:62 |
1379 | +#. module: purchase_order_webkit_with_notes |
1380 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:257 |
1381 | msgid "Purchase Order N°" |
1382 | msgstr "N° de confirmation du bon de commande" |
1383 | |
1384 | -#. module: purchase_order_webkit |
1385 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:68 |
1386 | +#. module: purchase_order_webkit_with_notes |
1387 | +#: field:purchase.condition_text,type:0 |
1388 | +msgid "type" |
1389 | +msgstr "type" |
1390 | + |
1391 | +#. module: purchase_order_webkit_with_notes |
1392 | +#: field:purchase.condition_text,text:0 |
1393 | +msgid "Condition" |
1394 | +msgstr "Condition" |
1395 | + |
1396 | +#. module: purchase_order_webkit_with_notes |
1397 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:284 |
1398 | +msgid "Unit Price" |
1399 | +msgstr "Prix" |
1400 | + |
1401 | +#. module: purchase_order_webkit_with_notes |
1402 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:288 |
1403 | +msgid "UoM" |
1404 | +msgstr "UdM" |
1405 | + |
1406 | +#. module: purchase_order_webkit_with_notes |
1407 | +#: view:purchase.order:0 |
1408 | +msgid "Your top conditions here" |
1409 | +msgstr "Vos conditions d'entête" |
1410 | + |
1411 | +#. module: purchase_order_webkit_with_notes |
1412 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:337 |
1413 | +msgid "Total:" |
1414 | +msgstr "Total :" |
1415 | + |
1416 | +#. module: purchase_order_webkit_with_notes |
1417 | +#: field:purchase.order,note2:0 |
1418 | +#: field:purchase.order,text_condition2:0 |
1419 | +msgid "Footer" |
1420 | +msgstr "Bas de page" |
1421 | + |
1422 | +#. module: purchase_order_webkit_with_notes |
1423 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:263 |
1424 | msgid "Date Ordered" |
1425 | msgstr "Date de Commande" |
1426 | |
1427 | -#. module: purchase_order_webkit |
1428 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:83 |
1429 | +#. module: purchase_order_webkit_with_notes |
1430 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:281 |
1431 | msgid "Taxes" |
1432 | msgstr "Taxes" |
1433 | |
1434 | -#. module: purchase_order_webkit |
1435 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:85 |
1436 | -#: report:addons/purchase_order_webkit/report/request_quotation.mako:77 |
1437 | +#. module: purchase_order_webkit_with_notes |
1438 | +#: model:ir.model,name:purchase_order_webkit_with_notes.model_purchase_order |
1439 | +msgid "Purchase Order" |
1440 | +msgstr "Bon de commande" |
1441 | + |
1442 | +#. module: purchase_order_webkit_with_notes |
1443 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:264 |
1444 | +msgid "Validated by" |
1445 | +msgstr "Validée par" |
1446 | + |
1447 | +#. module: purchase_order_webkit_with_notes |
1448 | +#: view:purchase.condition_text:0 |
1449 | +msgid "Purchase condition text" |
1450 | +msgstr "Conditions d'achat" |
1451 | + |
1452 | +#. module: purchase_order_webkit_with_notes |
1453 | +#: model:ir.actions.act_window,name:purchase_order_webkit_with_notes.action_purchase_condition_form_webkit |
1454 | +#: model:ir.actions.act_window,name:purchase_order_webkit_with_notes.action_purchase_condition_webkit |
1455 | +msgid "purchase.condition_text" |
1456 | +msgstr "purchase.condition_text" |
1457 | + |
1458 | +#. module: purchase_order_webkit_with_notes |
1459 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:283 |
1460 | +#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:268 |
1461 | msgid "Qty" |
1462 | msgstr "Qté" |
1463 | |
1464 | -#. module: purchase_order_webkit |
1465 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:38 |
1466 | -#: report:addons/purchase_order_webkit/report/request_quotation.mako:33 |
1467 | -msgid "E-mail" |
1468 | -msgstr "E-mail" |
1469 | - |
1470 | -#. module: purchase_order_webkit |
1471 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:84 |
1472 | -msgid "Date Req." |
1473 | -msgstr "Date prévue" |
1474 | - |
1475 | -#. module: purchase_order_webkit |
1476 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:69 |
1477 | -msgid "Validated by" |
1478 | -msgstr "Validée par" |
1479 | - |
1480 | -#. module: purchase_order_webkit |
1481 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:66 |
1482 | -msgid "Document" |
1483 | -msgstr "Document" |
1484 | - |
1485 | -#. module: purchase_order_webkit |
1486 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:86 |
1487 | -msgid "Unit Price" |
1488 | -msgstr "Prix" |
1489 | - |
1490 | -#. module: purchase_order_webkit |
1491 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:41 |
1492 | -#: report:addons/purchase_order_webkit/report/request_quotation.mako:36 |
1493 | -msgid "VAT" |
1494 | -msgstr "TVA" |
1495 | - |
1496 | -#. module: purchase_order_webkit |
1497 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:62 |
1498 | +#. module: purchase_order_webkit_with_notes |
1499 | +#: field:purchase.order,note1:0 |
1500 | +#: field:purchase.order,text_condition1:0 |
1501 | +msgid "Header" |
1502 | +msgstr "Entête" |
1503 | + |
1504 | +#. module: purchase_order_webkit_with_notes |
1505 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:257 |
1506 | msgid "Quotation N°" |
1507 | msgstr "Demande de prix N°" |
1508 | |
1509 | +#. module: purchase_order_webkit_with_notes |
1510 | +#: selection:purchase.condition_text,type:0 |
1511 | +msgid "Bottom condition" |
1512 | +msgstr "Conditions de bas de page" |
1513 | + |
1514 | +#. module: purchase_order_webkit_with_notes |
1515 | +#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:259 |
1516 | +msgid "Request for Quotation:" |
1517 | +msgstr "Demande de prix :" |
1518 | + |
1519 | +#. module: purchase_order_webkit_with_notes |
1520 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:285 |
1521 | +msgid "Net Price" |
1522 | +msgstr "Prix net" |
1523 | + |
1524 | +#. module: purchase_order_webkit_with_notes |
1525 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:319 |
1526 | +msgid "Net :" |
1527 | +msgstr "Net :" |
1528 | + |
1529 | |
1530 | === modified file 'purchase_order_webkit_with_notes/i18n/purchase_order_webkit.pot' |
1531 | --- purchase_order_webkit/i18n/purchase_order_webkit.pot 2011-12-20 11:27:12 +0000 |
1532 | +++ purchase_order_webkit_with_notes/i18n/purchase_order_webkit.pot 2014-01-17 15:12:05 +0000 |
1533 | @@ -1,13 +1,13 @@ |
1534 | # Translation of OpenERP Server. |
1535 | # This file contains the translation of the following modules: |
1536 | -# * purchase_order_webkit |
1537 | +# * purchase_order_webkit_with_notes |
1538 | # |
1539 | msgid "" |
1540 | msgstr "" |
1541 | -"Project-Id-Version: OpenERP Server 6.0.3\n" |
1542 | -"Report-Msgid-Bugs-To: support@openerp.com\n" |
1543 | -"POT-Creation-Date: 2011-12-12 11:14+0000\n" |
1544 | -"PO-Revision-Date: 2011-12-12 11:14+0000\n" |
1545 | +"Project-Id-Version: OpenERP Server 7.0\n" |
1546 | +"Report-Msgid-Bugs-To: \n" |
1547 | +"POT-Creation-Date: 2013-12-11 12:59+0000\n" |
1548 | +"PO-Revision-Date: 2013-12-11 12:59+0000\n" |
1549 | "Last-Translator: <>\n" |
1550 | "Language-Team: \n" |
1551 | "MIME-Version: 1.0\n" |
1552 | @@ -15,94 +15,173 @@ |
1553 | "Content-Transfer-Encoding: \n" |
1554 | "Plural-Forms: \n" |
1555 | |
1556 | -#. module: purchase_order_webkit |
1557 | -#: report:addons/purchase_order_webkit/report/request_quotation.mako:76 |
1558 | +#. module: purchase_order_webkit_with_notes |
1559 | +#: view:purchase.condition_text:0 |
1560 | +msgid "purchase condition text" |
1561 | +msgstr "" |
1562 | + |
1563 | +#. module: purchase_order_webkit_with_notes |
1564 | +#: field:purchase.condition_text,name:0 |
1565 | +msgid "Condition summary" |
1566 | +msgstr "" |
1567 | + |
1568 | +#. module: purchase_order_webkit_with_notes |
1569 | +#: model:ir.model,name:purchase_order_webkit_with_notes.model_purchase_condition_text |
1570 | +msgid "purchase conditions" |
1571 | +msgstr "" |
1572 | + |
1573 | +#. module: purchase_order_webkit_with_notes |
1574 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:282 |
1575 | +msgid "Date Req." |
1576 | +msgstr "" |
1577 | + |
1578 | +#. module: purchase_order_webkit_with_notes |
1579 | +#: view:purchase.order:0 |
1580 | +msgid "Your bottom conditions here" |
1581 | +msgstr "" |
1582 | + |
1583 | +#. module: purchase_order_webkit_with_notes |
1584 | +#: selection:purchase.condition_text,type:0 |
1585 | +msgid "Top condition" |
1586 | +msgstr "" |
1587 | + |
1588 | +#. module: purchase_order_webkit_with_notes |
1589 | +#: view:purchase.order:0 |
1590 | +msgid "Conditions" |
1591 | +msgstr "" |
1592 | + |
1593 | +#. module: purchase_order_webkit_with_notes |
1594 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:328 |
1595 | +msgid "Taxes:" |
1596 | +msgstr "" |
1597 | + |
1598 | +#. module: purchase_order_webkit_with_notes |
1599 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:262 |
1600 | +msgid "Your Order Reference" |
1601 | +msgstr "" |
1602 | + |
1603 | +#. module: purchase_order_webkit_with_notes |
1604 | +#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:267 |
1605 | msgid "Expected Date" |
1606 | msgstr "" |
1607 | |
1608 | -#. module: purchase_order_webkit |
1609 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:35 |
1610 | -#: report:addons/purchase_order_webkit/report/request_quotation.mako:30 |
1611 | -msgid "Fax" |
1612 | -msgstr "" |
1613 | - |
1614 | -#. module: purchase_order_webkit |
1615 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:87 |
1616 | -msgid "Net Price" |
1617 | -msgstr "" |
1618 | - |
1619 | -#. module: purchase_order_webkit |
1620 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:32 |
1621 | -#: report:addons/purchase_order_webkit/report/request_quotation.mako:27 |
1622 | -msgid "Tel" |
1623 | -msgstr "" |
1624 | - |
1625 | -#. module: purchase_order_webkit |
1626 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:82 |
1627 | -#: report:addons/purchase_order_webkit/report/request_quotation.mako:75 |
1628 | +#. module: purchase_order_webkit_with_notes |
1629 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:261 |
1630 | +msgid "Source Document" |
1631 | +msgstr "" |
1632 | + |
1633 | +#. module: purchase_order_webkit_with_notes |
1634 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:280 |
1635 | +#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:266 |
1636 | msgid "Description" |
1637 | msgstr "" |
1638 | |
1639 | -#. module: purchase_order_webkit |
1640 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:67 |
1641 | -msgid "Your Order Reference" |
1642 | -msgstr "" |
1643 | - |
1644 | -#. module: purchase_order_webkit |
1645 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:62 |
1646 | +#. module: purchase_order_webkit_with_notes |
1647 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:257 |
1648 | msgid "Purchase Order N°" |
1649 | msgstr "" |
1650 | |
1651 | -#. module: purchase_order_webkit |
1652 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:68 |
1653 | +#. module: purchase_order_webkit_with_notes |
1654 | +#: field:purchase.condition_text,type:0 |
1655 | +msgid "type" |
1656 | +msgstr "" |
1657 | + |
1658 | +#. module: purchase_order_webkit_with_notes |
1659 | +#: field:purchase.condition_text,text:0 |
1660 | +msgid "Condition" |
1661 | +msgstr "" |
1662 | + |
1663 | +#. module: purchase_order_webkit_with_notes |
1664 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:284 |
1665 | +msgid "Unit Price" |
1666 | +msgstr "" |
1667 | + |
1668 | +#. module: purchase_order_webkit_with_notes |
1669 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:288 |
1670 | +msgid "UoM" |
1671 | +msgstr "UdM" |
1672 | + |
1673 | +#. module: purchase_order_webkit_with_notes |
1674 | +#: view:purchase.order:0 |
1675 | +msgid "Your top conditions here" |
1676 | +msgstr "" |
1677 | + |
1678 | +#. module: purchase_order_webkit_with_notes |
1679 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:337 |
1680 | +msgid "Total:" |
1681 | +msgstr "" |
1682 | + |
1683 | +#. module: purchase_order_webkit_with_notes |
1684 | +#: field:purchase.order,note2:0 |
1685 | +#: field:purchase.order,text_condition2:0 |
1686 | +msgid "Footer" |
1687 | +msgstr "" |
1688 | + |
1689 | +#. module: purchase_order_webkit_with_notes |
1690 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:263 |
1691 | msgid "Date Ordered" |
1692 | msgstr "" |
1693 | |
1694 | -#. module: purchase_order_webkit |
1695 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:83 |
1696 | +#. module: purchase_order_webkit_with_notes |
1697 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:281 |
1698 | msgid "Taxes" |
1699 | msgstr "" |
1700 | |
1701 | -#. module: purchase_order_webkit |
1702 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:85 |
1703 | -#: report:addons/purchase_order_webkit/report/request_quotation.mako:77 |
1704 | +#. module: purchase_order_webkit_with_notes |
1705 | +#: model:ir.model,name:purchase_order_webkit_with_notes.model_purchase_order |
1706 | +msgid "Purchase Order" |
1707 | +msgstr "" |
1708 | + |
1709 | +#. module: purchase_order_webkit_with_notes |
1710 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:264 |
1711 | +msgid "Validated by" |
1712 | +msgstr "" |
1713 | + |
1714 | +#. module: purchase_order_webkit_with_notes |
1715 | +#: view:purchase.condition_text:0 |
1716 | +msgid "Purchase condition text" |
1717 | +msgstr "" |
1718 | + |
1719 | +#. module: purchase_order_webkit_with_notes |
1720 | +#: model:ir.actions.act_window,name:purchase_order_webkit_with_notes.action_purchase_condition_form_webkit |
1721 | +#: model:ir.actions.act_window,name:purchase_order_webkit_with_notes.action_purchase_condition_webkit |
1722 | +msgid "purchase.condition_text" |
1723 | +msgstr "" |
1724 | + |
1725 | +#. module: purchase_order_webkit_with_notes |
1726 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:283 |
1727 | +#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:268 |
1728 | msgid "Qty" |
1729 | msgstr "" |
1730 | |
1731 | -#. module: purchase_order_webkit |
1732 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:38 |
1733 | -#: report:addons/purchase_order_webkit/report/request_quotation.mako:33 |
1734 | -msgid "E-mail" |
1735 | -msgstr "" |
1736 | - |
1737 | -#. module: purchase_order_webkit |
1738 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:84 |
1739 | -msgid "Date Req." |
1740 | -msgstr "" |
1741 | - |
1742 | -#. module: purchase_order_webkit |
1743 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:69 |
1744 | -msgid "Validated by" |
1745 | -msgstr "" |
1746 | - |
1747 | -#. module: purchase_order_webkit |
1748 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:66 |
1749 | -msgid "Document" |
1750 | -msgstr "" |
1751 | - |
1752 | -#. module: purchase_order_webkit |
1753 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:86 |
1754 | -msgid "Unit Price" |
1755 | -msgstr "" |
1756 | - |
1757 | -#. module: purchase_order_webkit |
1758 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:41 |
1759 | -#: report:addons/purchase_order_webkit/report/request_quotation.mako:36 |
1760 | -msgid "VAT" |
1761 | -msgstr "" |
1762 | - |
1763 | -#. module: purchase_order_webkit |
1764 | -#: report:addons/purchase_order_webkit/report/purchase_order.mako:62 |
1765 | +#. module: purchase_order_webkit_with_notes |
1766 | +#: field:purchase.order,note1:0 |
1767 | +#: field:purchase.order,text_condition1:0 |
1768 | +msgid "Header" |
1769 | +msgstr "" |
1770 | + |
1771 | +#. module: purchase_order_webkit_with_notes |
1772 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:257 |
1773 | msgid "Quotation N°" |
1774 | msgstr "" |
1775 | |
1776 | +#. module: purchase_order_webkit_with_notes |
1777 | +#: selection:purchase.condition_text,type:0 |
1778 | +msgid "Bottom condition" |
1779 | +msgstr "" |
1780 | + |
1781 | +#. module: purchase_order_webkit_with_notes |
1782 | +#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:259 |
1783 | +msgid "Request for Quotation:" |
1784 | +msgstr "" |
1785 | + |
1786 | +#. module: purchase_order_webkit_with_notes |
1787 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:285 |
1788 | +msgid "Net Price" |
1789 | +msgstr "" |
1790 | + |
1791 | +#. module: purchase_order_webkit_with_notes |
1792 | +#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:319 |
1793 | +msgid "Net :" |
1794 | +msgstr "" |
1795 | + |
1796 | |
1797 | === added file 'purchase_order_webkit_with_notes/purchase_order.py' |
1798 | --- purchase_order_webkit_with_notes/purchase_order.py 1970-01-01 00:00:00 +0000 |
1799 | +++ purchase_order_webkit_with_notes/purchase_order.py 2014-01-17 15:12:05 +0000 |
1800 | @@ -0,0 +1,92 @@ |
1801 | +# -*- coding: utf-8 -*- |
1802 | +############################################################################## |
1803 | +# |
1804 | +# Copyright (c) 2013 Camptocamp SA (http://www.camptocamp.com) |
1805 | +# @author Vincent Renaville |
1806 | +# |
1807 | +# This program is free software: you can redistribute it and/or modify |
1808 | +# it under the terms of the GNU Affero General Public License as |
1809 | +# published by the Free Software Foundation, either version 3 of the |
1810 | +# License, or (at your option) any later version. |
1811 | +# |
1812 | +# This program is distributed in the hope that it will be useful, |
1813 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1814 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1815 | +# GNU Affero General Public License for more details. |
1816 | +# |
1817 | +# You should have received a copy of the GNU Affero General Public License |
1818 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1819 | +# |
1820 | +############################################################################## |
1821 | +from openerp.osv import orm, fields |
1822 | +from openerp import netsvc |
1823 | + |
1824 | + |
1825 | +class PurchaseConditionText(orm.Model): |
1826 | + """ Purchase order Textual information """ |
1827 | + _name = "purchase.condition_text" |
1828 | + _description = "purchase conditions" |
1829 | + |
1830 | + _columns = { |
1831 | + 'name': fields.char('Condition summary', required=True, size=128), |
1832 | + 'type': fields.selection([('header', 'Top condition'), |
1833 | + ('footer', 'Bottom condition')], |
1834 | + 'type', required=True), |
1835 | + 'text': fields.html('Condition', translate=True, required=True), |
1836 | + } |
1837 | + |
1838 | + |
1839 | +class PurchaseOrder(orm.Model): |
1840 | + """ Adds condition to Po """ |
1841 | + |
1842 | + _inherit = "purchase.order" |
1843 | + _description = 'Purchase Order' |
1844 | + |
1845 | + _columns = { |
1846 | + 'text_condition1': fields.many2one('purchase.condition_text', |
1847 | + 'Header', |
1848 | + domain=[('type', '=', 'header')]), |
1849 | + 'text_condition2': fields.many2one('purchase.condition_text', |
1850 | + 'Footer', |
1851 | + domain=[('type', '=', 'footer')]), |
1852 | + 'note1': fields.html('Header'), |
1853 | + 'note2': fields.html('Footer') |
1854 | + } |
1855 | + |
1856 | + def _set_condition(self, cr, uid, inv_id, commentid, key): |
1857 | + """ Set the text of the notes in purchases """ |
1858 | + if not commentid: |
1859 | + return {} |
1860 | + try: |
1861 | + lang = self.browse(cr, uid, inv_id)[0].partner_id.lang |
1862 | + except Exception: |
1863 | + lang = 'en_US' |
1864 | + cond = self.pool.get('purchase.condition_text').browse(cr, uid, |
1865 | + commentid, |
1866 | + {'lang': lang}) |
1867 | + return {'value': {key: cond.text}} |
1868 | + |
1869 | + def set_header(self, cr, uid, inv_id, commentid): |
1870 | + return self._set_condition(cr, uid, inv_id, commentid, 'note1') |
1871 | + |
1872 | + def set_footer(self, cr, uid, inv_id, commentid): |
1873 | + return self._set_condition(cr, uid, inv_id, commentid, 'note2') |
1874 | + |
1875 | + def print_quotation(self, cr, uid, ids, context=None): |
1876 | + """ |
1877 | + This function prints the purchase order and mark it as sent, |
1878 | + so that we can see more easily the next step of the workflow |
1879 | + """ |
1880 | + assert len(ids) == 1, \ |
1881 | + "This option should only be used for a single id at a time" |
1882 | + wf_service = netsvc.LocalService("workflow") |
1883 | + wf_service.trg_validate(uid, 'purchase.order', |
1884 | + ids[0], 'send_rfq', cr) |
1885 | + datas = {'model': 'purchase.order', |
1886 | + 'ids': ids, |
1887 | + 'form': self.read(cr, uid, ids[0], context=context), |
1888 | + } |
1889 | + return {'type': 'ir.actions.report.xml', |
1890 | + 'report_name': 'purchase.order.webkit', |
1891 | + 'datas': datas, |
1892 | + 'nodestroy': True} |
1893 | |
1894 | === modified file 'purchase_order_webkit_with_notes/purchase_report.xml' |
1895 | --- purchase_order_webkit/purchase_report.xml 2012-05-29 07:45:33 +0000 |
1896 | +++ purchase_order_webkit_with_notes/purchase_report.xml 2014-01-17 15:12:05 +0000 |
1897 | @@ -5,7 +5,7 @@ |
1898 | name="purchase.order.webkit" |
1899 | auto="False" |
1900 | model="purchase.order" |
1901 | - file="purchase_order_webkit/report/purchase_order.mako" |
1902 | + file="purchase_order_webkit_with_notes/report/purchase_order.mako" |
1903 | string="Purchase Order" |
1904 | report_type="webkit" /> |
1905 | |
1906 | @@ -17,7 +17,7 @@ |
1907 | name="purchase.quotation.webkit" |
1908 | auto="False" |
1909 | model="purchase.order" |
1910 | - file="purchase_order_webkit/report/request_quotation.mako" |
1911 | + file="purchase_order_webkit_with_notes/report/request_quotation.mako" |
1912 | string="Request for Quotation" |
1913 | report_type="webkit" /> |
1914 | |
1915 | |
1916 | === modified file 'purchase_order_webkit_with_notes/report/__init__.py' |
1917 | --- purchase_order_webkit/report/__init__.py 2012-11-16 10:48:03 +0000 |
1918 | +++ purchase_order_webkit_with_notes/report/__init__.py 2014-01-17 15:12:05 +0000 |
1919 | @@ -26,6 +26,3 @@ |
1920 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1921 | # |
1922 | ############################################################################## |
1923 | - |
1924 | -import purchase_order |
1925 | -import request_quotation |
1926 | \ No newline at end of file |
1927 | |
1928 | === modified file 'purchase_order_webkit_with_notes/report/purchase_order.mako' |
1929 | --- purchase_order_webkit/report/purchase_order.mako 2013-11-21 14:53:56 +0000 |
1930 | +++ purchase_order_webkit_with_notes/report/purchase_order.mako 2014-01-17 15:12:05 +0000 |
1931 | @@ -1,17 +1,241 @@ |
1932 | ## -*- coding: utf-8 -*- |
1933 | <html> |
1934 | <head> |
1935 | - <style type="text/css"> |
1936 | + <style type="text/css"> |
1937 | ${css} |
1938 | + |
1939 | +.list_main_table { |
1940 | +border:thin solid #E3E4EA; |
1941 | +text-align:center; |
1942 | +border-collapse: collapse; |
1943 | +} |
1944 | +table.list_main_table { |
1945 | + margin-top: 20px; |
1946 | +} |
1947 | +.list_main_headers { |
1948 | + padding: 0; |
1949 | +} |
1950 | +.list_main_headers th { |
1951 | + border: thin solid #000000; |
1952 | + padding-right:3px; |
1953 | + padding-left:3px; |
1954 | + background-color: #EEEEEE; |
1955 | + text-align:center; |
1956 | + font-size:12; |
1957 | + font-weight:bold; |
1958 | +} |
1959 | +.list_main_table td { |
1960 | + padding-right:3px; |
1961 | + padding-left:3px; |
1962 | + padding-top:3px; |
1963 | + padding-bottom:3px; |
1964 | +} |
1965 | +.list_main_lines, |
1966 | +.list_main_footers { |
1967 | + padding: 0; |
1968 | +} |
1969 | +.list_main_footers { |
1970 | + padding-top: 15px; |
1971 | +} |
1972 | +.list_main_lines td, |
1973 | +.list_main_footers td, |
1974 | +.list_main_footers th { |
1975 | + border-style: none; |
1976 | + text-align:left; |
1977 | + font-size:12; |
1978 | + padding:0; |
1979 | +} |
1980 | +.list_main_footers th { |
1981 | + text-align:right; |
1982 | +} |
1983 | + |
1984 | +td .total_empty_cell { |
1985 | + width: 77%; |
1986 | +} |
1987 | +td .total_sum_cell { |
1988 | + width: 13%; |
1989 | +} |
1990 | + |
1991 | +.nobreak { |
1992 | + page-break-inside: avoid; |
1993 | +} |
1994 | +caption.formatted_note { |
1995 | + text-align:left; |
1996 | + border-right:thin solid #EEEEEE; |
1997 | + border-left:thin solid #EEEEEE; |
1998 | + border-top:thin solid #EEEEEE; |
1999 | + padding-left:10px; |
2000 | + font-size:11; |
2001 | + caption-side: bottom; |
2002 | +} |
2003 | +caption.formatted_note p { |
2004 | + margin: 0; |
2005 | +} |
2006 | +.list_bank_table { |
2007 | + text-align:center; |
2008 | + border-collapse: collapse; |
2009 | + page-break-inside: avoid; |
2010 | + display:table; |
2011 | +} |
2012 | + |
2013 | +.act_as_row { |
2014 | + display:table-row; |
2015 | +} |
2016 | +.list_bank_table .act_as_thead { |
2017 | + background-color: #EEEEEE; |
2018 | + text-align:left; |
2019 | + font-size:12; |
2020 | + font-weight:bold; |
2021 | + padding-right:3px; |
2022 | + padding-left:3px; |
2023 | + white-space:nowrap; |
2024 | + background-clip:border-box; |
2025 | + display:table-cell; |
2026 | +} |
2027 | +.list_bank_table .act_as_cell { |
2028 | + text-align:left; |
2029 | + font-size:12; |
2030 | + padding-right:3px; |
2031 | + padding-left:3px; |
2032 | + padding-top:3px; |
2033 | + padding-bottom:3px; |
2034 | + white-space:nowrap; |
2035 | + display:table-cell; |
2036 | +} |
2037 | + |
2038 | + |
2039 | +.list_tax_table { |
2040 | +} |
2041 | +.list_tax_table td { |
2042 | + text-align:left; |
2043 | + font-size:12; |
2044 | +} |
2045 | +.list_tax_table th { |
2046 | +} |
2047 | +.list_tax_table thead { |
2048 | + display:table-header-group; |
2049 | +} |
2050 | + |
2051 | + |
2052 | +.list_total_table { |
2053 | + border:thin solid #E3E4EA; |
2054 | + text-align:center; |
2055 | + border-collapse: collapse; |
2056 | +} |
2057 | +.list_total_table td { |
2058 | + border-top : thin solid #EEEEEE; |
2059 | + text-align:left; |
2060 | + font-size:12; |
2061 | + padding-right:3px; |
2062 | + padding-left:3px; |
2063 | + padding-top:3px; |
2064 | + padding-bottom:3px; |
2065 | +} |
2066 | +.list_total_table th { |
2067 | + background-color: #EEEEEE; |
2068 | + border: thin solid #000000; |
2069 | + text-align:center; |
2070 | + font-size:12; |
2071 | + font-weight:bold; |
2072 | + padding-right:3px |
2073 | + padding-left:3px |
2074 | +} |
2075 | +.list_total_table thead { |
2076 | + display:table-header-group; |
2077 | +} |
2078 | + |
2079 | +.right_table { |
2080 | + right: 4cm; |
2081 | + width:"100%"; |
2082 | +} |
2083 | + |
2084 | +.std_text { |
2085 | + font-size:12; |
2086 | +} |
2087 | + |
2088 | + |
2089 | +td.amount, th.amount { |
2090 | + text-align: right; |
2091 | + white-space: nowrap; |
2092 | +} |
2093 | + |
2094 | +td.date { |
2095 | + white-space: nowrap; |
2096 | + width: 90px; |
2097 | +} |
2098 | + |
2099 | +td.vat { |
2100 | + white-space: nowrap; |
2101 | +} |
2102 | +.address .recipient { |
2103 | + font-size: 12px; |
2104 | + margin-left: 350px; |
2105 | + margin-right: 120px; |
2106 | + float: right; |
2107 | +} |
2108 | + |
2109 | +.main_col1 { |
2110 | + width: 40%; |
2111 | +} |
2112 | +td.main_col1 { |
2113 | + text-align:left; |
2114 | +} |
2115 | +.main_col2 { |
2116 | + width: 10%; |
2117 | +} |
2118 | +.main_col3 { |
2119 | + width: 10%; |
2120 | + text-align:center; |
2121 | +} |
2122 | +.main_col6 { |
2123 | + width: 10%; |
2124 | +} |
2125 | +.main_col4 { |
2126 | + width: 10%; |
2127 | + text-align:right; |
2128 | +} |
2129 | +.main_col5 { |
2130 | + width: 7%; |
2131 | + text-align:left; |
2132 | +} |
2133 | +.main_col7 { |
2134 | + width: 13%; |
2135 | +} |
2136 | + |
2137 | + |
2138 | </style> |
2139 | + |
2140 | </head> |
2141 | <body> |
2142 | <%page expression_filter="entity"/> |
2143 | - <% |
2144 | - def carriage_returns(text): |
2145 | - return text.replace('\n', '<br />') |
2146 | - |
2147 | - %> |
2148 | + |
2149 | + <%def name="address(partner, commercial_partner=None)"> |
2150 | + <%doc> |
2151 | + XXX add a helper for address in report_webkit module as this won't be suported in v8.0 |
2152 | + </%doc> |
2153 | + <% company_partner = False %> |
2154 | + %if commercial_partner: |
2155 | + %if commercial_partner.id != partner.id: |
2156 | + <% company_partner = commercial_partner %> |
2157 | + %endif |
2158 | + %elif partner.parent_id: |
2159 | + <% company_partner = partner.parent_id %> |
2160 | + %endif |
2161 | + |
2162 | + %if company_partner: |
2163 | + <tr><td class="name">${company_partner.name or ''}</td></tr> |
2164 | + <tr><td>${partner.title and partner.title.name or ''} ${partner.name}</td></tr> |
2165 | + <% address_lines = partner.contact_address.split("\n")[1:] %> |
2166 | + %else: |
2167 | + <tr><td class="name">${partner.title and partner.title.name or ''} ${partner.name}</td></tr> |
2168 | + <% address_lines = partner.contact_address.split("\n") %> |
2169 | + %endif |
2170 | + %for part in address_lines: |
2171 | + % if part: |
2172 | + <tr><td>${part}</td></tr> |
2173 | + % endif |
2174 | + %endfor |
2175 | + </%def> |
2176 | |
2177 | %for purch in objects : |
2178 | <% |
2179 | @@ -21,110 +245,116 @@ |
2180 | <% setLang(purch.partner_id.lang) %> |
2181 | <div class="address"> |
2182 | <table class="recipient"> |
2183 | - <tr><td class="name">${purch.partner_id.title and purch.partner_id.title.name or ''} ${purch.partner_id.name }</td></tr> |
2184 | - <tr><td>${purch.partner_address_id.street or ''}</td></tr> |
2185 | - <tr><td>${purch.partner_address_id.street2 or ''}</td></tr> |
2186 | - <tr><td>${purch.partner_address_id.zip or ''} ${purch.partner_address_id.city or ''}</td></tr> |
2187 | - %if purch.partner_address_id.country_id : |
2188 | - <tr><td>${purch.partner_address_id.country_id.name or ''} </td></tr> |
2189 | - %endif |
2190 | - %if purch.partner_address_id.phone : |
2191 | - <tr><td>${_("Tel")}: ${purch.partner_address_id.phone}</td></tr> |
2192 | - %endif |
2193 | - %if purch.partner_address_id.fax : |
2194 | - <tr><td>${_("Fax")}: ${purch.partner_address_id.fax}</td></tr> |
2195 | - %endif |
2196 | - %if purch.partner_address_id.email : |
2197 | - <tr><td>${_("E-mail")}: ${purch.partner_address_id.email}</td></tr> |
2198 | - %endif |
2199 | - %if purch.partner_id.vat : |
2200 | - <tr><td>${_("VAT")}: ${purch.partner_id.vat}</td></tr> |
2201 | - %endif |
2202 | + ${address(partner=purch.partner_id)} |
2203 | </table> |
2204 | |
2205 | %if purch.dest_address_id: |
2206 | <table class="shipping"> |
2207 | - <tr><td class="address_title">${_("Shipping address:")}</td></tr> |
2208 | - <tr><td>${purch.partner_id.title and purch.partner_id.title.name or ''} ${purch.partner_id.name }</td></tr> |
2209 | - <tr><td>${purch.dest_address_id.street or ''}</td></tr> |
2210 | - <tr><td>${purch.dest_address_id.street2 or ''}</td></tr> |
2211 | - <tr><td>${purch.dest_address_id.zip or ''} ${purch.dest_address_id.city or ''}</td></tr> |
2212 | - %if purch.dest_address_id.state_id: |
2213 | - <tr><td>${purch.dest_address_id.state_id.name or ''} </td></tr> |
2214 | - %endif |
2215 | - %if purch.dest_address_id.country_id: |
2216 | - <tr><td>${purch.dest_address_id.country_id.name or ''} </td></tr> |
2217 | - %endif |
2218 | + ${address(partner=purch.dest_address_id)} |
2219 | </table> |
2220 | %endif |
2221 | </div> |
2222 | |
2223 | - <h1 style="clear:both; padding-top: 20px;">${quotation and _(u'Quotation N°') or _(u'Purchase Order N°') } ${purch.name}</h1> |
2224 | - |
2225 | + <h3 style="clear: both; padding-top: 20px;"> |
2226 | + ${quotation and _(u'Quotation N°') or _(u'Purchase Order N°') } ${purch.name} |
2227 | + </h3> |
2228 | <table class="basic_table" width="100%"> |
2229 | <tr> |
2230 | - <td>${_("Document")}</td> |
2231 | - <td>${_("Your Order Reference")}</td> |
2232 | - <td>${_("Date Ordered")}</td> |
2233 | - <td>${_("Validated by")}</td> |
2234 | + <th>${_("Source Document")}</th> |
2235 | + <th style="text-align:center">${_("Your Order Reference")}</th> |
2236 | + <th class="date">${_("Date Ordered")}</th> |
2237 | + <th style="text-align:center">${_("Validated by")}</th> |
2238 | </tr> |
2239 | <tr> |
2240 | - <td>${purch.name}</td> |
2241 | - <td>${purch.partner_ref or ''}</td> |
2242 | - <td>${formatLang(purch.date_order, date=True)}</td> |
2243 | - <td>${purch.validator and purch.validator.name or '' }</td> |
2244 | + <td>${purch.origin or ''}</td> |
2245 | + <td style="text-align:center">${purch.partner_ref or ''}</td> |
2246 | + <td class="date">${formatLang(purch.date_order, date=True)}</td> |
2247 | + <td style="text-align:center">${purch.validator and purch.validator.name or '' }</td> |
2248 | </tr> |
2249 | </table> |
2250 | - |
2251 | - <table class="list_table" width="100%" style="margin-top: 30px;"> |
2252 | + %if purch.note1: |
2253 | + <p>${purch.note1 or '' | n}</p> |
2254 | + %endif |
2255 | + <table class="list_main_table" width="100%" > |
2256 | <thead> |
2257 | <tr> |
2258 | - <th>${_("Description")}</th> |
2259 | - <th>${_("Taxes")}</th> |
2260 | - <th>${_("Date Req.")}</th> |
2261 | - <th class="amount">${_("Qty")}</th> |
2262 | - <th class="amount">${_("Unit Price")}</th> |
2263 | - <th class="amount">${_("Net Price")}</th> |
2264 | + <th class="list_main_headers" style="width: 100%"> |
2265 | + <table style="width:100%"> |
2266 | + <tr> |
2267 | + <th class="main_col1">${_("Description")}</th> |
2268 | + <th class="main_col2">${_("Taxes")}</th> |
2269 | + <th class="main_col3">${_("Date Req.")}</th> |
2270 | + <th style="text-align:center" class="amount main_col4">${_("Qty")}</th> |
2271 | + <th class="main_col5">${_("UoM")}</th> |
2272 | + <th class="amount main_col6">${_("Unit Price")}</th> |
2273 | + <th class="amount main_col7">${_("Net Price")}</th> |
2274 | + </tr> |
2275 | + </table> |
2276 | + </th> |
2277 | </tr> |
2278 | </thead> |
2279 | <tbody> |
2280 | %for line in purch.order_line : |
2281 | - <tr class="line"> |
2282 | - <td>${line.name}</td> |
2283 | - <td>${ ', '.join([ tax.name or '' for tax in line.taxes_id ])}</td> |
2284 | - <td>${formatLang(line.date_order, date=True)}</td> |
2285 | - <td class="amount">${line.product_qty} ${line.product_uom.name}</td> |
2286 | - <td class="amount">${formatLang(line.price_unit, digits=get_digits(dp='Purchase Price'))}</td> |
2287 | - <td class="amount">${formatLang(line.price_subtotal, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}</td> |
2288 | - </tr> |
2289 | - %if line.notes : |
2290 | - <tr class="line"> |
2291 | - <td colspan="6" class="note">${line.notes | carriage_returns}</td> |
2292 | - </tr> |
2293 | - %endif |
2294 | - %endfor |
2295 | + <tr> |
2296 | + <td class="list_main_lines" style="width: 100%"> |
2297 | + <div class="nobreak"> |
2298 | + <table style="width:100%"> |
2299 | + <tr> |
2300 | + <td class="main_col1">${line.name}</td> |
2301 | + <td style="text-align:center" class="main_col2">${ ', '.join([ tax.name or '' for tax in line.taxes_id ])}</td> |
2302 | + <td style="text-align:center" class="main_col3">${formatLang(line.date_order, date=True)}</td> |
2303 | + <td class="amount main_col4">${line.product_qty}</td> |
2304 | + <td class="main_col5">${line.product_uom.name}</td> |
2305 | + <td class="amount main col6">${formatLang(line.price_unit, digits=get_digits(dp='Purchase Price'))}</td> |
2306 | + <td class="amount main_col7">${formatLang(line.price_subtotal, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}</td> |
2307 | + </tr> |
2308 | + </table> |
2309 | + </div> |
2310 | + </td> |
2311 | + </tr> |
2312 | + %endfor |
2313 | </tbody> |
2314 | - <tfoot> |
2315 | - <tr> |
2316 | - <td colspan="4" style="border-style:none"/> |
2317 | - <td style="border-top:2px solid"><b>${_("Net Total:")}</b></td> |
2318 | - <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> |
2319 | - </tr> |
2320 | - <tr> |
2321 | - <td colspan="4" style="border-style:none"/> |
2322 | - <td style="border-style:none"><b>${_("Taxes:")}</b></td> |
2323 | - <td class="amount">${formatLang(purch.amount_tax, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}</td> |
2324 | - </tr> |
2325 | - <tr> |
2326 | - <td colspan="4" style="border-style:none"/> |
2327 | - <td style="border-top:2px solid"><b>${_("Total:")}</b></td> |
2328 | - <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> |
2329 | - </tr> |
2330 | - </tfoot> |
2331 | - </table> |
2332 | - |
2333 | - <p style="margin-top: 40px;">${purch.notes or '' | carriage_returns}</p> |
2334 | - |
2335 | + <tfoot class="totals"> |
2336 | + <tr> |
2337 | + <td class="list_main_footers" style="width: 100%"> |
2338 | + <div class="nobreak"> |
2339 | + <table style="width:100%"> |
2340 | + <tr> |
2341 | + <td class="total_empty_cell"/> |
2342 | + <th> |
2343 | + ${_("Net :")} |
2344 | + </th> |
2345 | + <td class="amount total_sum_cell"> |
2346 | + ${formatLang(purch.amount_untaxed, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol} |
2347 | + </td> |
2348 | + </tr> |
2349 | + <tr> |
2350 | + <td class="total_empty_cell"/> |
2351 | + <th> |
2352 | + ${_("Taxes:")} |
2353 | + </th> |
2354 | + <td class="amount total_sum_cell"> |
2355 | + ${formatLang(purch.amount_tax, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol} |
2356 | + </td> |
2357 | + </tr> |
2358 | + <tr> |
2359 | + <td class="total_empty_cell"/> |
2360 | + <th> |
2361 | + ${_("Total:")} |
2362 | + </th> |
2363 | + <td class="amount total_sum_cell"> |
2364 | + ${formatLang(purch.amount_total, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol} |
2365 | + </td> |
2366 | + </tr> |
2367 | + </table> |
2368 | + </div> |
2369 | + </td> |
2370 | + </tr> |
2371 | + </tfoot> |
2372 | + </table> |
2373 | + %if purch.note2: |
2374 | + <p>${purch.note2 or '' | n}</p> |
2375 | + %endif |
2376 | <p style="page-break-after:always"/> |
2377 | <br/> |
2378 | %endfor |
2379 | |
2380 | === modified file 'purchase_order_webkit_with_notes/report/request_quotation.mako' |
2381 | --- purchase_order_webkit/report/request_quotation.mako 2013-11-21 14:53:56 +0000 |
2382 | +++ purchase_order_webkit_with_notes/report/request_quotation.mako 2014-01-17 15:12:05 +0000 |
2383 | @@ -1,12 +1,242 @@ |
2384 | ## -*- coding: utf-8 -*- |
2385 | <html> |
2386 | <head> |
2387 | - <style type="text/css"> |
2388 | + <style type="text/css"> |
2389 | ${css} |
2390 | + |
2391 | +.list_main_table { |
2392 | +border:thin solid #E3E4EA; |
2393 | +text-align:center; |
2394 | +border-collapse: collapse; |
2395 | +} |
2396 | +table.list_main_table { |
2397 | + margin-top: 20px; |
2398 | +} |
2399 | +.list_main_headers { |
2400 | + padding: 0; |
2401 | +} |
2402 | +.list_main_headers th { |
2403 | + border: thin solid #000000; |
2404 | + padding-right:3px; |
2405 | + padding-left:3px; |
2406 | + background-color: #EEEEEE; |
2407 | + text-align:center; |
2408 | + font-size:12; |
2409 | + font-weight:bold; |
2410 | +} |
2411 | +.list_main_table td { |
2412 | + padding-right:3px; |
2413 | + padding-left:3px; |
2414 | + padding-top:3px; |
2415 | + padding-bottom:3px; |
2416 | +} |
2417 | +.list_main_lines, |
2418 | +.list_main_footers { |
2419 | + padding: 0; |
2420 | +} |
2421 | +.list_main_footers { |
2422 | + padding-top: 15px; |
2423 | +} |
2424 | +.list_main_lines td, |
2425 | +.list_main_footers td, |
2426 | +.list_main_footers th { |
2427 | + border-style: none; |
2428 | + text-align:left; |
2429 | + font-size:12; |
2430 | + padding:0; |
2431 | +} |
2432 | +.list_main_footers th { |
2433 | + text-align:right; |
2434 | +} |
2435 | + |
2436 | +td .total_empty_cell { |
2437 | + width: 77%; |
2438 | +} |
2439 | +td .total_sum_cell { |
2440 | + width: 13%; |
2441 | +} |
2442 | + |
2443 | +.nobreak { |
2444 | + page-break-inside: avoid; |
2445 | +} |
2446 | +caption.formatted_note { |
2447 | + text-align:left; |
2448 | + border-right:thin solid #EEEEEE; |
2449 | + border-left:thin solid #EEEEEE; |
2450 | + border-top:thin solid #EEEEEE; |
2451 | + padding-left:10px; |
2452 | + font-size:11; |
2453 | + caption-side: bottom; |
2454 | +} |
2455 | +caption.formatted_note p { |
2456 | + margin: 0; |
2457 | +} |
2458 | +.list_bank_table { |
2459 | + text-align:center; |
2460 | + border-collapse: collapse; |
2461 | + page-break-inside: avoid; |
2462 | + display:table; |
2463 | +} |
2464 | + |
2465 | +.act_as_row { |
2466 | + display:table-row; |
2467 | +} |
2468 | +.list_bank_table .act_as_thead { |
2469 | + background-color: #EEEEEE; |
2470 | + text-align:left; |
2471 | + font-size:12; |
2472 | + font-weight:bold; |
2473 | + padding-right:3px; |
2474 | + padding-left:3px; |
2475 | + white-space:nowrap; |
2476 | + background-clip:border-box; |
2477 | + display:table-cell; |
2478 | +} |
2479 | +.list_bank_table .act_as_cell { |
2480 | + text-align:left; |
2481 | + font-size:12; |
2482 | + padding-right:3px; |
2483 | + padding-left:3px; |
2484 | + padding-top:3px; |
2485 | + padding-bottom:3px; |
2486 | + white-space:nowrap; |
2487 | + display:table-cell; |
2488 | +} |
2489 | + |
2490 | + |
2491 | +.list_tax_table { |
2492 | +} |
2493 | +.list_tax_table td { |
2494 | + text-align:left; |
2495 | + font-size:12; |
2496 | +} |
2497 | +.list_tax_table th { |
2498 | +} |
2499 | +.list_tax_table thead { |
2500 | + display:table-header-group; |
2501 | +} |
2502 | + |
2503 | + |
2504 | +.list_total_table { |
2505 | + border:thin solid #E3E4EA; |
2506 | + text-align:center; |
2507 | + border-collapse: collapse; |
2508 | +} |
2509 | +.list_total_table td { |
2510 | + border-top : thin solid #EEEEEE; |
2511 | + text-align:left; |
2512 | + font-size:12; |
2513 | + padding-right:3px; |
2514 | + padding-left:3px; |
2515 | + padding-top:3px; |
2516 | + padding-bottom:3px; |
2517 | +} |
2518 | +.list_total_table th { |
2519 | + background-color: #EEEEEE; |
2520 | + border: thin solid #000000; |
2521 | + text-align:center; |
2522 | + font-size:12; |
2523 | + font-weight:bold; |
2524 | + padding-right:3px |
2525 | + padding-left:3px |
2526 | +} |
2527 | +.list_total_table thead { |
2528 | + display:table-header-group; |
2529 | +} |
2530 | + |
2531 | +.right_table { |
2532 | + right: 4cm; |
2533 | + width:"100%"; |
2534 | +} |
2535 | + |
2536 | +.std_text { |
2537 | + font-size:12; |
2538 | +} |
2539 | + |
2540 | + |
2541 | +td.amount, th.amount { |
2542 | + text-align: right; |
2543 | + white-space: nowrap; |
2544 | +} |
2545 | + |
2546 | +td.date { |
2547 | + white-space: nowrap; |
2548 | + width: 90px; |
2549 | +} |
2550 | + |
2551 | +td.vat { |
2552 | + white-space: nowrap; |
2553 | +} |
2554 | +.address .recipient { |
2555 | + font-size: 12px; |
2556 | + margin-left: 350px; |
2557 | + margin-right: 120px; |
2558 | + float: right; |
2559 | +} |
2560 | + |
2561 | +.main_col1 { |
2562 | + width: 40%; |
2563 | +} |
2564 | +td.main_col1 { |
2565 | + text-align:left; |
2566 | +} |
2567 | +.main_col2 { |
2568 | + width: 10%; |
2569 | +} |
2570 | +.main_col3 { |
2571 | + width: 10%; |
2572 | + text-align:center; |
2573 | +} |
2574 | +.main_col6 { |
2575 | + width: 10%; |
2576 | +} |
2577 | +.main_col4 { |
2578 | + width: 10%; |
2579 | + text-align:right; |
2580 | +} |
2581 | +.main_col5 { |
2582 | + width: 7%; |
2583 | + text-align:left; |
2584 | +} |
2585 | +.main_col7 { |
2586 | + width: 13%; |
2587 | +} |
2588 | + |
2589 | + |
2590 | </style> |
2591 | </head> |
2592 | <body> |
2593 | <%page expression_filter="entity"/> |
2594 | + |
2595 | + <%def name="address(partner, commercial_partner=None)"> |
2596 | + <%doc> |
2597 | + XXX add a helper for address in report_webkit module as this won't be suported in v8.0 |
2598 | + </%doc> |
2599 | + <% company_partner = False %> |
2600 | + %if commercial_partner: |
2601 | + %if commercial_partner.id != partner.id: |
2602 | + <% company_partner = commercial_partner %> |
2603 | + %endif |
2604 | + %elif partner.parent_id: |
2605 | + <% company_partner = partner.parent_id %> |
2606 | + %endif |
2607 | + |
2608 | + %if company_partner: |
2609 | + <tr><td class="name">${company_partner.name or ''}</td></tr> |
2610 | + <tr><td>${partner.title and partner.title.name or ''} ${partner.name}</td></tr> |
2611 | + <% address_lines = partner.contact_address.split("\n")[1:] %> |
2612 | + %else: |
2613 | + <tr><td class="name">${partner.title and partner.title.name or ''} ${partner.name}</td></tr> |
2614 | + <% address_lines = partner.contact_address.split("\n") %> |
2615 | + %endif |
2616 | + %for part in address_lines: |
2617 | + % if part: |
2618 | + <tr><td>${part}</td></tr> |
2619 | + % endif |
2620 | + %endfor |
2621 | + </%def> |
2622 | + |
2623 | + |
2624 | <% |
2625 | def carriage_returns(text): |
2626 | return text.replace('\n', '<br />') |
2627 | @@ -17,91 +247,56 @@ |
2628 | <% setLang(purch.partner_id.lang) %> |
2629 | <div class="address"> |
2630 | <table class="recipient"> |
2631 | - <tr><td class="name">${purch.partner_id.title and purch.partner_id.title.name or ''} ${purch.partner_id.name }</td></tr> |
2632 | - <tr><td>${purch.partner_address_id.street or ''}</td></tr> |
2633 | - <tr><td>${purch.partner_address_id.street2 or ''}</td></tr> |
2634 | - <tr><td>${purch.partner_address_id.zip or ''} ${purch.partner_address_id.city or ''}</td></tr> |
2635 | - %if purch.partner_address_id.country_id : |
2636 | - <tr><td>${purch.partner_address_id.country_id.name or ''} </td></tr> |
2637 | - %endif |
2638 | - %if purch.partner_address_id.phone : |
2639 | - <tr><td>${_("Tel")}: ${purch.partner_address_id.phone}</td></tr> |
2640 | - %endif |
2641 | - %if purch.partner_address_id.fax : |
2642 | - <tr><td>${_("Fax")}: ${purch.partner_address_id.fax}</td></tr> |
2643 | - %endif |
2644 | - %if purch.partner_address_id.email : |
2645 | - <tr><td>${_("E-mail")}: ${purch.partner_address_id.email}</td></tr> |
2646 | - %endif |
2647 | - %if purch.partner_id.vat : |
2648 | - <tr><td>${_("VAT")}: ${purch.partner_id.vat}</td></tr> |
2649 | - %endif |
2650 | + ${address(partner=purch.partner_id)} |
2651 | </table> |
2652 | |
2653 | - <table class="shipping"> |
2654 | - <tr><td class="address_title">${_("Expected Delivery address:")}</td></tr> |
2655 | - %if purch.dest_address_id: |
2656 | - <tr><td>${purch.partner_id.title and purch.partner_id.title.name or ''} ${purch.partner_id.name }</td></tr> |
2657 | - <tr><td>${purch.dest_address_id.street or ''}</td></tr> |
2658 | - <tr><td>${purch.dest_address_id.street2 or ''}</td></tr> |
2659 | - <tr><td>${purch.dest_address_id.zip or ''} ${purch.dest_address_id.city or ''}</td></tr> |
2660 | - %if purch.dest_address_id.state_id: |
2661 | - <tr><td>${purch.dest_address_id.state_id.name or ''} </td></tr> |
2662 | - %endif |
2663 | - %if purch.dest_address_id.country_id: |
2664 | - <tr><td>${purch.dest_address_id.country_id.name or ''} </td></tr> |
2665 | - %endif |
2666 | - %elif purch.warehouse_id: |
2667 | - <tr><td>${purch.warehouse_id.name }</td></tr> |
2668 | - %if purch.warehouse_id.partner_address_id: |
2669 | - <tr><td>${purch.warehouse_id.partner_address_id.street or ''}</td></tr> |
2670 | - <tr><td>${purch.warehouse_id.partner_address_id.street2 or ''}</td></tr> |
2671 | - <tr><td>${purch.warehouse_id.partner_address_id.zip or ''} ${purch.warehouse_id.partner_address_id.city or ''}</td></tr> |
2672 | - %if purch.warehouse_id.partner_address_id.state_id: |
2673 | - <tr><td>${purch.warehouse_id.partner_address_id.state_id.name or ''} </td></tr> |
2674 | - %endif |
2675 | - %if purch.warehouse_id.partner_address_id.country_id: |
2676 | - <tr><td>${purch.warehouse_id.partner_address_id.country_id.name or ''} </td></tr> |
2677 | - %endif |
2678 | - %endif |
2679 | - %endif |
2680 | - </table> |
2681 | + %if purch.dest_address_id: |
2682 | + <table class="shipping"> |
2683 | + ${address(partner=purch.dest_address_id)} |
2684 | + </table> |
2685 | + %endif |
2686 | </div> |
2687 | |
2688 | - <h1 style="clear:both; padding-top: 20px;">${_("Request for Quotation:")} ${purch.name}</h1> |
2689 | - |
2690 | - <table class="list_table" width="100%" style="margin-top: 40px;"> |
2691 | + <h3 style="clear:both; padding-top: 20px;">${_("Request for Quotation:")} ${purch.name}</h3> |
2692 | + %if purch.note1: |
2693 | + <p>${purch.note1 or '' | n}</p> |
2694 | + %endif |
2695 | + <table class="list_main_table" width="100%" > |
2696 | <thead> |
2697 | <tr> |
2698 | + <th class="list_main_headers" style="width: 100%"> |
2699 | + <table style="width:100%"> |
2700 | <th>${_("Description")}</th> |
2701 | <th>${_("Expected Date")}</th> |
2702 | <th class="amount">${_("Qty")}</th> |
2703 | + </tr> |
2704 | + </table> |
2705 | + </th> |
2706 | </tr> |
2707 | </thead> |
2708 | <tbody> |
2709 | - %for line in purch.order_line : |
2710 | - <tr class="line"> |
2711 | - <td>${line.name}</td> |
2712 | - <td>${formatLang(line.date_planned, date=True)}</td> |
2713 | - <td class="amount">${line.product_qty} ${line.product_uom and line.product_uom.name or ''}</td> |
2714 | - </tr> |
2715 | - %if line.notes : |
2716 | - <tr class="line"> |
2717 | - <td colspan="6" class="note">${line.notes | carriage_returns}</td> |
2718 | - </tr> |
2719 | - %endif |
2720 | - %endfor |
2721 | + <tr> |
2722 | + <td class="list_main_lines" style="width: 100%"> |
2723 | + <div class="nobreak"> |
2724 | + <table style="width:100%"> |
2725 | + <tr> |
2726 | + %for line in purch.order_line : |
2727 | + <tr class="line"> |
2728 | + <td>${line.name}</td> |
2729 | + <td>${formatLang(line.date_planned, date=True)}</td> |
2730 | + <td class="amount">${line.product_qty} ${line.product_uom and line.product_uom.name or ''}</td> |
2731 | + </tr> |
2732 | + %endfor |
2733 | + </table> |
2734 | + </div> |
2735 | + </td> |
2736 | + </tr> |
2737 | </tbody> |
2738 | </table> |
2739 | |
2740 | - <p style="margin-top: 20px;">${purch.notes or '' | carriage_returns}</p> |
2741 | - |
2742 | - <p style="margin-top: 20px;"> |
2743 | - ${_("Regards,")} |
2744 | - </p> |
2745 | - |
2746 | - <p style="margin-top: 20px;">${user.signature or ''}</p> |
2747 | - |
2748 | + %if purch.note2: |
2749 | + <p>${purch.note2 or '' | n}</p> |
2750 | + %endif |
2751 | <p style="page-break-after:always"/> |
2752 | <br/> |
2753 | %endfor |
2754 | |
2755 | === added directory 'purchase_order_webkit_with_notes/view' |
2756 | === added file 'purchase_order_webkit_with_notes/view/purchase_view.xml' |
2757 | --- purchase_order_webkit_with_notes/view/purchase_view.xml 1970-01-01 00:00:00 +0000 |
2758 | +++ purchase_order_webkit_with_notes/view/purchase_view.xml 2014-01-17 15:12:05 +0000 |
2759 | @@ -0,0 +1,69 @@ |
2760 | +<?xml version="1.0"?> |
2761 | +<openerp> |
2762 | + <data> |
2763 | + <!-- Sale condition text views --> |
2764 | + <record model="ir.ui.view" id="view_purchase_condition_webkit"> |
2765 | + <field name="name">purchase.condition_text.form</field> |
2766 | + <field name="model">purchase.condition_text</field> |
2767 | + <field name="type">form</field> |
2768 | + <field name="arch" type="xml"> |
2769 | + <form string="purchase condition text"> |
2770 | + <field name="name" select="1"/> |
2771 | + <field name="type" select="1"/> |
2772 | + <field name="text" colspan="4"/> |
2773 | + </form> |
2774 | + </field> |
2775 | + </record> |
2776 | + <record model="ir.ui.view" id="view_purchase_condition_list_webkit"> |
2777 | + <field name="name">purchase.condition_text.list</field> |
2778 | + <field name="model">purchase.condition_text</field> |
2779 | + <field name="type">tree</field> |
2780 | + <field name="priority" eval="6"/> |
2781 | + <field name="arch" type="xml"> |
2782 | + <tree string="Purchase condition text"> |
2783 | + <field name="name" select="1"/> |
2784 | + <field name="type" select="1"/> |
2785 | + <field name="text"/> |
2786 | + </tree> |
2787 | + </field> |
2788 | + </record> |
2789 | + <record model="ir.actions.act_window" id="action_purchase_condition_webkit"> |
2790 | + <field name="name">purchase.condition_text</field> |
2791 | + <field name="type">ir.actions.act_window</field> |
2792 | + <field name="res_model">purchase.condition_text</field> |
2793 | + <field name="view_type">form</field> |
2794 | + <field name="view_mode">tree,form</field> |
2795 | + <field name="view_id" ref="view_purchase_condition_list_webkit"/> |
2796 | + </record> |
2797 | + <record model="ir.actions.act_window" id="action_purchase_condition_form_webkit"> |
2798 | + <field name="name">purchase.condition_text</field> |
2799 | + <field name="type">ir.actions.act_window</field> |
2800 | + <field name="res_model">purchase.condition_text</field> |
2801 | + <field name="view_type">form</field> |
2802 | + <field name="view_id" ref="view_purchase_condition_webkit"/> |
2803 | + </record> |
2804 | + |
2805 | + <!-- Overwrite of sale order / sale order line form view --> |
2806 | + |
2807 | + <record model="ir.ui.view" id="purchase_order_form_over"> |
2808 | + <field name="name">purchase.order.form.add.notes</field> |
2809 | + <field name="model">purchase.order</field> |
2810 | + <field name="inherit_id" ref="purchase.purchase_order_form"/> |
2811 | + <field name="arch" type="xml"> |
2812 | + <xpath expr="//page[last()]" position="after"> |
2813 | + <page string="Conditions"> |
2814 | + <group> |
2815 | + <field name="text_condition1" domain="[('type','=','header')]" |
2816 | + on_change="set_header(text_condition1)" colspan="2"/> |
2817 | + <field name="text_condition2" domain="[('type','=','footer')]" |
2818 | + on_change="set_footer(text_condition2)" colspan="2"/> |
2819 | + <field name="note1" colspan="4" nolabel="1" placeholder="Your top conditions here"/> |
2820 | + <field name="note2" colspan="4" nolabel="1" placeholder="Your bottom conditions here"/> |
2821 | + </group> |
2822 | + </page> |
2823 | + </xpath> |
2824 | + </field> |
2825 | + </record> |
2826 | + |
2827 | + </data> |
2828 | +</openerp> |
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.