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 6f33ea5f
authored
2021-03-09 09:51:38 -0300
by
Maria Agustina
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
836
1 parent
a347a402
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
5 deletions
__manifest__.py
wizard/__pycache__/prod_pfinal.cpython-36.pyc
wizard/prod_pfinal.py
wizard/vista_prod_pfinal.xml
__manifest__.py
View file @
6f33ea5
...
...
@@ -21,6 +21,7 @@
'depends'
:
[
'base'
,
'asw_tpv'
,
'asw_afipws_fe'
,
'asw_tpv_impuestos'
],
# always loaded
...
...
wizard/__pycache__/prod_pfinal.cpython-36.pyc
View file @
6f33ea5
No preview for this file type
wizard/prod_pfinal.py
View file @
6f33ea5
...
...
@@ -27,10 +27,18 @@ class asw_prod_pfinal(models.TransientModel):
)
ppf_precio
=
fields
.
Monetary
(
string
=
u'Precio'
,
string
=
u'Precio
Final
'
,
currency_field
=
'ppf_moneda'
,
store
=
True
)
ppf_precio_bruto
=
fields
.
Monetary
(
string
=
u'Precio Bruto'
,
currency_field
=
'ppf_moneda'
,
readonly
=
True
,
store
=
True
,
compute
=
"obtener_ppf_precio_bruto"
)
ppf_moneda
=
fields
.
Many2one
(
string
=
u'Moneda del Producto'
,
...
...
@@ -39,6 +47,12 @@ class asw_prod_pfinal(models.TransientModel):
default
=
lambda
self
:
self
.
env
.
user
.
company_id
.
currency_id
,
)
ppf_impuesto
=
fields
.
Many2one
(
string
=
u'IVA'
,
comodel_name
=
'asw.impuesto'
,
ondelete
=
'set null'
,
)
#metodo para obtener el dominio de prods
def
get_domain_producto
(
self
):
domain
=
[]
...
...
@@ -50,13 +64,27 @@ class asw_prod_pfinal(models.TransientModel):
#metodo de creacion de linea de factura y su asociacion al comprobante en curso
def
crear_linea
(
self
):
pb
=
self
.
ppf_precio_bruto
print
(
"pb es "
+
str
(
pb
))
vals
=
{
'lcp_producto'
:
self
.
ppf_producto
.
id
,
'lcp_descripcion_producto'
:
self
.
ppf_descripcion_producto
,
'lcp_comprobante'
:
self
.
ppf_comprobante
.
id
,
'lcp_cantidad'
:
self
.
ppf_cantidad
,
'lcp_precio'
:
self
.
ppf_precio
,
'lcp_precio'
:
pb
,
'lcp_importe'
:
self
.
ppf_precio
,
'lcp_moneda'
:
self
.
ppf_moneda
.
id
,
'lcp_iva'
:
self
.
ppf_impuesto
.
id
,
}
nva_lineaf
=
self
.
env
[
'asw.linea_comprobante'
]
.
create
(
vals
)
@api.depends
(
'ppf_impuesto'
,
'ppf_precio'
)
def
obtener_ppf_precio_bruto
(
self
):
pnet
=
self
.
ppf_precio
iva
=
self
.
ppf_impuesto
.
imp_porcentaje
self
.
ppf_precio_bruto
=
((
100
-
iva
)
/
100
)
*
self
.
ppf_precio
\ No newline at end of file
wizard/vista_prod_pfinal.xml
View file @
6f33ea5
...
...
@@ -7,12 +7,14 @@
<field
name=
"arch"
type=
"xml"
>
<form>
<group
col=
'4'
>
<field
name=
"ppf_producto"
/>
<field
name=
"ppf_precio"
/>
<field
name=
"ppf_impuesto"
/>
<field
name=
"ppf_precio_bruto"
/>
</group>
<group
col=
'4'
>
<field
name=
"ppf_descripcion_producto"
/>
<field
name=
"ppf_cantidad"
/>
<field
name=
"ppf_precio"
/>
</group>
<footer>
<button
name=
"crear_linea"
type=
"object"
string=
"Agregar"
class=
"oe_highlight"
/>
...
...
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