feat: Se agregan campos para limite de descuadre y cuenta por cobrar por descuadre
This commit is contained in:
parent
d96d3c6023
commit
36d45a6e55
36
configuration_statement.py
Normal file
36
configuration_statement.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
|
# this repository contains the full copyright notices and license terms.
|
||||||
|
from trytond.model import ModelView, ModelSQL, ModelSingleton, fields
|
||||||
|
from trytond.modules.currency.fields import Monetary
|
||||||
|
from trytond.pyson import Eval
|
||||||
|
from trytond.transaction import Transaction
|
||||||
|
from trytond.pool import Pool
|
||||||
|
|
||||||
|
class Configuration(ModelSingleton, ModelView, ModelSQL):
|
||||||
|
"Configuration Chas Closures"
|
||||||
|
__name__ = 'sale.cash_closures'
|
||||||
|
|
||||||
|
company = fields.Many2One(
|
||||||
|
'company.company', "Company", required=True, select=True)
|
||||||
|
currency = fields.Many2One(
|
||||||
|
'currency.currency', "Currency")
|
||||||
|
|
||||||
|
mismatch_limit = Monetary(
|
||||||
|
"Mismatch Limit", currency='currency', digits='currency')
|
||||||
|
account_mismatch_charge = fields.Many2One('account.account', "Account Mismatch Charge",
|
||||||
|
domain=[
|
||||||
|
('company', '=', Eval('company', 0)),
|
||||||
|
('type', '!=', None),
|
||||||
|
('closed', '!=', True),
|
||||||
|
],)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def default_currency():
|
||||||
|
Company = Pool().get('company.company')
|
||||||
|
company = Transaction().context.get('company')
|
||||||
|
if company:
|
||||||
|
return Company(company).currency.id
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def default_company():
|
||||||
|
return Transaction().context.get('company')
|
9
view/configuration_closures_form.xml
Normal file
9
view/configuration_closures_form.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
|
this repository contains the full copyright notices and license terms. -->
|
||||||
|
<form>
|
||||||
|
<label name="mismatch_limit"/>
|
||||||
|
<field name="mismatch_limit"/>
|
||||||
|
<label name="account_mismatch_charge"/>
|
||||||
|
<field name="account_mismatch_charge"/>
|
||||||
|
</form>
|
Loading…
Reference in New Issue
Block a user