openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #06001
[Merge] lp:~camptocamp/purchase-report/purchase_print_button into lp:purchase-report
Vincent Renaville@camptocamp has proposed merging lp:~camptocamp/purchase-report/purchase_print_button into lp:purchase-report.
Requested reviews:
Purchase Core Editors (purchase-core-editors)
For more details, see:
https://code.launchpad.net/~camptocamp/purchase-report/purchase_print_button/+merge/216024
This branches add the following fixes:
- remove unused <tr> in repport
- fix button to print quotation to print the correct webkit report
And add the feature
- Print the purchase order when the quotation is confirmed
--
https://code.launchpad.net/~camptocamp/purchase-report/purchase_print_button/+merge/216024
Your team Purchase Core Editors is requested to review the proposed merge of lp:~camptocamp/purchase-report/purchase_print_button into lp:purchase-report.
=== modified file 'purchase_order_webkit/__init__.py'
--- purchase_order_webkit/__init__.py 2014-01-10 11:04:45 +0000
+++ purchase_order_webkit/__init__.py 2014-04-17 10:56:06 +0000
@@ -27,4 +27,5 @@
#
##############################################################################
-from . import report
\ No newline at end of file
+from . import report
+from . import purchase_order
\ No newline at end of file
=== modified file 'purchase_order_webkit/__openerp__.py'
--- purchase_order_webkit/__openerp__.py 2014-02-21 13:18:22 +0000
+++ purchase_order_webkit/__openerp__.py 2014-04-17 10:56:06 +0000
@@ -39,7 +39,8 @@
'author': 'Camptocamp',
'website': 'http://www.camptocamp.com',
'depends': ['base', 'report_webkit', 'base_headers_webkit', 'purchase'],
- 'data': ['purchase_report.xml'],
+ 'data': ['purchase_report.xml',
+ 'view/purchase_view.xml'],
'test': [],
'installable': True,
'active': False,
=== modified file 'purchase_order_webkit/i18n/de.po'
--- purchase_order_webkit/i18n/de.po 2014-04-17 06:56:13 +0000
+++ purchase_order_webkit/i18n/de.po 2014-04-17 10:56:06 +0000
@@ -134,3 +134,25 @@
#: report:addons/purchase_order_webkit/report/purchase_order.mako:319
msgid "Net :"
msgstr "Netto:"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:266
+msgid "Shipping address:"
+msgstr "Lieferadresse:"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/request_quotation.mako:268
+msgid "Shipping address:"
+msgstr "Lieferadresse:"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:259
+msgid "Invoice address:"
+msgstr "Rechnungsadresse:"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/request_quotation.mako:261
+msgid "Invoice address:"
+msgstr "Rechnungsadresse:"
+
+
=== modified file 'purchase_order_webkit/i18n/fr.po'
--- purchase_order_webkit/i18n/fr.po 2014-04-17 06:56:13 +0000
+++ purchase_order_webkit/i18n/fr.po 2014-04-17 10:56:06 +0000
@@ -134,3 +134,24 @@
#: report:addons/purchase_order_webkit/report/purchase_order.mako:319
msgid "Net :"
msgstr "Net :"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:266
+msgid "Shipping address:"
+msgstr "Adresse de livraison:"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/request_quotation.mako:268
+msgid "Shipping address:"
+msgstr "Adresse de livraison:"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:259
+msgid "Invoice address:"
+msgstr "Adresse de facturation:"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/request_quotation.mako:261
+msgid "Invoice address:"
+msgstr "Adresse de facturation:"
+
=== modified file 'purchase_order_webkit/i18n/purchase_order_webkit.pot'
--- purchase_order_webkit/i18n/purchase_order_webkit.pot 2014-01-13 13:08:43 +0000
+++ purchase_order_webkit/i18n/purchase_order_webkit.pot 2014-04-17 10:56:06 +0000
@@ -135,3 +135,23 @@
msgid "Net :"
msgstr ""
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:266
+msgid "Shipping address:"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/request_quotation.mako:268
+msgid "Shipping address:"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/purchase_order.mako:259
+msgid "Invoice address:"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit/report/request_quotation.mako:261
+msgid "Invoice address:"
+msgstr ""
+
=== modified file 'purchase_order_webkit/report/purchase_order.mako'
--- purchase_order_webkit/report/purchase_order.mako 2014-04-07 16:11:22 +0000
+++ purchase_order_webkit/report/purchase_order.mako 2014-04-17 10:56:06 +0000
@@ -254,10 +254,17 @@
<table class="recipient">
${address(partner=purch.partner_id)}
</table>
-
+ %if purch.company_id.partner_id:
+ <table class="invoice">
+ <tr><td class="address_title">${_("Invoice address:")}</td></tr>
+ ${address(partner=purch.company_id.partner_id)}
+ </table>
+ %endif
+ <br/>
%if purch.dest_address_id:
<table class="shipping">
- ${address(partner=purch.dest_address_id)}
+ <tr><td class="address_title">${_("Shipping address:")}</td></tr>
+ ${address(partner=purch.dest_address_id)}
</table>
%endif
</div>
=== modified file 'purchase_order_webkit/report/request_quotation.mako'
--- purchase_order_webkit/report/request_quotation.mako 2014-04-07 16:11:22 +0000
+++ purchase_order_webkit/report/request_quotation.mako 2014-04-17 10:56:06 +0000
@@ -254,12 +254,19 @@
<% setLang(purch.partner_id.lang) %>
<div class="address">
<table class="recipient">
- ${address(partner=purch.partner_id)}
+ ${address(partner=purch.partner_id)}
</table>
-
+ %if purch.company_id.partner_id:
+ <table class="invoice">
+ <tr><td class="address_title">${_("Invoice address:")}</td></tr>
+ ${address(partner=purch.company_id.partner_id)}
+ </table>
+ %endif
+ <br/>
%if purch.dest_address_id:
<table class="shipping">
- ${address(partner=purch.dest_address_id)}
+ <tr><td class="address_title">${_("Shipping address:")}</td></tr>
+ ${address(partner=purch.dest_address_id)}
</table>
%endif
</div>
@@ -267,23 +274,23 @@
<h3 style="clear:both; padding-top: 20px;">${_("Request for Quotation:")} ${purch.name}</h3>
<table class="list_main_table" width="100%" >
<thead>
- <tr>
+ <tr>
<th class="list_main_headers" style="width: 100%">
<table style="width:100%">
+ <tr>
<th class="main_col1">${_("Description")}</th>
<th class="main_col3">${_("Expected Date")}</th>
<th style="text-align:center" class="amount main_col4">${_("Qty")}</th>
</tr>
</table>
</th>
- </tr>
+ </tr>
</thead>
<tbody>
<tr>
<td class="list_main_lines" style="width: 100%">
<div class="nobreak">
<table style="width:100%">
- <tr>
%for line in purch.order_line :
<tr class="line">
<td class="main_col1">${line.name.replace('\n','<br/>') or '' | n}</td>
=== added directory 'purchase_order_webkit/view'
=== added file 'purchase_order_webkit/view/purchase_view.xml'
--- purchase_order_webkit/view/purchase_view.xml 1970-01-01 00:00:00 +0000
+++ purchase_order_webkit/view/purchase_view.xml 2014-04-17 10:56:06 +0000
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<openerp>
+ <data>
+
+ <record model="ir.ui.view" id="purchase_order_form_over">
+ <field name="name">purchase.order.form.add.notes</field>
+ <field name="model">purchase.order</field>
+ <field name="inherit_id" ref="purchase.purchase_order_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="//button[@name='print_quotation'][last()]" position="after">
+ <button name="print_purchase" string="Print" type="object" states="approved,except_picking,except_invoice" groups="base.group_user"/>
+ </xpath>
+ </field>
+ </record>
+
+ </data>
+</openerp>
=== modified file 'purchase_order_webkit_with_notes/i18n/fr.po'
--- purchase_order_webkit_with_notes/i18n/fr.po 2014-04-17 06:56:13 +0000
+++ purchase_order_webkit_with_notes/i18n/fr.po 2014-04-17 10:56:06 +0000
@@ -186,3 +186,23 @@
#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:319
msgid "Net :"
msgstr "Net :"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:266
+msgid "Shipping address:"
+msgstr "Adresse de livraison:"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:268
+msgid "Shipping address:"
+msgstr "Adresse de livraison:"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:259
+msgid "Invoice address:"
+msgstr "Adresse de facturation:"
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:261
+msgid "Invoice address:"
+msgstr "Adresse de facturation:"
=== modified file 'purchase_order_webkit_with_notes/i18n/purchase_order_webkit.pot'
--- purchase_order_webkit_with_notes/i18n/purchase_order_webkit.pot 2014-01-13 13:08:43 +0000
+++ purchase_order_webkit_with_notes/i18n/purchase_order_webkit.pot 2014-04-17 10:56:06 +0000
@@ -185,3 +185,22 @@
msgid "Net :"
msgstr ""
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:266
+msgid "Shipping address:"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:268
+msgid "Shipping address:"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit_with_notes/report/purchase_order.mako:259
+msgid "Invoice address:"
+msgstr ""
+
+#. module: purchase_order_webkit
+#: report:addons/purchase_order_webkit_with_notes/report/request_quotation.mako:261
+msgid "Invoice address:"
+msgstr ""
=== modified file 'purchase_order_webkit_with_notes/purchase_order.py'
--- purchase_order_webkit_with_notes/purchase_order.py 2013-12-19 10:16:53 +0000
+++ purchase_order_webkit_with_notes/purchase_order.py 2014-04-17 10:56:06 +0000
@@ -87,6 +87,21 @@
'form': self.read(cr, uid, ids[0], context=context),
}
return {'type': 'ir.actions.report.xml',
+ 'report_name': 'purchase.quotation.webkit',
+ 'datas': datas,
+ 'nodestroy': True}
+
+ def print_purchase(self, cr, uid, ids, context=None):
+ """
+ This function prints the purchase order and mark it as sent,
+ so that we can see more easily the next step of the workflow
+ """
+ datas = {'model': 'purchase.order',
+ 'ids': ids,
+ 'form': self.read(cr, uid, ids[0], context=context),
+ }
+ return {'type': 'ir.actions.report.xml',
'report_name': 'purchase.order.webkit',
'datas': datas,
'nodestroy': True}
+
=== modified file 'purchase_order_webkit_with_notes/report/purchase_order.mako'
--- purchase_order_webkit_with_notes/report/purchase_order.mako 2014-04-07 16:14:25 +0000
+++ purchase_order_webkit_with_notes/report/purchase_order.mako 2014-04-17 10:56:06 +0000
@@ -252,12 +252,19 @@
<% setLang(purch.partner_id.lang) %>
<div class="address">
<table class="recipient">
- ${address(partner=purch.partner_id)}
+ ${address(partner=purch.partner_id)}
</table>
-
+ %if purch.company_id.partner_id:
+ <table class="invoice">
+ <tr><td class="address_title">${_("Invoice address:")}</td></tr>
+ ${address(partner=purch.company_id.partner_id)}
+ </table>
+ %endif
+ <br/>
%if purch.dest_address_id:
<table class="shipping">
- ${address(partner=purch.dest_address_id)}
+ <tr><td class="address_title">${_("Shipping address:")}</td></tr>
+ ${address(partner=purch.dest_address_id)}
</table>
%endif
</div>
=== modified file 'purchase_order_webkit_with_notes/report/request_quotation.mako'
--- purchase_order_webkit_with_notes/report/request_quotation.mako 2014-04-07 16:14:25 +0000
+++ purchase_order_webkit_with_notes/report/request_quotation.mako 2014-04-17 10:56:06 +0000
@@ -254,12 +254,19 @@
<% setLang(purch.partner_id.lang) %>
<div class="address">
<table class="recipient">
- ${address(partner=purch.partner_id)}
+ ${address(partner=purch.partner_id)}
</table>
-
+ %if purch.company_id.partner_id:
+ <table class="invoice">
+ <tr><td class="address_title">${_("Invoice address:")}</td></tr>
+ ${address(partner=purch.company_id.partner_id)}
+ </table>
+ %endif
+ <br/>
%if purch.dest_address_id:
<table class="shipping">
- ${address(partner=purch.dest_address_id)}
+ <tr><td class="address_title">${_("Shipping address:")}</td></tr>
+ ${address(partner=purch.dest_address_id)}
</table>
%endif
</div>
@@ -273,6 +280,7 @@
<tr>
<th class="list_main_headers" style="width: 100%">
<table style="width:100%">
+ <tr>
<th class="main_col1">${_("Description")}</th>
<th class="main_col3">${_("Expected Date")}</th>
<th style="text-align:center" class="amount main_col4">${_("Qty")}</th>
=== modified file 'purchase_order_webkit_with_notes/view/purchase_view.xml'
--- purchase_order_webkit_with_notes/view/purchase_view.xml 2014-01-13 08:54:55 +0000
+++ purchase_order_webkit_with_notes/view/purchase_view.xml 2014-04-17 10:56:06 +0000
@@ -50,6 +50,9 @@
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
+ <xpath expr="//button[@name='print_quotation'][last()]" position="after">
+ <button name="print_purchase" string="Print" type="object" states="approved,except_picking,except_invoice" groups="base.group_user"/>
+ </xpath>
<xpath expr="//page[last()]" position="after">
<page string="Conditions">
<group>
Follow ups