fix: Se elimina campo credit_note
This commit is contained in:
parent
c2358fcaa5
commit
0ca3720bda
17
invoice.py
17
invoice.py
|
@ -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({
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue