Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.00 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <data>
  4. <template id="report_invoice_document_edited" inherit_id="account.report_invoice_document">
  5. <xpath expr="//div[hasclass('page')]" position="replace">
  6. <xpath expr="." position="inside">
  7. <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet"/>
  8. </xpath>
  9. <div class="page"
  10. style="margin-left: 17mm; margin-right: 25px; padding-top: 10mm; padding-button: 75px; font-family: 'Open Sans', sans-serif; font-size: 15px;">
  11. <div class="row" style="padding-bottom: 15px;">
  12. <div name="invoice_address" class="col-xs-6 col-xs-offset-6"/>
  13. </div>
  14. <div class="row">
  15. <div class="col-xs-6">
  16. <address t-field="o.partner_id"
  17. t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/>
  18. </div>
  19. <!--<div t-if="o.partner_id.vat" class="mt16"><t t-esc="o.company_id.country_id.vat_label or 'TIN'"/>: <span t-field="o.partner_id.vat"/></div>-->
  20. <div class="col-xs-6 float-left">
  21. <div class="row row-bottom-margin" style="margin-left: 11mm;">
  22. <div class="col-xs-6">
  23. <h2 style="font-family: 'Open Sans', sans-serif; font-size: 15px;display: inline">
  24. <span t-if="o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')">
  25. Invoice Number
  26. </span>
  27. <span t-if="o.type == 'out_invoice' and o.state == 'draft'">Draft Invoice</span>
  28. <span t-if="o.type == 'out_invoice' and o.state == 'cancel'">Cancelled Invoice
  29. </span>
  30. <span t-if="o.type == 'out_refund'">Credit Note</span>
  31. <span t-if="o.type == 'in_refund'">Vendor Credit Note</span>
  32. <span t-if="o.type == 'in_invoice'">Vendor Bill</span>
  33. </h2>
  34. </div>
  35. <div class="col-xs-6">
  36. <b>
  37. <span t-field="o.number"/>
  38. </b>
  39. </div>
  40. </div>
  41. <div style="margin-left: 11mm;" t-if="o.date_invoice" class="row row-bottom-margin">
  42. <br/>
  43. <div class="col-xs-6">
  44. Invoice Date
  45. </div>
  46. <div class="col-xs-6">
  47. <span t-field="o.date_invoice"/>
  48. </div>
  49. </div>
  50. <div style="margin-left: 11mm;" t-if="o.origin" class="row">
  51. <div t-if="o.type == 'out_invoice'" class="col-xs-6">
  52. Order ID
  53. </div>
  54. <div t-if="o.type == 'out_refund'" class="col-xs-6">
  55. Invoice
  56. </div>
  57. <div class="col-xs-6">
  58. <span t-field="o.origin"/>
  59. </div>
  60. </div>
  61. <div style="margin-left: 11mm;" t-if="o.partner_id.ref" class="row">
  62. <div class="col-xs-6">
  63. Customer Code
  64. </div>
  65. <div class="col-xs-6">
  66. <span t-field="o.partner_id.ref"/>
  67. </div>
  68. </div>
  69. <div style="margin-left: 11mm;" t-if="o.partner_id.id" class="row">
  70. <div class="col-xs-6">
  71. Customer ID
  72. </div>
  73. <div class="col-xs-6">
  74. <span t-field="o.partner_id.custom_id"/>
  75. </div>
  76. </div>
  77. <div style="margin-left: 11mm;" name="reference" t-if="o.reference" class="row">
  78. <div class="col-xs-6">
  79. Reference
  80. </div>
  81. <div class="col-xs-6">
  82. <span t-field="o.reference"/>
  83. </div>
  84. </div>
  85. <div style="margin-left: 11mm;" t-if="o.payment_term_id" class="row">
  86. <div class="col-xs-6">
  87. Payment terms
  88. </div>
  89. <div class="col-xs-6">
  90. <span t-field="o.payment_term_id"/>
  91. </div>
  92. </div>
  93. <div style="margin-left: 11mm;" t-if="o.payment_method" class="row">
  94. <div class="col-xs-6">
  95. Payment method
  96. </div>
  97. <div class="col-xs-6">
  98. <span t-field="o.payment_method"/>
  99. </div>
  100. </div>
  101. <br/>
  102. <div style="margin-left: 11mm;" t-if="o.partner_shipping_id" class="row">
  103. <div class="col-xs-6">
  104. Shipping address
  105. </div>
  106. <div class="col-xs-6">
  107. <div t-field="o.partner_shipping_id.name"/>
  108. <div t-field="o.partner_shipping_id.street"/>
  109. <div t-field="o.partner_shipping_id.street2"/>
  110. <div t-field="o.partner_shipping_id.zip"/>
  111. <div t-field="o.partner_shipping_id.city"/>
  112. <div t-field="o.partner_shipping_id.country_id.name"/>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. <div class="row">
  118. <div t-if="o.type == 'out_invoice'" class="col-xs-4 col-xs-offset-0"
  119. style="padding-bottom: 30px; font-size: 25px; margin-top: 2cm;">
  120. <b>Invoice</b>
  121. </div>
  122. <div t-if="o.type == 'out_refund'" class="col-xs-4 col-xs-offset-0"
  123. style="padding-bottom: 30px; font-size: 25px; margin-top: 2cm;">
  124. <b>Credit Note</b>
  125. </div>
  126. </div>
  127. <t t-set="display_discount" t-value="any([l.discount for l in o.invoice_line_ids])"/>
  128.  
  129. <table class="table table-condensed" name="invoice_line_table">
  130. <thead>
  131. <tr>
  132. <th style="border-bottom: 1px solid #000000 !important;">Product</th>
  133. <th class="hidden" style="border-bottom: 1px solid #000000 !important;">Source
  134. Document
  135. </th>
  136. <th class="text-right" style="border-bottom: 1px solid #000000 !important;">Quantity
  137. </th>
  138. <th class="text-right" style="border-bottom: 1px solid #000000 !important;">Unit Price
  139. </th>
  140. <th t-if="display_discount" class="text-right"
  141. style="border-bottom: 1px solid #000000 !important;">Disc.(%)
  142. </th>
  143. <th class="text-right" style="border-bottom: 1px solid #000000 !important;">Amount</th>
  144. </tr>
  145. </thead>
  146. <tbody class="invoice_tbody">
  147. <tr t-foreach="o.invoice_line_ids" t-as="l" t-if="o.partner_id.is_company">
  148. <td>
  149. <span t-field="l.name"/>
  150. </td>
  151. <td class="hidden">
  152. <span t-field="l.origin"/>
  153. </td>
  154. <td class="text-right">
  155. <span t-field="l.quantity"/>
  156. <span t-field="l.uom_id" groups="product.group_uom"/>
  157. </td>
  158. <td class="text-right">
  159. <span t-field="l.price_unit"/>
  160. </td>
  161. <td t-if="display_discount" class="text-right">
  162. <span t-field="l.discount"/>
  163. </td>
  164. <td class="text-right" id="subtotal_company">
  165. <span t-field="l.price_subtotal"
  166. t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
  167. </td>
  168. </tr>
  169. <tr t-else="o.partner_id.customer">
  170. <td>
  171. <span t-field="l.product_id"/>
  172. </td>
  173. <td class="hidden">
  174. <span t-field="l.origin"/>
  175. </td>
  176. <td class="text-right">
  177. <span t-esc="int(l.quantity)"/>
  178. <span t-field="l.uom_id" groups="product.group_uom"/>
  179. </td>
  180. <td class="text-right">
  181. <span t-field="l.price_unit"/>
  182. </td>
  183. <td t-if="display_discount" class="text-right">
  184. <span t-field="l.discount"/>
  185. </td>
  186. <td class="text-right" id="subtotal_customer">
  187. <span t-field="l.price_total"
  188. t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
  189. </td>
  190. </tr>
  191. </tbody>
  192.  
  193. </table>
  194.  
  195. <div class="clearfix" style="border-top: 1px solid #000000;">
  196. <div id="total" class="row">
  197. <div class="col-xs-6 pull-right">
  198. <table class="table">
  199. <tr>
  200. <td>
  201. <strong>Subtotal</strong>
  202. </td>
  203. <td class="text-right">
  204. <span t-field="o.amount_untaxed"
  205. t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
  206. </td>
  207. </tr>
  208. <t t-foreach="o._get_tax_amount_by_group()" t-as="amount_by_group">
  209. <tr>
  210. <t t-if="len(o.tax_line_ids) == 1 and o.amount_untaxed == amount_by_group[2]">
  211. <td>
  212. <span t-esc="amount_by_group[0]"/>
  213. <span>&amp;nbsp;
  214. <span>on</span>
  215. <t t-esc="amount_by_group[4]"/>
  216. </span>
  217. </td>
  218. <td class="text-right">
  219. <span t-esc="amount_by_group[3]"/>
  220. </td>
  221. </t>
  222. <t t-else="">
  223. <td>
  224. <span t-esc="amount_by_group[0]"/>
  225. </td>
  226. <td class="text-right">
  227. <span t-esc="amount_by_group[3]"/>
  228. </td>
  229. </t>
  230. </tr>
  231. </t>
  232. <tr class="border-black">
  233. <td>
  234. <strong>Total</strong>
  235. </td>
  236. <td class="text-right">
  237. <span t-field="o.amount_total"
  238. t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
  239. </td>
  240. </tr>
  241. </table>
  242. </div>
  243. </div>
  244. </div>
  245. <div t-if="o.comment">
  246. <span t-field="o.comment"/>
  247. </div>
  248. <div t-if="o.fiscal_position_id.note">
  249. <span t-field="o.fiscal_position_id.note"/>
  250. </div>
  251. </div>
  252. </xpath>
  253. </template>
  254. </data>
  255. </odoo>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement