Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Maria Agustina
/
tpv_correcciones
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 45fda01b
authored
2021-12-20 09:06:16 -0300
by
Juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Base cobro masivo
1 parent
f97d79a4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
186 additions
and
0 deletions
__manifest__.py
wizard/__init__.py
wizard/cobro_discriminado.py
wizard/vista_cobro_discriminado.xml
__manifest__.py
View file @
45fda01
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
'views/comprobante.xml'
,
'views/comprobante.xml'
,
'views/referencia_compra.xml'
,
'views/referencia_compra.xml'
,
'views/menu_compras.xml'
,
'views/menu_compras.xml'
,
'wizard/vista_cobro_discriminado.xml'
,
],
],
# only loaded in demonstration mode
# only loaded in demonstration mode
'demo'
:
[
'demo'
:
[
...
...
wizard/__init__.py
View file @
45fda01
from
.
import
prod_pfinal
from
.
import
prod_pfinal
from
.
import
corregir_nro_tal
from
.
import
corregir_nro_tal
from
.
import
generar_nota
from
.
import
generar_nota
from
.
import
cobro_discriminado
wizard/cobro_discriminado.py
0 → 100644
View file @
45fda01
# -*- coding: utf-8 -*-
###############################################################################
# License, author and contributors information in: #
# __manifest__.py file at the root folder of this module. #
###############################################################################
from
odoo
import
models
,
fields
,
api
,
_
from
odoo.exceptions
import
UserError
,
ValidationError
import
datetime
class
hgt_cobro_multiple
(
models
.
TransientModel
):
_name
=
'hgt.cobro_multiple'
_description
=
'Cobro multiple avanzado'
_inherit
=
[
'asw.action.manager'
]
# Informacion pago
pcw_cliente
=
fields
.
Many2one
(
comodel_name
=
'asw.cliente'
,
string
=
'Cliente'
)
pcw_referencia
=
fields
.
Char
(
string
=
u'Referencia'
,
)
pcw_efectivo
=
fields
.
Monetary
(
string
=
'Efectivo'
,
currency_field
=
'cli_moneda_empresa'
)
pcw_retencion_recibida
=
fields
.
Monetary
(
string
=
'Retención'
,
currency_field
=
'cli_moneda_empresa'
)
pcw_cli_razon_social
=
fields
.
Char
(
string
=
'Razon Social'
,
related
=
'pcw_cliente.cli_razon_social'
)
# Currency field
cli_moneda_empresa
=
fields
.
Many2one
(
string
=
u'Moneda del saldo'
,
comodel_name
=
'res.currency'
,
ondelete
=
'set null'
,
related
=
'pcw_cliente.create_uid.company_id.currency_id'
,
)
# Formas de pago
pcw_che_recibidos
=
fields
.
Many2many
(
comodel_name
=
'asw.cheque'
,
relation
=
'pago_cliente_chq_recibido'
,
column1
=
'asw_cheque_id'
,
column2
=
'asw_cliente_id'
,
string
=
'Cheques Recibidos'
)
pcw_chq_emitidos
=
fields
.
Many2many
(
comodel_name
=
'asw.cheque'
,
relation
=
'pago_cliente_chq_emitido'
,
column1
=
'asw_cheque_id'
,
column2
=
'asw_cliente_id'
,
string
=
'Cheques Emitidos'
)
pcw_transferencias_recibidas
=
fields
.
Many2many
(
comodel_name
=
'asw.valores'
,
relation
=
'pago_cliente_transferencia_recibida'
,
column1
=
'pago_cliente_id'
,
column2
=
'asw_valores_id'
,
string
=
'Transferencias Recibidas'
)
pcw_transferencias_emitidas
=
fields
.
Many2many
(
comodel_name
=
'asw.valores'
,
relation
=
'pago_cliente_transferencia_emitida'
,
column1
=
'pago_cliente_id'
,
column2
=
'asw_valores_id'
,
string
=
'Transferencias Emitidas'
)
pcw_tarjetas
=
fields
.
Many2many
(
comodel_name
=
'asw.valores'
,
relation
=
'pago_cliente_tarjeta'
,
column1
=
'pago_cliente_id'
,
column2
=
'asw_valores_id'
,
string
=
'Tarjetas'
)
# Total de pago
pcw_total
=
fields
.
Monetary
(
string
=
'Total Recibido'
,
compute
=
'_calcular_total'
,
currency_field
=
'cli_moneda_empresa'
)
pcw_recibo
=
fields
.
Many2one
(
string
=
'Recibo'
,
comodel_name
=
'asw.comprobante'
)
@api.multi
def
pago_facturas_masivo
(
self
):
context
=
self
.
env
.
context
active_ids
=
context
.
get
(
'active_ids'
)
facturas
=
self
.
env
[
'asw.comprobante'
]
.
search
([(
'id'
,
'in'
,
active_ids
)])
for
factura
in
facturas
:
if
factura
.
comp_adeudado
>
0
:
factura
.
pago_rapido
(
self
.
forma_pago
)
\ No newline at end of file
\ No newline at end of file
wizard/vista_cobro_discriminado.xml
0 → 100644
View file @
45fda01
<odoo>
<data>
<record
id=
"asw_pago_cliente_wizzard_form"
model=
"ir.ui.view"
>
<field
name=
"name"
>
Pago cliente Avanzado
</field>
<field
name=
"model"
>
hgt.cobro_multiple
</field>
<field
name=
"arch"
type=
"xml"
>
<form>
<field
name=
"pcw_cli_razon_social"
invisible=
'1'
/>
<group
col=
"4"
>
<field
name=
"pcw_cliente"
colspan=
'4'
domain=
"[('cli_es_cliente','=', True )]"
/>
<field
name=
"pcw_efectivo"
colspan=
'2'
/>
<field
name=
"pcw_retencion_recibida"
colspan=
"2"
/>
<field
name=
"pcw_referencia"
/>
<notebook
colspan=
"4"
>
<page
string=
"Cheques Recibidos"
>
<group
col=
"4"
>
<field
name=
"pcw_che_recibidos"
colspan=
'4'
nolabel=
'1'
widget=
'one2many'
context=
"{'default_val_razon_social' : pcw_cli_razon_social}"
>
<tree
create=
"1"
delete=
"1"
edit=
"1"
editable=
"bottom"
>
<field
name=
"che_banco"
/>
<field
name=
"che_nro_cheque"
/>
<field
name=
"che_fecha_emision"
required=
'1'
/>
<field
name=
"che_fecha_cobro"
required=
'1'
/>
<field
name=
"che_fecha_vencimiento"
required=
'1'
/>
<field
name=
"che_razon_social_emisor"
/>
<field
name=
"che_cuit_emisor"
/>
<field
name=
"che_monto"
/>
</tree>
</field>
</group>
</page>
<page
string=
"Transferencias Recibidas"
>
<group
col=
"4"
>
<field
name=
"pcw_transferencias_recibidas"
colspan=
'4'
nolabel=
'1'
widget=
'one2many'
>
<tree
create=
"1"
delete=
"1"
edit=
"1"
editable=
"bottom"
>
<field
name=
"val_cuenta_bancaria"
/>
<field
name=
"val_fecha_emision"
/>
<field
name=
"val_nro_pago"
/>
<field
name=
"val_monto"
required=
'1'
/>
</tree>
</field>
</group>
</page>
<page
string=
"Tarjetas"
>
<group
col=
"4"
>
<field
name=
"pcw_tarjetas"
colspan=
'4'
nolabel=
'1'
widget=
'one2many'
>
<tree
create=
"1"
delete=
"1"
edit=
"1"
editable=
"bottom"
>
<field
name=
"val_tipo"
domain=
"[('tv_tipo','=', 'ta' )]"
string=
'Tarjeta'
options=
"{'no_create': True, 'no_create_edit':True}"
/>
<field
name=
"val_nro_pago"
/>
<field
name=
"val_monto"
required=
'1'
/>
</tree>
</field>
</group>
</page>
</notebook>
<br/>
</group>
<group
id=
'total'
col=
'6'
>
<field
name=
"pcw_total"
colspan=
'2'
/>
</group>
<footer>
<button
name=
"generar_recibo"
string=
"Generar Recibo"
type=
"object"
class=
"oe_highlight btn-generar-recibo"
/>
<button
special=
"cancel"
string=
"Cancel"
/>
</footer>
</form>
</field>
</record>
<act_window
id=
"hgt_cobro_masivo_avanzado_wizzard_action"
name=
"Cobro masivo Avanzado"
src_model=
"asw.comprobante"
res_model=
"hgt.cobro_multiple"
view_mode=
"form"
target=
"new"
multi=
"True"
/>
</data>
</odoo>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment