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.

254 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. <p t-field="b.acc_number"/>
  95. </t>
  96. <t t-if="o.release_capital_request == False and journal.get_general_payment">
  97. <p t-field="b.acc_number"/>
  98. </t>
  99. </t>
  100. </div>
  101. <div name="contact" class="col-xs-3" t-if="o.user_id">
  102. <strong>Your contact:</strong>
  103. <p t-field="o.user_id"/>
  104. </div>
  105. </div>
  106. <!-- Is there a discount on at least one line? -->
  107. <t t-set="display_discount" t-value="any([l.discount for l in o.invoice_line_ids])"/>
  108. <table class="table border-easymy-coop" style="position:relative;top:85px;width:90%;align:center;">
  109. <thead class="easymy-coop-info-title">
  110. <tr>
  111. <th>Description</th>
  112. <th t-if="o.release_capital_request == True">Part Type</th>
  113. <th class="text-right">Quantity</th>
  114. <th class="text-right">Unit Price</th>
  115. <th t-if="display_discount" class="text-right" groups="sale.group_discount_per_so_line">Disc.(%)</th>
  116. <th t-if="o.release_capital_request == False" class="text-right">Taxes</th>
  117. <th class="text-right">Price</th>
  118. </tr>
  119. </thead>
  120. <tbody class="invoice_tbody easymy-coop-normal">
  121. <tr t-foreach="o.invoice_line_ids" t-as="l">
  122. <td><span t-field="l.name"/></td>
  123. <td t-if="o.release_capital_request == True">
  124. <span t-field="l.product_id.short_name"/>
  125. </td>
  126. <td class="text-right">
  127. <span t-if="l.quantity%1>0"><span t-esc='"%0.2f" % l.quantity'/></span>
  128. <span t-if="l.quantity%1==0"><span t-esc='"%0.0f" % l.quantity'/></span>
  129. <!-- <span t-field="l.quantity"/> -->
  130. <span t-if="o.release_capital_request == False" t-field="l.uom_id" groups="product.group_uom"/>
  131. </td>
  132. <td class="text-right">
  133. <span t-field="l.price_unit"/>
  134. </td>
  135. <td t-if="display_discount" class="text-right" groups="sale.group_discount_per_so_line">
  136. <span t-field="l.discount"/>
  137. </td>
  138. <td t-if="o.release_capital_request == False" class="text-right">
  139. <span t-esc="', '.join(map(lambda x: (x.description or x.name), l.invoice_line_tax_ids))"/>
  140. </td>
  141. <td class="text-right">
  142. <span t-field="l.price_subtotal"
  143. t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
  144. </td>
  145. </tr>
  146. </tbody>
  147. </table>
  148. <div class="row">
  149. <div class="col-xs-4 pull-right">
  150. <table class="table table-condensed easymy-coop-info-title" style="position:relative;top:130px;width:68%">
  151. <tr t-if="o.release_capital_request == False">
  152. <td><strong>Subtotal</strong></td>
  153. <td class="text-right">
  154. <span t-field="o.amount_untaxed" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
  155. </td>
  156. </tr>
  157. <t t-if="o.release_capital_request == False">
  158. <t t-foreach="o._get_tax_amount_by_group()" t-as="amount_by_group">
  159. <tr>
  160. <td><span t-esc="amount_by_group[0]"/></td>
  161. <td class="text-right">
  162. <span t-esc="amount_by_group[1]"/>
  163. </td>
  164. </tr>
  165. </t>
  166. </t>
  167. <tr class="border-top-easymy-coop">
  168. <td><strong>Total</strong></td>
  169. <td class="text-right">
  170. <span t-field="o.amount_total" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
  171. </td>
  172. </tr>
  173. </table>
  174. </div>
  175. </div>
  176. <div class="row" t-if="o.tax_line_ids">
  177. <div class="col-xs-6">
  178. <table class="table border-easymy-coop">
  179. <thead>
  180. <tr>
  181. <th>Tax</th>
  182. <th class="text-right">Base</th>
  183. <th class="text-right">Amount</th>
  184. </tr>
  185. </thead>
  186. <tbody>
  187. <tr t-foreach="o.tax_line_ids" t-as="t">
  188. <td>
  189. <span t-field="t.name"/>
  190. </td>
  191. <td class="text-right">
  192. <span t-field="t.base"
  193. t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
  194. </td>
  195. <td class="text-right">
  196. <span t-field="t.amount"
  197. t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
  198. </td>
  199. </tr>
  200. </tbody>
  201. </table>
  202. </div>
  203. </div>
  204. <p t-if="o.comment">
  205. <strong>Comment:</strong>
  206. <span t-field="o.comment"/>
  207. </p>
  208. <p t-if="o.release_capital_request == False and o.payment_term_id">
  209. <span t-field="o.payment_term_id.note"/>
  210. </p>
  211. <p t-if="o.release_capital_request == False and o.fiscal_position_id.note">
  212. <strong>Fiscal Position Remark:</strong>
  213. <span t-field="o.fiscal_position_id.note"/>
  214. </p>
  215. </div>
  216. </div>
  217. </t>
  218. </template>
  219. <template id="theme_invoice_G002">
  220. <t t-call="theme_light.html_container">
  221. <t t-set="data_report_margin_top" t-value="10"/>
  222. <t t-set="data_report_header_spacing" t-value="5"/>
  223. <t t-set="data_report_dpi" t-value="110"/>
  224. <t t-foreach="docs" t-as="o">
  225. <t t-call="easy_my_coop.theme_invoice_G002_document" t-lang="o.partner_id.lang"/>
  226. </t>
  227. </t>
  228. </template>
  229. <template id="report_sexy_invoice">
  230. <t t-call="theme_light.html_container">
  231. <t t-set="data_report_margin_top" t-value="10"/>
  232. <t t-set="data_report_header_spacing" t-value="5"/>
  233. <t t-set="data_report_dpi" t-value="110"/>
  234. <t t-foreach="docs" t-as="o">
  235. <t t-call="easy_my_coop.theme_invoice_G002_document" t-lang="o.partner_id.lang"/>
  236. </t>
  237. </t>
  238. </template>
  239. </data>
  240. </openerp>