You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

255 lines
13 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <template id="theme_invoice_G002_document">
  5. <t t-call="theme_light.invoice_layout">
  6. <t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})" />
  7. <div class="page">
  8. <head>
  9. <link href="/easy_my_coop/static/src/css/coop_report.css" rel="stylesheet"/>
  10. <style type="text/css">
  11. /* Montserrat */
  12. @font-face {
  13. font-family: 'Montserrat-Regular';
  14. font-style: normal;
  15. src: local('Montserrat Regular'), url('/theme_light/static/font/Montserrat-Regular.ttf') format('truetype');
  16. }
  17. /* Roboto Regular */
  18. @font-face {
  19. font-family: 'Roboto-Regular';
  20. font-style: normal;
  21. src: local('Roboto Regular'), url('/theme_light/static/font/Roboto-Regular.ttf') format('truetype');
  22. }
  23. /* Roboto Bold */
  24. @font-face {
  25. font-family: 'Roboto-Bold';
  26. font-style: normal;
  27. src: local('Roboto Bold'), url('/theme_light/static/font/Roboto-Bold.ttf') format('truetype');
  28. }
  29. /* BEBASNEUE Bold */
  30. @font-face {
  31. font-family: 'Bebasneue-Bold';
  32. font-style: normal;
  33. src: local('Bebasneue-Bold'), url('/theme_light/static/font/BEBASNEUE_BOLD.ttf') format('truetype');
  34. }
  35. </style>
  36. </head>
  37. <t t-call="theme_light.invoice_header"/>
  38. <div class="row">
  39. <div class="col-xs-5 col-xs-offset-7 easymy-coop-address" style="top:90px;">
  40. <address t-field="o.partner_id"
  41. t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}' />
  42. <span t-if="o.partner_id.vat">TIN: <span t-field="o.partner_id.vat"/></span>
  43. </div>
  44. </div>
  45. <div style="position:absolute; top:364px">
  46. <h2 style="font-family:Bebasneue-Bold;font-size:20pt;line-height:14pt;">
  47. <span t-if="o.release_capital_request == True">REQUEST TO RELEASE CAPITAL</span>
  48. <span t-if="o.release_capital_request == False">
  49. <span t-if="o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')">Invoice</span>
  50. <span t-if="o.type == 'out_invoice' and o.state == 'proforma2'">PRO-FORMA</span>
  51. <span t-if="o.type == 'out_invoice' and o.state == 'draft'">Draft Invoice</span>
  52. <span t-if="o.type == 'out_invoice' and o.state == 'cancel'">Cancelled Invoice</span>
  53. <span t-if="o.type == 'out_refund'">Refund</span>
  54. <span t-if="o.type == 'in_refund'">Vendor Refund</span>
  55. <span t-if="o.type == 'in_invoice'">Vendor Bill</span>
  56. </span>
  57. <span t-field="o.number"/>
  58. <div style="width:220px;position:relative;top:10px;border-bottom: 4pt solid #e7511e;"/>
  59. </h2>
  60. <div class="row mt32 mb32 easymy-coop-info-title" style="top:102px;">
  61. <div class="col-xs-2" t-if="o.name">
  62. <strong>Description:</strong>
  63. <p t-field="o.name"/>
  64. </div>
  65. <div class="col-xs-2" t-if="o.release_capital_request == True and o.date_invoice">
  66. <strong>Request Date:</strong>
  67. <p t-field="o.date_invoice"/>
  68. </div>
  69. <div class="col-xs-2" t-if="o.release_capital_request == False and o.date_invoice">
  70. <strong>Invoice Date:</strong>
  71. <p t-field="o.date_invoice"/>
  72. </div>
  73. <div class="col-xs-2" t-if="o.release_capital_request == False and (o.date_due and o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid'))">
  74. <strong>Due Date:</strong>
  75. <p t-field="o.date_due"/>
  76. </div>
  77. <div class="col-xs-2" t-if="o.release_capital_request == False and o.origin">
  78. <strong>Source:</strong>
  79. <p t-field="o.origin"/>
  80. </div>
  81. <div class="col-xs-2" t-if="o.release_capital_request == False and o.partner_id.ref">
  82. <strong>Customer Code:</strong>
  83. <p t-field="o.partner_id.ref"/>
  84. </div>
  85. <div name="reference" class="col-xs-3" t-if="o.reference">
  86. <strong>Structured Communication:</strong>
  87. <p t-field="o.reference"/>
  88. </div>
  89. <div name="account_number" class="col-xs-3">
  90. <strong>Account Number:</strong>
  91. <t t-foreach="o.company_id.bank_journal_ids" t-as="journal">
  92. <t t-set="b" t-value="journal.bank_account_id"/>
  93. <t t-if="o.release_capital_request == True and journal.get_cooperator_payment">
  94. <span t-field="b.acc_number"/>
  95. </t>
  96. <t t-if="o.release_capital_request == False and journal.get_general_payment">
  97. <span t-field="b.acc_number"/>
  98. </t>
  99. </t>
  100. </div>
  101. <br/>
  102. <div name="contact" class="col-xs-3" t-if="o.user_id" style="position:relative;top:15px;">
  103. <strong>Your contact:</strong>
  104. <p t-field="o.user_id"/>
  105. </div>
  106. </div>
  107. <!-- Is there a discount on at least one line? -->
  108. <t t-set="display_discount" t-value="any([l.discount for l in o.invoice_line_ids])"/>
  109. <table class="table border-easymy-coop" style="position:relative;top:85px;width:90%;align:center;">
  110. <thead class="easymy-coop-info-title">
  111. <tr>
  112. <th>Description</th>
  113. <th t-if="o.release_capital_request == True">Part Type</th>
  114. <th class="text-right">Quantity</th>
  115. <th class="text-right">Unit Price</th>
  116. <th t-if="display_discount" class="text-right" groups="sale.group_discount_per_so_line">Disc.(%)</th>
  117. <th t-if="o.release_capital_request == False" class="text-right">Taxes</th>
  118. <th class="text-right">Price</th>
  119. </tr>
  120. </thead>
  121. <tbody class="invoice_tbody easymy-coop-normal">
  122. <tr t-foreach="o.invoice_line_ids" t-as="l">
  123. <td><span t-field="l.name"/></td>
  124. <td t-if="o.release_capital_request == True">
  125. <span t-field="l.product_id.short_name"/>
  126. </td>
  127. <td class="text-right">
  128. <span t-if="l.quantity%1>0"><span t-esc='"%0.2f" % l.quantity'/></span>
  129. <span t-if="l.quantity%1==0"><span t-esc='"%0.0f" % l.quantity'/></span>
  130. <!-- <span t-field="l.quantity"/> -->
  131. <span t-if="o.release_capital_request == False" t-field="l.uom_id" groups="product.group_uom"/>
  132. </td>
  133. <td class="text-right">
  134. <span t-field="l.price_unit"/>
  135. </td>
  136. <td t-if="display_discount" class="text-right" groups="sale.group_discount_per_so_line">
  137. <span t-field="l.discount"/>
  138. </td>
  139. <td t-if="o.release_capital_request == False" class="text-right">
  140. <span t-esc="', '.join(map(lambda x: (x.description or x.name), l.invoice_line_tax_ids))"/>
  141. </td>
  142. <td class="text-right">
  143. <span t-field="l.price_subtotal"
  144. t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
  145. </td>
  146. </tr>
  147. </tbody>
  148. </table>
  149. <div class="row">
  150. <div class="col-xs-4 pull-right">
  151. <table class="table table-condensed easymy-coop-info-title" style="position:relative;top:130px;width:68%">
  152. <tr t-if="o.release_capital_request == False">
  153. <td><strong>Subtotal</strong></td>
  154. <td class="text-right">
  155. <span t-field="o.amount_untaxed" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
  156. </td>
  157. </tr>
  158. <t t-if="o.release_capital_request == False">
  159. <t t-foreach="o._get_tax_amount_by_group()" t-as="amount_by_group">
  160. <tr>
  161. <td><span t-esc="amount_by_group[0]"/></td>
  162. <td class="text-right">
  163. <span t-esc="amount_by_group[1]"/>
  164. </td>
  165. </tr>
  166. </t>
  167. </t>
  168. <tr class="border-top-easymy-coop">
  169. <td><strong>Total</strong></td>
  170. <td class="text-right">
  171. <span t-field="o.amount_total" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
  172. </td>
  173. </tr>
  174. </table>
  175. </div>
  176. </div>
  177. <div class="row" t-if="o.tax_line_ids">
  178. <div class="col-xs-6">
  179. <table class="table border-easymy-coop">
  180. <thead>
  181. <tr>
  182. <th>Tax</th>
  183. <th class="text-right">Base</th>
  184. <th class="text-right">Amount</th>
  185. </tr>
  186. </thead>
  187. <tbody>
  188. <tr t-foreach="o.tax_line_ids" t-as="t">
  189. <td>
  190. <span t-field="t.name"/>
  191. </td>
  192. <td class="text-right">
  193. <span t-field="t.base"
  194. t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
  195. </td>
  196. <td class="text-right">
  197. <span t-field="t.amount"
  198. t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
  199. </td>
  200. </tr>
  201. </tbody>
  202. </table>
  203. </div>
  204. </div>
  205. <p t-if="o.comment">
  206. <strong>Comment:</strong>
  207. <span t-field="o.comment"/>
  208. </p>
  209. <p t-if="o.release_capital_request == False and o.payment_term_id">
  210. <span t-field="o.payment_term_id.note"/>
  211. </p>
  212. <p t-if="o.release_capital_request == False and o.fiscal_position_id.note">
  213. <strong>Fiscal Position Remark:</strong>
  214. <span t-field="o.fiscal_position_id.note"/>
  215. </p>
  216. </div>
  217. </div>
  218. </t>
  219. </template>
  220. <template id="theme_invoice_G002">
  221. <t t-call="theme_light.html_container">
  222. <t t-set="data_report_margin_top" t-value="10"/>
  223. <t t-set="data_report_header_spacing" t-value="5"/>
  224. <t t-set="data_report_dpi" t-value="110"/>
  225. <t t-foreach="docs" t-as="o">
  226. <t t-call="easy_my_coop.theme_invoice_G002_document" t-lang="o.partner_id.lang"/>
  227. </t>
  228. </t>
  229. </template>
  230. <template id="report_sexy_invoice">
  231. <t t-call="theme_light.html_container">
  232. <t t-set="data_report_margin_top" t-value="10"/>
  233. <t t-set="data_report_header_spacing" t-value="5"/>
  234. <t t-set="data_report_dpi" t-value="110"/>
  235. <t t-foreach="docs" t-as="o">
  236. <t t-call="easy_my_coop.theme_invoice_G002_document" t-lang="o.partner_id.lang"/>
  237. </t>
  238. </t>
  239. </template>
  240. </data>
  241. </openerp>