Skip to content

Commit

Permalink
Merge pull request #175 from yvaucher/8.0-lo-printout-imp
Browse files Browse the repository at this point in the history
8.0 Logistic Order printout improvements
  • Loading branch information
pedrobaeza committed Jun 2, 2015
2 parents 7850178 + a00d8e5 commit 6ca9dff
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 28 deletions.
1 change: 1 addition & 0 deletions logistic_budget/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"view/sale_order_budget_update.xml",
"view/sale_order.xml",
"view/report_logistic_requisition.xml",
"view/report_saleorder.xml",
"data/exceptions.xml",
],
"auto_install": False,
Expand Down
14 changes: 12 additions & 2 deletions logistic_budget/i18n/logistic_budget.pot
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-27 09:53+0000\n"
"PO-Revision-Date: 2015-04-27 09:53+0000\n"
"POT-Creation-Date: 2015-05-27 15:05+0000\n"
"PO-Revision-Date: 2015-05-27 15:05+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -56,6 +56,7 @@ msgstr ""

#. module: logistic_budget
#: view:website:logistic_requisition.report_logistic_requisition_document
#: view:website:sale.report_saleorder_document
msgid "Budget holder:"
msgstr ""

Expand All @@ -81,6 +82,7 @@ msgstr ""

#. module: logistic_budget
#: view:website:logistic_requisition.report_logistic_requisition_document
#: view:website:sale.report_saleorder_document
msgid "Date:"
msgstr ""

Expand All @@ -104,6 +106,7 @@ msgstr ""

#. module: logistic_budget
#: view:website:logistic_requisition.report_logistic_requisition_document
#: view:website:sale.report_saleorder_document
msgid "Finance Officer:"
msgstr ""

Expand Down Expand Up @@ -144,6 +147,7 @@ msgstr ""

#. module: logistic_budget
#: view:website:logistic_requisition.report_logistic_requisition_document
#: view:website:sale.report_saleorder_document
msgid "Name:"
msgstr ""

Expand All @@ -157,6 +161,11 @@ msgstr ""
msgid "No Budget Holder"
msgstr ""

#. module: logistic_budget
#: view:website:sale.report_saleorder_document
msgid "Remarks:"
msgstr ""

#. module: logistic_budget
#: model:ir.model,name:logistic_budget.model_sale_order
msgid "Sales Order"
Expand All @@ -169,6 +178,7 @@ msgstr ""

#. module: logistic_budget
#: view:website:logistic_requisition.report_logistic_requisition_document
#: view:website:sale.report_saleorder_document
msgid "Signature:"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion logistic_budget/view/report_logistic_requisition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<xpath expr="//table[@id='incoterm-info']" position="before">

<table class="table table-bordered" width="100%">
<table class="table table-bordered" id="budget_sign" width="100%">
<tr>
<th></th>
<th><strong>Name:</strong></th>
Expand Down
60 changes: 60 additions & 0 deletions logistic_budget/view/report_saleorder.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

<template id="report_saleorder_document" inherit_id="logistic_order.report_logistic_order_document">

<xpath expr='//p[@t-field="o.note"]' position="after">

<table class="table table-bordered" style="page-break-inside: avoid" id="budget_sign" width="100%">
<tr>
<th></th>
<th><strong>Name:</strong></th>
<th><strong>Date:</strong></th>
<th><strong>Signature:</strong></th>
</tr>
<tr t-if="o.budget_holder_id">
<td><strong>Budget holder:</strong></td>
<td>
<span t-field="o.budget_holder_id"/>
</td>
<td>
<span t-if="o.date_budget_holder" t-field="o.date_budget_holder"/>
<span t-if="not o.date_budget_holder" class="input-lg col-xs-3"/>
</td>
<td class="input-lg col-xs-3"/>
</tr>
<tr t-if="o.budget_holder_id and o.budget_holder_remark">
<td class="text-center">
Remarks:
</td>
<td colspan="3">
<span t-field="o.budget_holder_remark"/>
</td>
</tr>
<tr t-if="o.finance_officer_id">
<td><strong>Finance Officer:</strong></td>
<td>
<span t-field="o.finance_officer_id"/>
</td>
<td>
<span t-if="o.date_finance_officer" t-field="o.date_finance_officer"/>
<span t-if="not o.date_finance_officer" class="input-lg col-xs-3"/>
</td>
<td class="input-lg col-xs-3"/>
</tr>
<tr t-if="o.finance_officer_id and o.finance_officer_remark">
<td class="text-center">
Remarks:
</td>
<td colspan="3">
<span t-field="o.finance_officer_remark"/>
</td>
</tr>
</table>
</xpath>

</template>

</data>
</openerp>
21 changes: 8 additions & 13 deletions logistic_order/i18n/logistic_order.pot
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-05-05 12:12+0000\n"
"PO-Revision-Date: 2015-05-05 12:12+0000\n"
"POT-Creation-Date: 2015-05-27 15:37+0000\n"
"PO-Revision-Date: 2015-05-27 15:37+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -86,7 +86,7 @@ msgid "INCOTERMS 2010"
msgstr ""

#. module: logistic_order
#: code:addons/logistic_order/model/sale_order.py:151
#: code:addons/logistic_order/model/sale_order.py:142
#, python-format
msgid "If this is not only for Cost Estimate, you must provide a Consignee"
msgstr ""
Expand Down Expand Up @@ -159,6 +159,11 @@ msgstr ""
msgid "Payment term"
msgstr ""

#. module: logistic_order
#: view:website:sale.report_saleorder_document
msgid "Prepared by:"
msgstr ""

#. module: logistic_order
#: field:sale.order,remark:0
msgid "Remarks / Description"
Expand Down Expand Up @@ -244,11 +249,6 @@ msgstr ""
msgid "Volume (m³)"
msgstr ""

#. module: logistic_order
#: view:website:sale.report_saleorder_document
msgid "Volume per unit (m³)"
msgstr ""

#. module: logistic_order
#: view:website:sale.report_saleorder_document
msgid "Weight"
Expand All @@ -259,11 +259,6 @@ msgstr ""
msgid "Weight (kg)"
msgstr ""

#. module: logistic_order
#: view:website:sale.report_saleorder_document
msgid "Weight per unit (kg)"
msgstr ""

#. module: logistic_order
#: view:sale.order:logistic_order.view_order_form
msgid "draft,sent,accepted"
Expand Down
18 changes: 6 additions & 12 deletions logistic_order/view/report_logisticorder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@
</xpath>

<xpath expr='//div[@t-if="o.date_order" and @class="col-xs-3"]' position="replace">
<div t-if="o.date_order" class="col-xs-3">
<strong t-if="o.state not in ['progress','manual','done']">Date:</strong>
<strong t-if="o.state in ['progress','manual','done']">Order Date:</strong>
<p t-field="o.date_order"/>
</div>
</xpath>

<xpath expr='//strong[text()="Salesperson:"]' position="replace">
<strong>Prepared by:</strong>
</xpath>

<xpath expr='//div[@t-if="o.payment_term" and @class="col-xs-3"]' position="after">
Expand All @@ -29,28 +35,16 @@
<xpath expr="//tbody[@class='sale_tbody']//span[@t-esc=&quot;', '.join(map(lambda x: x.name, l.tax_id))&quot;]/.." position="replace"/>

<xpath expr="//table//th[text()='Quantity']" position="after">
<th class="text-right col-xs-1">Weight per unit (kg)</th>
<th class="text-right col-xs-1">Total weight (kg)</th>
<th class="text-right col-xs-1">Volume per unit (m³)</th>
<th class="text-right col-xs-1">Total volume (m³)</th>
</xpath>

<xpath expr="//tbody[@class='sale_tbody']//span[@t-field='l.product_uom_qty']/.." position="after">
<td class="text-right">
<t t-if="l.product_id">
<span t-field="l.product_id.weight"/>
</t>
</td>
<td class="text-right">
<t t-if="l.product_id">
<span t-esc="l.product_id.weight * l.product_uom_qty"/>
</t>
</td>
<td class="text-right">
<t t-if="l.product_id">
<span t-field="l.product_id.volume"/>
</t>
</td>
<td class="text-right">
<t t-if="l.product_id">
<span t-esc="l.product_id.volume * l.product_uom_qty"/>
Expand Down

0 comments on commit 6ca9dff

Please sign in to comment.