add traslate to statement_lines
This commit is contained in:
parent
1168dffad6
commit
ae78744782
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
34
locale/es.po
34
locale/es.po
@ -98,6 +98,38 @@ msgctxt "field:sale.sale,shop_address:"
|
|||||||
msgid "Shop Address"
|
msgid "Shop Address"
|
||||||
msgstr "Dirección tienda"
|
msgstr "Dirección tienda"
|
||||||
|
|
||||||
|
msgctxt "field:close.statement.start,statementLines:"
|
||||||
|
msgid "Lines Statement"
|
||||||
|
msgstr "Extractos"
|
||||||
|
|
||||||
|
msgctxt "field:statement.line,company:"
|
||||||
|
msgid "Company"
|
||||||
|
msgstr "Compañia"
|
||||||
|
|
||||||
|
msgctxt "field:statement.line,journal:"
|
||||||
|
msgid "Journal"
|
||||||
|
msgstr "Extracto"
|
||||||
|
|
||||||
|
msgctxt "field:statement.line,start_balance:"
|
||||||
|
msgid "Start Balance"
|
||||||
|
msgstr "Saldo Inicial"
|
||||||
|
|
||||||
|
msgctxt "field:statement.line,balance:"
|
||||||
|
msgid "Balance"
|
||||||
|
msgstr "Saldo"
|
||||||
|
|
||||||
|
msgctxt "field:statement.line,end_balance:"
|
||||||
|
msgid "End Balance"
|
||||||
|
msgstr "Saldo Final"
|
||||||
|
|
||||||
|
msgctxt "field:statement.line,transfer:"
|
||||||
|
msgid "Transfer"
|
||||||
|
msgstr "Trasladar"
|
||||||
|
|
||||||
|
msgctxt "field:statement.line,account:"
|
||||||
|
msgid "Account"
|
||||||
|
msgstr "Cuenta"
|
||||||
|
|
||||||
msgctxt "model:close.statement.done,name:"
|
msgctxt "model:close.statement.done,name:"
|
||||||
msgid "Close Statement"
|
msgid "Close Statement"
|
||||||
msgstr "Cerrar extracto"
|
msgstr "Cerrar extracto"
|
||||||
@ -325,3 +357,5 @@ msgstr "Cancelar"
|
|||||||
msgctxt "wizard_button:sale.payment,start,pay_:"
|
msgctxt "wizard_button:sale.payment,start,pay_:"
|
||||||
msgid "Pay"
|
msgid "Pay"
|
||||||
msgstr "Pagar"
|
msgstr "Pagar"
|
||||||
|
|
||||||
|
|
||||||
|
1
sale.py
1
sale.py
@ -14,6 +14,7 @@ from trytond.i18n import gettext
|
|||||||
from trytond.exceptions import UserError
|
from trytond.exceptions import UserError
|
||||||
from trytond.modules.currency.fields import Monetary
|
from trytond.modules.currency.fields import Monetary
|
||||||
|
|
||||||
|
from trytond.exceptions import UserError
|
||||||
|
|
||||||
__all__ = ['Sale', 'SalePaymentForm', 'WizardSalePayment',
|
__all__ = ['Sale', 'SalePaymentForm', 'WizardSalePayment',
|
||||||
'WizardSaleReconcile']
|
'WizardSaleReconcile']
|
||||||
|
20
statement.py
20
statement.py
@ -199,7 +199,8 @@ class CloseStatementStart(ModelView):
|
|||||||
'Close Statement'
|
'Close Statement'
|
||||||
__name__ = 'close.statement.start'
|
__name__ = 'close.statement.start'
|
||||||
|
|
||||||
statementLines = fields.One2Many('statement.line', None, 'Lines')
|
statementLines = fields.One2Many('statement.line', None, 'Lines Statement',
|
||||||
|
states={'readonly': True})
|
||||||
|
|
||||||
|
|
||||||
class CloseStatementDone(ModelView):
|
class CloseStatementDone(ModelView):
|
||||||
@ -242,7 +243,8 @@ class CloseStatement(Wizard):
|
|||||||
journals = [j.id for j in device.journals]
|
journals = [j.id for j in device.journals]
|
||||||
draft_statements = {
|
draft_statements = {
|
||||||
s.journal: s for s in Statement.search([
|
s.journal: s for s in Statement.search([
|
||||||
('journal', 'in', journals),
|
('journal', 'in', journals),
|
||||||
|
('state', '=', 'draft'),
|
||||||
], order=[
|
], order=[
|
||||||
('create_date', 'ASC'),
|
('create_date', 'ASC'),
|
||||||
])}
|
])}
|
||||||
@ -277,6 +279,7 @@ class CloseStatement(Wizard):
|
|||||||
draft_statements = {
|
draft_statements = {
|
||||||
s.journal: s for s in Statement.search([
|
s.journal: s for s in Statement.search([
|
||||||
('journal', 'in', journals),
|
('journal', 'in', journals),
|
||||||
|
('state', '=', 'draft')
|
||||||
], order=[
|
], order=[
|
||||||
('create_date', 'ASC'),
|
('create_date', 'ASC'),
|
||||||
])}
|
])}
|
||||||
@ -306,10 +309,7 @@ class CloseStatement(Wizard):
|
|||||||
statement.lines = statement.lines + conciliation
|
statement.lines = statement.lines + conciliation
|
||||||
|
|
||||||
else:
|
else:
|
||||||
end_balance = statement.start_balance
|
statement.end_balance = end_balance
|
||||||
for line in statement.lines:
|
|
||||||
end_balance += line.amount
|
|
||||||
statement.end_balance = end_balance
|
|
||||||
statement.save()
|
statement.save()
|
||||||
statements.append(statement)
|
statements.append(statement)
|
||||||
results.append(gettext('sale_payment.close_statement',
|
results.append(gettext('sale_payment.close_statement',
|
||||||
@ -342,13 +342,13 @@ class StatementLine(ModelView):
|
|||||||
currency = fields.Many2One(
|
currency = fields.Many2One(
|
||||||
'currency.currency', "Currency")
|
'currency.currency', "Currency")
|
||||||
start_balance = Monetary(
|
start_balance = Monetary(
|
||||||
"Start Balance", currency='currency', digits='currency')
|
"Start Balance", currency='currency', digits='currency', states=_states)
|
||||||
balance = Monetary(
|
balance = Monetary(
|
||||||
"Balance", currency='currency', digits='currency')
|
"Balance", currency='currency', digits='currency', states=_states)
|
||||||
|
end_balance = Monetary(
|
||||||
|
"End Balance", currency='currency', digits='currency')
|
||||||
transfer = Monetary(
|
transfer = Monetary(
|
||||||
"Transfer", currency='currency', digits='currency')
|
"Transfer", currency='currency', digits='currency')
|
||||||
end_balance = Monetary(
|
|
||||||
"End Balance", currency='currency', digits='currency')
|
|
||||||
account = fields.Many2One('account.account', "Account",
|
account = fields.Many2One('account.account', "Account",
|
||||||
domain=[
|
domain=[
|
||||||
('company', '=', Eval('company', 0)),
|
('company', '=', Eval('company', 0)),
|
||||||
|
@ -2,12 +2,13 @@
|
|||||||
<!-- This file is part of the sale_payment module for Tryton.
|
<!-- This file is part of the sale_payment module for Tryton.
|
||||||
The COPYRIGHT file at the top level of this repository contains the full
|
The COPYRIGHT file at the top level of this repository contains the full
|
||||||
copyright notices and license terms. -->
|
copyright notices and license terms. -->
|
||||||
<form col="2">
|
<form>
|
||||||
<image name="tryton-info" xexpand="0"/>
|
<image name="tryton-info"
|
||||||
|
xalign="1" yalign="0.0" xexpand="0" xfill="0"/>
|
||||||
<newline/>
|
<newline/>
|
||||||
<label
|
<label
|
||||||
string="You are going to close statements of your device."
|
string="You are going to close statements of your device."
|
||||||
id="create" xexpand="1"/>
|
id="create" xalign="0.5"/>
|
||||||
<newline/>
|
<newline/>
|
||||||
<field name="statementLines"/>
|
<field name="statementLines"/>
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
Reference in New Issue
Block a user