fix: Se elimina campo credit_note

This commit is contained in:
sinergia 2024-01-08 09:54:15 -05:00
parent c2358fcaa5
commit 0ca3720bda
2 changed files with 5 additions and 14 deletions

View File

@ -9,9 +9,9 @@ from trytond.wizard import (
StateAction, Wizard)
from trytond.exceptions import UserError
from trytond.transaction import Transaction
# from facho.fe import form, form_xml
# from facho import fe
# from facho.fe.client import dian
from facho.fe import form, form_xml
from facho import fe
from facho.fe.client import dian
import io
import qrcode
@ -105,20 +105,13 @@ class Invoice(metaclass=PoolMeta):
'readonly': (Eval('state') != 'draft')
}, depends=['state'])
credit_note = fields.Boolean(
'Credit Note',
context={
'credit_note': Eval('credit_note'),
},
states={
'invisible': (Eval('fe_operation_type') == '10')
})
del _states_readonly
@classmethod
def __setup__(cls):
super(Invoice, cls).__setup__()
cls.credit_note.states['invisible'] = (
Eval('fe_operation_type') == '10')
cls.payment_term.states['required'] = If(
Bool(Eval('_parent_subtype.fe_document')), True)
cls._buttons.update({

View File

@ -1,8 +1,6 @@
<?xml version="1.0"?>
<data>
<xpath expr="//field[@name='subtype']" position="after">
<label name="credit_note"/>
<field name="credit_note"/>
<label name="fe_document"/>
<field name="fe_document"/>
</xpath>