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"
|
||||
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:"
|
||||
msgid "Close Statement"
|
||||
msgstr "Cerrar extracto"
|
||||
@ -325,3 +357,5 @@ msgstr "Cancelar"
|
||||
msgctxt "wizard_button:sale.payment,start,pay_:"
|
||||
msgid "Pay"
|
||||
msgstr "Pagar"
|
||||
|
||||
|
||||
|
1
sale.py
1
sale.py
@ -14,6 +14,7 @@ from trytond.i18n import gettext
|
||||
from trytond.exceptions import UserError
|
||||
from trytond.modules.currency.fields import Monetary
|
||||
|
||||
from trytond.exceptions import UserError
|
||||
|
||||
__all__ = ['Sale', 'SalePaymentForm', 'WizardSalePayment',
|
||||
'WizardSaleReconcile']
|
||||
|
16
statement.py
16
statement.py
@ -199,7 +199,8 @@ class CloseStatementStart(ModelView):
|
||||
'Close Statement'
|
||||
__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):
|
||||
@ -243,6 +244,7 @@ class CloseStatement(Wizard):
|
||||
draft_statements = {
|
||||
s.journal: s for s in Statement.search([
|
||||
('journal', 'in', journals),
|
||||
('state', '=', 'draft'),
|
||||
], order=[
|
||||
('create_date', 'ASC'),
|
||||
])}
|
||||
@ -277,6 +279,7 @@ class CloseStatement(Wizard):
|
||||
draft_statements = {
|
||||
s.journal: s for s in Statement.search([
|
||||
('journal', 'in', journals),
|
||||
('state', '=', 'draft')
|
||||
], order=[
|
||||
('create_date', 'ASC'),
|
||||
])}
|
||||
@ -306,9 +309,6 @@ class CloseStatement(Wizard):
|
||||
statement.lines = statement.lines + conciliation
|
||||
|
||||
else:
|
||||
end_balance = statement.start_balance
|
||||
for line in statement.lines:
|
||||
end_balance += line.amount
|
||||
statement.end_balance = end_balance
|
||||
statement.save()
|
||||
statements.append(statement)
|
||||
@ -342,13 +342,13 @@ class StatementLine(ModelView):
|
||||
currency = fields.Many2One(
|
||||
'currency.currency', "Currency")
|
||||
start_balance = Monetary(
|
||||
"Start Balance", currency='currency', digits='currency')
|
||||
"Start Balance", currency='currency', digits='currency', states=_states)
|
||||
balance = Monetary(
|
||||
"Balance", currency='currency', digits='currency')
|
||||
transfer = Monetary(
|
||||
"Transfer", currency='currency', digits='currency')
|
||||
"Balance", currency='currency', digits='currency', states=_states)
|
||||
end_balance = Monetary(
|
||||
"End Balance", currency='currency', digits='currency')
|
||||
transfer = Monetary(
|
||||
"Transfer", currency='currency', digits='currency')
|
||||
account = fields.Many2One('account.account', "Account",
|
||||
domain=[
|
||||
('company', '=', Eval('company', 0)),
|
||||
|
@ -2,12 +2,13 @@
|
||||
<!-- This file is part of the sale_payment module for Tryton.
|
||||
The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<form col="2">
|
||||
<image name="tryton-info" xexpand="0"/>
|
||||
<form>
|
||||
<image name="tryton-info"
|
||||
xalign="1" yalign="0.0" xexpand="0" xfill="0"/>
|
||||
<newline/>
|
||||
<label
|
||||
string="You are going to close statements of your device."
|
||||
id="create" xexpand="1"/>
|
||||
id="create" xalign="0.5"/>
|
||||
<newline/>
|
||||
<field name="statementLines"/>
|
||||
</form>
|
||||
|
Loading…
Reference in New Issue
Block a user