- Error:
- Odoo Server Error
- Traceback (most recent call last):
- File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 745, in parse
- self._tags[rec.tag](rec, de, mode=mode)
- File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 666, in _tag_template
- if '.' not in full_tpl_id:
- TypeError: argument of type 'NoneType' is not iterable
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "/usr/lib/python3/dist-packages/odoo/http.py", line 653, in _handle_exception
- return super(JsonRequest, self)._handle_exception(exception)
- File "/usr/lib/python3/dist-packages/odoo/http.py", line 312, in _handle_exception
- raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
- File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise
- raise value
- File "/usr/lib/python3/dist-packages/odoo/http.py", line 695, in dispatch
- result = self._call_function(**self.params)
- File "/usr/lib/python3/dist-packages/odoo/http.py", line 344, in _call_function
- return checked_call(self.db, *args, **kwargs)
- File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper
- return f(dbname, *args, **kwargs)
- File "/usr/lib/python3/dist-packages/odoo/http.py", line 337, in checked_call
- result = self.endpoint(*a, **kw)
- File "/usr/lib/python3/dist-packages/odoo/http.py", line 939, in __call__
- return self.method(*args, **kw)
- File "/usr/lib/python3/dist-packages/odoo/http.py", line 517, in response_wrap
- response = f(*args, **kw)
- File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 938, in call_button
- action = self._call_kw(model, method, args, {})
- File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 926, in _call_kw
- return call_kw(request.env[model], method, args, kwargs)
- File "/usr/lib/python3/dist-packages/odoo/api.py", line 699, in call_kw
- return call_kw_multi(method, model, args, kwargs)
- File "/usr/lib/python3/dist-packages/odoo/api.py", line 690, in call_kw_multi
- result = method(recs, *args, **kwargs)
- File "<decorator-gen-42>", line 2, in button_immediate_install
- File "/usr/lib/python3/dist-packages/odoo/addons/base/module/module.py", line 72, in check_and_log
- return method(self, *args, **kwargs)
- File "/usr/lib/python3/dist-packages/odoo/addons/base/module/module.py", line 450, in button_immediate_install
- return self._button_immediate_function(type(self).button_install)
- File "/usr/lib/python3/dist-packages/odoo/addons/base/module/module.py", line 552, in _button_immediate_function
- modules.registry.Registry.new(self._cr.dbname, update_module=True)
- File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 85, in new
- odoo.modules.load_modules(registry._db, force_demo, status, update_module)
- File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 380, in load_modules
- loaded_modules, update_module, models_to_check)
- File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 274, in load_marked_modules
- perform_checks=perform_checks, models_to_check=models_to_check
- File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 181, in load_module_graph
- _load_data(cr, module_name, idref, mode, kind='data')
- File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 95, in _load_data
- tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
- File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 792, in convert_file
- convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
- File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 853, in convert_xml_import
- obj.parse(doc.getroot(), mode=mode)
- File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 742, in parse
- self.parse(rec, mode)
- File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 752, in parse
- exc_info[2]
- File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 86, in reraise
- raise value.with_traceback(tb)
- File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 745, in parse
- self._tags[rec.tag](rec, de, mode=mode)
- File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 666, in _tag_template
- if '.' not in full_tpl_id:
- odoo.tools.convert.ParseError: "argument of type 'NoneType' is not iterable" while parsing /mnt/extra-addons/pos_session_custom2_extend/views/report2_extend.xml:4, near
- <template>
- <t t-extend="report2">
- <t t-jquery="div.page" t-operation="replace">
- <t t-call="web.basic_layout">
- <t t-foreach="docs" t-as="o">
- <div class="page">
- <style type="text/css">
- table {
- width: 100%;
- }
- </style>
- <div class="text-center">
- <t t-set="company" t-value="o.config_id.company_id"/>
- <img src="/web/binary/company_logo" style="width: 45%;padding: 2px 8px 0px 13px;float: center;"/>
- <br/>
- <t t-esc="company.name"/>
- </div>
- <center>
- <b>REPORTE DE SESIÓN POS</b>
- <p>
- <!--Date: <br/>-->
- <span>CAJERO: </span><span t-field="o.user_id"/><br/>
- <b>FECHA DE APERTURA:</b> <span t-field="o.start_at"/><br/>
- <b>FECHA DE CIERRE:</b> <span t-field="o.stop_at"/>
- </p>
- <p>
- TOTAL FACTURAS: <span t-esc="o.tickets_num"/><br/>
- DESDE: <span t-field="o.ticket_first_id.pos_reference"/><br/>
- HASTA: <span t-field="o.ticket_last_id.pos_reference"/>
- </p>
- </center>
- <hr/>
- <br/>
- <center><b>VENTAS CONTADO</b></center>
- <table>
- <t t-set="cash_total" t-value="0"/>
- <tbody>
- <tr t-foreach="o.statement_ids.filtered(lambda x: x.journal_id.name not in ['Credit', 'CREDITO'])" t-as="i">
- <td>
- <h4><span t-field="i.journal_id"/></h4>
- </td>
- <td class="text-right">
- <h4><span t-field="i.total_entry_encoding_custom"/></h4>
- </td>
- <t t-set="cash_total" t-value="cash_total + i.total_entry_encoding_custom"/>
- </tr>
- </tbody>
- </table>
- <br>
- </br>
- <table>
- <tbody>
- <tr>
- <td>Total Ventas Contado (-) Retiros:</td>
- <td class="text-right"><span t-esc="cash_total"/></td>
- </tr>
- </tbody>
- </table>
- <t t-call="pos_session_custom2.dline"/>
- <center><b>VENTAS CREDITO</b></center>
- <table>
- <tbody>
- <tr t-foreach="o.statement_ids.filtered(lambda x: x.journal_id.name in ['Credit', 'CREDITO'])" t-as="i">
- <td>
- <h4><span t-field="i.journal_id"/></h4>
- </td>
- <td class="text-right">
- <h4><span t-field="i.total_entry_encoding_custom"/></h4>
- </td>
- </tr>
- </tbody>
- </table>
- <t t-set="summary_by_tax" t-value="o.summary_by_tax()[0]"/>
- <table>
- <tbody>
- <tr>
- <th><h4><b>TOTAL VENTAS</b></h4></th>
- <th class="text-right">
- <!-- <h4><b><span t-esc="'%.2f' % summary_by_tax.get('tax_bf1')" /></b></h4></th> -->
- <h4><b><span t-esc="'%.2f' % .format(summary_by_tax.get('tax_15') + summary_by_tax.get('tax_18') + summary_by_tax.get('tax_bf1') + summary_by_tax.get('tax_bf2') + summary_by_tax.get('tax_bf3'))"/></b></h4></th>
- </tr>
- </tbody>
- </table>
- <!-- Bloque de abono a creditos -->
- <t t-call="pos_session_custom2.dline"/>
- <center><b>ABONOS A CREDITO</b></center>
- <table>
- <tbody>
- <tr t-foreach="o.statement_ids.filtered(lambda x: x.journal_id.name in ['Credit', 'CREDITO'])" t-as="i">
- <td>
- <h4><span t-field="i.journal_id"/></h4>
- </td>
- <td class="text-right">
- <h4><span t-field="i.total_entry_encoding_custom"/></h4>
- </td>
- </tr>
- </tbody>
- </table>
- <t t-set="summary_by_tax" t-value="o.summary_by_tax()[0]"/>
- <table>
- <tbody>
- <tr>
- <th><h4><b>TOTAL ABONOS DE CREDITOS</b></h4></th>
- <th class="text-right">
- <h4><b><span t-esc="'%.2f' % summary_by_tax.get('tax_bf1')"/></b></h4></th>
- </tr>
- </tbody>
- </table>
- <!-- termina el bloque de abono a creditos -->
- <t t-call="pos_session_custom2.dline"/>
- <br/>
- <center><b>CONTROL DE EFECTIVO</b></center>
- <table>
- <tbody>
- <tr>
- <td>SALDO INICIAL:</td>
- <td class="text-right"><span t-field="o.cash_register_balance_start"/></td>
- </tr>
- <tr>
- <td>+ VENTAS</td>
- <td class="text-right"><span t-field="o.cash_register_total_entry_encoding_custom"/></td>
- </tr>
- <tr>
- <td>+ DINERO RECIBIDO </td>
- <td class="text-right"><span t-field="o.cash_register_total_entry_encoding_put_in"/></td>
- </tr>
- <tr>
- <td>- DINERO RETIRADO </td>
- <td class="text-right"><span t-field="o.cash_register_total_entry_encoding_take_out"/></td>
- </tr>
- <tr>
- <td>TOTAL PAYMENT ON CREDIT:</td>
- <td class="text-right"><span t-field="o.debit_total"/></td>
- </tr>
- </tbody>
- </table>
- <t t-call="pos_session_custom2.line"/>
- <table>
- </table>
- <br/>
- <table>
- <tbody>
- <tr>
- <td>CIERRE SEGÚN LIBROS:</td>
- <td class="text-right"><span t-field="o.cash_register_balance_end"/></td>
- </tr>
- </tbody>
- </table>
- <t t-call="pos_session_custom2.line"/>
- <table>
- <tbody>
- <tr>
- <td>CIERRE REAL:</td>
- <td class="text-right"><span t-field="o.cash_register_balance_end_real"/></td>
- </tr>
- </tbody>
- </table>
- <t t-call="pos_session_custom2.dline"/>
- <table>
- <tbody>
- <tr>
- <td>(-FALTANTE) / SOBRANTE:</td>
- <td class="text-right"><span t-field="o.cash_register_difference"/></td>
- </tr>
- </tbody>
- </table>
- </div>
- <br/>
- <br/>
- <br/>
- <br/>
- <center><em>FIRMA DEL CAJERO</em></center>
- </t>
- </t>
- </t>
- </t>
- </template>