Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
l10n_mx
l10n_mx_facturae
Commits
e2f5af26
Commit
e2f5af26
authored
11 months ago
by
Jesús Alberto Lomas Simón
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(cancelación de cfdi's de complementos de pago): agregar boton
parent
3a15406e
Pipeline
#22812
failed with stage
in 54 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
l10n_mx_facturae/models/account_payment.py
l10n_mx_facturae/models/account_payment.py
+3
-1
l10n_mx_facturae/views/account_payment.xml
l10n_mx_facturae/views/account_payment.xml
+8
-2
No files found.
l10n_mx_facturae/models/account_payment.py
View file @
e2f5af26
...
...
@@ -145,7 +145,9 @@ class AccountPayment(models.Model):
def
replace_cfdi
(
self
):
"""Cancel voucher cfdi by replacing with 1 MXN voucher"""
for
record
in
self
:
self
.
_cancel_cfdi
()
record
.
cancel_cfdi
()
record
.
action_draft
()
record
.
action_cancel
()
def
currency_rate
(
self
):
"""Compute currency rate used for current voucher to display on XML
...
...
This diff is collapsed.
Click to expand it.
l10n_mx_facturae/views/account_payment.xml
View file @
e2f5af26
...
...
@@ -24,6 +24,11 @@
<field
name=
"model"
>
account.payment
</field>
<field
name=
"inherit_id"
ref=
"account.view_account_payment_form"
/>
<field
name=
"arch"
type=
"xml"
>
<button
name=
"action_draft"
position=
"attributes"
>
<attribute
name=
"attrs"
>
{'invisible': ['
&
',('state', 'in', ('posted', 'cancel')),('cfdi_state', 'in', ('done', 'cancel'))]}
</attribute>
</button>
<button
name=
"action_post"
position=
"after"
>
<button
name=
"sign_payment"
type=
"object"
string=
"Sign"
class=
"oe_highlight"
...
...
@@ -33,8 +38,9 @@
('cfdi_state', '!=', False)
]}"
/>
<!--<button name="substitute_payment" type="object" string="Replace"
attrs="{'invisible': ['|', ('cfdi_state', 'not in', ['signed', 'done']), ('state', '=', 'cancel')]}"/>
<button name="replace_cfdi" type="object" string="Cancel"
attrs="{'invisible': ['|', ('cfdi_state', 'not in', ['signed',
'done']), ('state', '=', 'cancel')]}"/>-->
<button
name=
"replace_cfdi"
type=
"object"
class=
"btn-primary"
string=
"Cancel"
confirm=
"Are you sure to cancel this payment?"
attrs=
"{'invisible': ['|', ('cfdi_state', 'not in', ['signed',
'done']), ('state', '=', 'cancel')]}"
/>
-->
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment