Skip to content

Commit

Permalink
modulo de reporte de session odoo co
Browse files Browse the repository at this point in the history
  • Loading branch information
Diegoivanc committed Jan 15, 2019
0 parents commit cc79565
Show file tree
Hide file tree
Showing 10 changed files with 656 additions and 0 deletions.
31 changes: 31 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
###############################################################################
# #
# #
# Part of Odoo. See LICENSE file for full copyright and licensing details. #
# #
# #
# Copyright (C) 2016 Dominic Krimmer #
# Luis Alfredo da Silva (luis.adasilvaf@gmail.com) #
# Diego Carvajal, diegoivanc@gmail.com #
# #
# Co-Authors Odoo LoCo #
# Localización funcional de Odoo para Colombia #
# #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU Affero General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU Affero General Public License for more details. #
# #
# You should have received a copy of the GNU Affero General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
###############################################################################


from . import models
55 changes: 55 additions & 0 deletions __manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@

# -*- coding: utf-8 -*-
###############################################################################
# #
# #
# Part of Odoo. See LICENSE file for full copyright and licensing details. #
# #
# #
# Copyright (C) 2019 Diego Carvajal, diegoivanc@gmail.com #
# #
# #
# #
# Co-Authors Odoo LoCo #
# Localización funcional de Odoo para Colombia #
# #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU Affero General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU Affero General Public License for more details. #
# #
# You should have received a copy of the GNU Affero General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
###############################################################################

{
'name': 'Colombia - Reporte session punto de venta',
'category': 'Localization',
'version': '1.0',
'author': 'Diego Carvajal, diegoivanc@gmail.com , odoo loco',
'license': 'AGPL-3',
'maintainer': ' ',
'website': 'dracosw.com',
'summary': ' ',
'description': """
Colombia Point of Sale report:
======================
""",
'depends': [
'point_of_sale',
'l10n_co_res_partner',
'l10n_co_tax_extension',
'l10n_co_pos_tax',
],
'data': [
'report/pos_report.xml',
'report/template_session.xml'
],
'installable': True,
}
144 changes: 144 additions & 0 deletions i18n/es_CO.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_co_print_pos_session
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0c-20160606\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-14 21:10+0000\n"
"PO-Revision-Date: 2019-01-14 21:10+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<br/>\n"
" <strong>Reference</strong> :"
msgstr "<br/>\n"
" <strong>Reference</strong> :"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<br/>\n"
" <strong>Sales:</strong>"
msgstr "<br/>\n"
" <strong>Ventas:</strong>"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<br/>\n"
" <strong>Subtotal:</strong>"
msgstr "<br/>\n"
" <strong>Subtotal:</strong>"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<br/>\n"
" <strong>Total Discount:</strong>"
msgstr "<br/>\n"
" <strong>Total Descuento:</strong>"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<br/>\n"
" <strong>Total: </strong>"
msgstr "<br/>\n"
" <strong>Diario</strong> :"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<br/>\n"
" <strong>Valor Iva: </strong>"
msgstr "<br/>\n"
" <strong>Valor Iva: </strong>"


#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<span>No se encontró ventas para esta sesión</span>"
msgstr "<span>No se encontró ventas para esta sesión</span>"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<strong style=\"font-size:18px;\">Total Payments Method : </strong>"
msgstr "<strong style=\"font-size:18px;\">Total Métodos de Pago : </strong>"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<strong>Closing Date</strong>:"
msgstr "<strong>Fecha de Cierre</strong>:<br/>"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<strong>Initial date</strong>:"
msgstr "<strong>Fecha de Inicio</strong>:<br/>"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<strong>Journal</strong> :"
msgstr "<strong>Journal</strong> :"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<strong>No. Final Registration</strong>:"
msgstr "<strong>No. Registro Final</strong>:<br/>"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<strong>No. Initial Registration</strong>:"
msgstr "<strong>No. Registro Inicial</strong>:<br/>"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<strong>Number of Sales Done:</strong>"
msgstr "<strong>Número de Ventas Realizadas:</strong>"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<strong>Point of sale</strong>:"
msgstr "<strong>Punto de Venta</strong>:"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<strong>Responsable</strong>:"
msgstr "<strong>Responsable</strong>:"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<strong>Session No</strong>:"
msgstr "<strong>Session No</strong>:"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<strong>Total Transactions Sales </strong> :"
msgstr "<strong>Total Transacciones</strong> :"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "<strong>Voucher Date</strong>:"
msgstr "<strong>Fecha de Cierre</strong>:"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "Daily POS Sales Report"
msgstr "Informe Diario de Ventas POS"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "Total Payment Method"
msgstr "Total Métodos de Pago"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "Total Refund POS"
msgstr "Total Devoluciones POS"

#. module: l10n_co_print_pos_session
#: model:ir.ui.view,arch_db:l10n_co_print_pos_session.template_session
msgid "Total Sales POS"
msgstr "Total Ventas POS"
1 change: 1 addition & 0 deletions models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import session
Binary file added models/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file added models/__pycache__/session.cpython-37.pyc
Binary file not shown.
85 changes: 85 additions & 0 deletions models/session.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# -*- coding: utf-8 -*-
###############################################################################
# #
# #
# Part of Odoo. See LICENSE file for full copyright and licensing details. #
# #
# #
# Copyright (C) 2016 Dominic Krimmer #
# Luis Alfredo da Silva (luis.adasilvaf@gmail.com) #
# Diego Carvajal, diegoivanc@gmail.com #
# #
# Co-Authors Odoo LoCo #
# Localización funcional de Odoo para Colombia #
# #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU Affero General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU Affero General Public License for more details. #
# #
# You should have received a copy of the GNU Affero General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
###############################################################################


import logging
import time

import odoo.addons.decimal_precision as dp
from odoo import tools, models, SUPERUSER_ID
from odoo import fields, api
from odoo.tools import float_is_zero
from odoo.tools.translate import _
from odoo.exceptions import UserError
from datetime import datetime

from uuid import getnode as get_mac
from odoo import api, fields as Fields
import locale
from odoo.tools.misc import formatLang
from odoo.osv import osv

_logger = logging.getLogger(__name__)

class pos_session(models.Model):
_inherit = 'pos.session'

@api.one
def first_orden(self):
res = {}
_order_first = False
i = -1
if self.order_ids:
for order in self.order_ids:
if self.order_ids[i].type != 'out_refund':
_order_first = self.order_ids[i].name
break
else:
i = i - 1

_logger.info('verificando session')
_logger.info(_order_first)

return _order_first

@api.one
def ultima_orden(self):
res = {}
_order_end = False
i = 0
if self.order_ids:
for order in self.order_ids:
_logger.info(self.order_ids[i])
if self.order_ids[i].type != 'out_refund':
_order_end = self.order_ids[i].name
break
else:
i = i + 1

return _order_end
13 changes: 13 additions & 0 deletions report/pos_report.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<report
id="report_pos_session"
model="pos.session"
string="Resumen reporte de session"
report_type="qweb-pdf"
name="l10n_co_print_pos_session.template_session"
file="l10n_co_print_pos_session.template_session"
/>
</data>
</odoo>
Loading

0 comments on commit cc79565

Please sign in to comment.