[FIX] Cleaning account voucher: -550 lines
bzr revid: fp@tinyerp.com-20100826001459-ez2b5pik7jexm303
This commit is contained in:
parent
e93799e69f
commit
303dec6976
|
@ -595,7 +595,7 @@ class account_journal(osv.osv):
|
|||
_columns = {
|
||||
'name': fields.char('Journal Name', size=64, required=True, translate=True,help="Name of the journal"),
|
||||
'code': fields.char('Code', size=16,required=True,help="Code of the journal"),
|
||||
'type': fields.selection([('sale', 'Sale'),('sale_refund','Sale Refund'), ('purchase', 'Purchase'), ('purchase_refund','Purchase Refund'),('expense', 'Expense'), ('cash', 'Cash'), ('bank', 'Bank'), ('general', 'General'), ('situation', 'Situation')], 'Type', size=32, required=True,
|
||||
'type': fields.selection([('sale', 'Sale'),('sale_refund','Sale Refund'), ('purchase', 'Purchase'), ('purchase_refund','Purchase Refund'),('expense', 'Expense'), ('cash', 'Cash'), ('bank', 'Bank and Cheques'), ('general', 'General'), ('situation', 'Situation')], 'Type', size=32, required=True,
|
||||
help="Select 'Sale' for Sale journal to be used at the time of making invoice."\
|
||||
" Select 'Purchase' for Purchase Journal to be used at the time of approving purchase order."\
|
||||
" Select 'Cash' to be used at the time of making payment."\
|
||||
|
|
|
@ -305,6 +305,7 @@ class account_move_line(osv.osv):
|
|||
ml = self.browse(cr, uid, id, context)
|
||||
return map(lambda x: x.id, ml.move_id.line_id)
|
||||
|
||||
# TODO: this is false, it does not uses draft and closed periods
|
||||
def _balance(self, cr, uid, ids, prop, unknow_none, unknow_dict):
|
||||
res={}
|
||||
# TODO group the foreach in sql
|
||||
|
@ -344,9 +345,9 @@ class account_move_line(osv.osv):
|
|||
result = []
|
||||
for line in self.browse(cr, uid, ids, context):
|
||||
if line.ref:
|
||||
result.append((line.id, (line.name or '')+' ('+line.ref+')'))
|
||||
result.append((line.id, (line.move_id.name or '')+' ('+line.ref+')'))
|
||||
else:
|
||||
result.append((line.id, line.name))
|
||||
result.append((line.id, line.move_id.name))
|
||||
return result
|
||||
|
||||
def _balance_search(self, cursor, user, obj, name, args, domain=None, context=None):
|
||||
|
@ -456,8 +457,8 @@ class account_move_line(osv.osv):
|
|||
type='many2one', relation='account.invoice', fnct_search=_invoice_search),
|
||||
'account_tax_id':fields.many2one('account.tax', 'Tax'),
|
||||
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'),
|
||||
#TODO: remove this
|
||||
'amount_taxed':fields.float("Taxed Amount", digits_compute=dp.get_precision('Account')),
|
||||
#TODO: remove this
|
||||
#'amount_taxed':fields.float("Taxed Amount", digits_compute=dp.get_precision('Account')),
|
||||
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True)
|
||||
|
||||
}
|
||||
|
|
|
@ -281,7 +281,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr "Nou pagament bancari"
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr "Línies de comprovant"
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr "Neue Bankzahlung"
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr "Auszugspositionen"
|
||||
|
||||
|
|
|
@ -283,7 +283,7 @@ msgstr "Νέα Πληρωμή Τράπεζας"
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr "Γραμμές Παραστατικού"
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr "Nuevo pago bancario"
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr "Líneas de comprobante"
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr "Nuevo pago en bancos"
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr "Lineas del voucher"
|
||||
|
||||
|
|
|
@ -322,7 +322,7 @@ msgstr "Uus pangamakse"
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr "Tähiku read"
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr "Nouveau Paiement Bancaire"
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr "Lignes de Souches"
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr "Nuovo Pagamento Bancario"
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr "Nuova Ricevuta"
|
||||
|
||||
|
|
|
@ -283,7 +283,7 @@ msgstr "새 은행 결제"
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr "전표 라인"
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr "Nieuwe bankbetaling"
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr "Bonregels"
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -283,7 +283,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr "Novo pagamento bancário"
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr "Linhas Voucher"
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr "Plată nouă prin bancă"
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr "Înregistrări bonuri valorice"
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr "Novo bančno plačilo"
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -283,7 +283,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -283,7 +283,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr "Yeni Banka Ödemesi"
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr "Fiş Kalemleri"
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -283,7 +283,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr "新的银行付款"
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr "原始凭证明细"
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ msgstr ""
|
|||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
#: field:account.voucher,line_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -234,19 +234,19 @@
|
|||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(voucher.payment_ids,'payment_ids') ]] </para>
|
||||
<para style="terp_default_8">[[ repeatIn(voucher.line_ids,'line_ids') ]] </para>
|
||||
<blockTable colWidths="342.0,135.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header">[[ payment_ids.partner_id and payment_ids.partner_id.name or '' ]] </para>
|
||||
<para style="terp_header">[[ line_ids.partner_id and line_ids.partner_id.name or '' ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_header_Right">[[ payment_ids.amount ]]</para>
|
||||
<para style="terp_header_Right">[[ line_ids.amount ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9_30">[[ payment_ids.account_id.name ]] </para>
|
||||
<para style="terp_default_9_30">[[ line_ids.account_id.name ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P22">
|
||||
|
@ -256,7 +256,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9_50">[[ payment_ids.ref ]] [[ payment_ids.amount ]] </para>
|
||||
<para style="terp_default_9_50">[[ line_ids.ref ]] [[ line_ids.amount ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9_50">
|
||||
|
@ -266,7 +266,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9_50">[[ payment_ids.type ]]</para>
|
||||
<para style="terp_default_9_50">[[ line_ids.type ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9_50">
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
journal_id: account.bank_journal
|
||||
name: Voucher for Axelor
|
||||
narration: Basic Pc
|
||||
payment_ids:
|
||||
line_ids:
|
||||
- account_id: account.a_recv
|
||||
amount: 1000.0
|
||||
name: Voucher for Axelor
|
||||
|
@ -35,17 +35,8 @@
|
|||
I create voucher by clicking on Create button
|
||||
-
|
||||
!workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucherforaxelor0}
|
||||
-
|
||||
I check that the voucher state is "Waiting for re-checking"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
|
||||
- state == 'recheck'
|
||||
-
|
||||
I clicked on Validate Button
|
||||
-
|
||||
!workflow {model: account.voucher, action: recheck_voucher, ref: account_voucher_voucherforaxelor0}
|
||||
-
|
||||
I check that the voucher state is "posted"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
|
||||
- state == 'posted'
|
||||
|
@ -68,7 +59,7 @@
|
|||
journal_id: account.bank_journal
|
||||
name: Voucher Axelor
|
||||
narration: Basic PC
|
||||
payment_ids:
|
||||
line_ids:
|
||||
- account_id: account.cash
|
||||
amount: 1000.0
|
||||
name: Voucher Axelor
|
||||
|
@ -93,21 +84,11 @@
|
|||
I create voucher by clicking on Create button
|
||||
-
|
||||
!workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucheraxelor0}
|
||||
-
|
||||
I check that the voucher state is "Waiting for re-checking"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
|
||||
- state == 'recheck'
|
||||
-
|
||||
I clicked on Validate Button
|
||||
-
|
||||
!workflow {model: account.voucher, action: recheck_voucher, ref: account_voucher_voucheraxelor0}
|
||||
-
|
||||
I check that the voucher state is "posted"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
|
||||
- state == 'posted'
|
||||
|
||||
-
|
||||
I check that moves get created for this voucher
|
||||
-
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -16,7 +16,7 @@
|
|||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Payment Information">
|
||||
<field name="payment_ids" on_change="onchange_price(payment_ids, False, False)" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
|
||||
<field name="line_ids" on_change="onchange_price(line_ids, False, False)" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
|
||||
<tree string="Payment Lines" editable="bottom">
|
||||
<field name="ref" on_change="onchange_partner(parent.partner_id,type,parent.type, parent.currency_id)"/>
|
||||
<field name="amount"/>
|
||||
|
@ -50,8 +50,7 @@
|
|||
<group col="10" colspan="4">
|
||||
<field name="state"/>
|
||||
<button name="proforma_voucher" string="Create" states="draft" icon="terp-document-new"/>
|
||||
<button name="recheck_voucher" string="Approve" states="recheck" icon="terp-check"/>
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma,recheck" icon="gtk-cancel"/>
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
|
||||
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
|
||||
<button name="%(action_view_account_voucher_unreconcile)d" string="Unreconcile" type="action" states="posted" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
|
@ -78,13 +77,13 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Sales Payment">
|
||||
<group col="6" colspan="4">
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, journal_id)" string="Customer"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id, journal_id, amount)" string="Customer"/>
|
||||
<field name="journal_id"
|
||||
domain="[('type','in',['bank', 'cash'])]"
|
||||
widget="selection" select="1"
|
||||
on_change="onchange_journal(journal_id,type)"
|
||||
on_change="onchange_partner_id(partner_id, journal_id, amount)"
|
||||
string="Payment Method"/>
|
||||
<field name="amount"/>
|
||||
<field name="amount" on_change="onchange_partner_id(partner_id, journal_id, amount)"/>
|
||||
<field name="reference" select="1" string="Payment Ref"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="account_id"
|
||||
|
@ -92,31 +91,30 @@
|
|||
widget="selection"
|
||||
on_change="onchange_account(account_id)"
|
||||
invisible="True"/>
|
||||
<field name="pre_line" invisible="1"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Payment Information">
|
||||
<!-- <field name="payment_ids" on_change="onchange_price(payment_ids, 0.0, False)" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="180">-->
|
||||
<field name="payment_ids" on_change="onchange_price(payment_ids, 0.0, False)" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
|
||||
<field name="line_cr_ids" default_get="{'journal_id':journal_id, 'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
|
||||
<tree string="Invoices and outstanding payments" editable="bottom">
|
||||
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'type':parent.type, 'partner_id':parent.partner_id}" on_change="onchange_move_line_id(move_line_id)" domain="[('account_id.type','=','receivable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id), ('debit','>',0)]"/>
|
||||
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
|
||||
on_change="onchange_move_line_id(move_line_id)"
|
||||
domain="[('account_id.type','in',('receivable','payable')), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
|
||||
/>
|
||||
<field name="account_id" domain="[('type','=','receivable')]"/>
|
||||
<field name="date_original"/>
|
||||
<field name="date_due"/>
|
||||
<field name="amount_original"/>
|
||||
<field name="amount_unreconciled" sum="Open Balance"/>
|
||||
<field name="date_original" readonly="1"/>
|
||||
<field name="date_due" readonly="1"/>
|
||||
<field name="amount_original" readonly="1"/>
|
||||
<field name="amount_unreconciled" sum="Open Balance" readonly="1"/>
|
||||
<field name="amount" sum="Payment"/>
|
||||
</tree>
|
||||
</field>
|
||||
<separator string="Previous Unreconcile balance" colspan="4"/>
|
||||
<field name="pre_line"/>
|
||||
<field name="line_cr_ids" colspan="4" nolabel="1" readonly="1" attrs="{'invisible': [('pre_line','=',False)]}">
|
||||
<field name="line_dr_ids" colspan="4" nolabel="1" attrs="{'invisible': [('pre_line','=',False)]}" default_get="{'journal_id':journal_id, 'partner_id':partner_id}">
|
||||
<tree string="Credits" editable="bottom">
|
||||
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'type':parent.type, 'partner_id':parent.partner_id}" on_change="onchange_move_line_id(move_line_id)" domain="[('account_id.type','=','receivable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id), ('debit','>',0)]"/>
|
||||
<field name="move_line_id"/>
|
||||
<field name="account_id" domain="[('type','=','receivable')]"/>
|
||||
<field name="date_original"/>
|
||||
<field name="date_due"/>
|
||||
<field name="amount_original"/>
|
||||
<field name="amount_unreconciled" sum="Open Balance"/>
|
||||
<field name="amount" sum="Payment"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
@ -127,10 +125,8 @@
|
|||
<group col="2" colspan="1">
|
||||
<separator string="Other Information" colspan="2"/>
|
||||
<field name="date" select="1" on_change="onchange_date(date)"/>
|
||||
<field name="currency_id" select="1"
|
||||
attrs="{'readonly':[('type','in',['sale', 'purchase'])]}"/>
|
||||
<field name="currency_id" select="1"/>
|
||||
<field name="number"/>
|
||||
<field name="type" on_change="onchange_journal(journal_id,type)" invisible="1"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Journal Items" groups="base.group_extended">
|
||||
|
@ -146,8 +142,7 @@
|
|||
<group col="10" colspan="4">
|
||||
<field name="state"/>
|
||||
<button name="proforma_voucher" string="Create" states="draft" icon="terp-document-new"/>
|
||||
<button name="recheck_voucher" string="Approve" states="recheck" icon="terp-check"/>
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma,recheck" icon="gtk-cancel"/>
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
|
||||
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
|
||||
<button name="%(action_view_account_voucher_unreconcile)d" string="Unreconcile" type="action" states="posted" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
|
|
|
@ -8,18 +8,17 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Sales Receipt">
|
||||
<group col="6" colspan="4">
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, journal_id)" string="Customer"/>
|
||||
<field name="journal_id" domain="[('type','=','sale')]" widget="selection" select="1" on_change="onchange_journal(journal_id,type)"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id, journal_id)" string="Customer"/>
|
||||
<field name="journal_id" domain="[('type','=','sale')]" widget="selection" on_change="onchange_journal(journal_id)"/>
|
||||
<field name="number"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="date" select="1" on_change="onchange_date(date)"/>
|
||||
<field name="type" on_change="onchange_journal(journal_id,type)" invisible="True"/> <!-- Type is given by menu, not by journal ? yes-->
|
||||
<field name="date" on_change="onchange_date(date)"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Sales Information">
|
||||
<field name="payment_ids" on_change="onchange_price(payment_ids, tax_id, parent.partner_id)" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
|
||||
<field name="line_ids" on_change="onchange_price(line_ids, tax_id, parent.partner_id)" default_get="{'journal_id':journal_id, 'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
|
||||
<tree string="Sales Lines" editable="bottom">
|
||||
<field name="account_id" domain="[('user_type_type','=','income')]" widget="selection"/>
|
||||
<field name="account_id" domain="[('user_type.report_type','=','income')]" widget="selection"/>
|
||||
<field name="name"/>
|
||||
<field name="amount" sum="Total"/>
|
||||
<field name="account_analytic_id" groups="base.group_extended"/>
|
||||
|
@ -32,10 +31,10 @@
|
|||
<group col="2" colspan="1">
|
||||
<group col="2" colspan="1">
|
||||
<separator string="Payment Options" colspan="2"/>
|
||||
<field name="pay_now" on_change="onchange_payment(pay_now, journal_id, partner_id, type)" required="1"/>
|
||||
<field name="pay_now" on_change="onchange_payment(pay_now, journal_id, partner_id)" required="1"/>
|
||||
<field name="account_id"
|
||||
attrs="{'invisible':[('type','!=','view'),('pay_now','!=','pay_now')]}"
|
||||
domain="[('user_type_type','=','asset'), ('type','!=','view')]"/>
|
||||
attrs="{'invisible':[('pay_now','!=','pay_now')]}"
|
||||
domain="[('user_type.report_type','=','asset')]"/>
|
||||
<!-- should select income accounts only. Or use the journal for this ? -->
|
||||
<field name="reference"
|
||||
attrs="{'invisible':[('pay_now','!=','pay_now')]}"
|
||||
|
@ -43,7 +42,7 @@
|
|||
</group>
|
||||
<group col="3" colspan="1">
|
||||
<separator string="Total" colspan="3"/>
|
||||
<field name="tax_id" on_change="onchange_price(payment_ids, tax_id, partner_id)" widget="selection" domain="[('type_tax_use','in',('sale','all'))]"/><field name="tax_amount" on_change="onchange_price(payment_ids, tax_id, partner_id)" nolabel="1"/>
|
||||
<field name="tax_id" on_change="onchange_price(line_ids, tax_id, partner_id)" widget="selection" domain="[('type_tax_use','in',('sale','all'))]"/><field name="tax_amount" on_change="onchange_price(line_ids, tax_id, partner_id)" nolabel="1"/>
|
||||
<label colspan="1" string=""/><field name="amount" string="Total"/>
|
||||
</group>
|
||||
</group>
|
||||
|
@ -61,8 +60,7 @@
|
|||
<group col="10" colspan="4">
|
||||
<field name="state"/>
|
||||
<button name="proforma_voucher" string="Post" states="draft" icon="terp-document-new"/>
|
||||
<button name="recheck_voucher" string="Approve" states="recheck" icon="terp-check"/>
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma,recheck" icon="gtk-cancel"/>
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
|
||||
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
|
||||
<button name="%(action_view_account_voucher_unreconcile)d" string="Cancel" type="action" states="posted" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
|
@ -99,12 +97,12 @@
|
|||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Bill Information">
|
||||
<field name="payment_ids" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
|
||||
<field name="line_ids" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
|
||||
<tree string="Voucher Lines" editable="bottom">
|
||||
<field name="stype" on_change="onchange_partner(parent.partner_id,type,parent.type, parent.currency_id)"/>
|
||||
<field name="ref" on_change="onchange_partner(parent.partner_id,type,parent.type, parent.currency_id)"/>
|
||||
<field name="amount"/>
|
||||
<field name="account_id" domain="[('user_type_type','=','expense'), ('type','!=','view')]"/>
|
||||
<field name="account_id" domain="[('user_type.report_type','=','expense'), ('type','!=','view')]"/>
|
||||
<field name="type" on_change="onchange_type(parent.partner_id,type,parent.type, parent.currency_id)"/>
|
||||
<field name="account_analytic_id"/>
|
||||
</tree>
|
||||
|
@ -133,8 +131,7 @@
|
|||
<group col="10" colspan="4">
|
||||
<field name="state"/>
|
||||
<button name="proforma_voucher" string="Create" states="draft" icon="terp-document-new"/>
|
||||
<button name="recheck_voucher" string="Approve" states="recheck" icon="terp-check"/>
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma,recheck" icon="gtk-cancel"/>
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
|
||||
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
|
||||
<button name="%(action_view_account_voucher_unreconcile)d" string="Cancel" type="action" states="posted" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="model">account.voucher</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="blue:state in ('draft');gray:state in ('cancel','done');black:state in ('open','proforma','posted','recheck','audit')" string="Voucher Entries">
|
||||
<tree colors="blue:state in ('draft');gray:state in ('cancel')" string="Voucher Entries">
|
||||
<field name="date"/>
|
||||
<field name="number"/>
|
||||
<field name="reference"/>
|
||||
|
@ -35,7 +35,7 @@
|
|||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Voucher Entry">
|
||||
<field name="payment_ids" colspan="4" nolabel="1" height="180">
|
||||
<field name="line_ids" colspan="4" nolabel="1" height="180">
|
||||
<tree string="Voucher Lines" editable="top">
|
||||
<field name="name" on_change="onchange_partner(parent.partner_id,type,parent.type, parent.currency_id)"/>
|
||||
<field name="account_id"/>
|
||||
|
@ -79,8 +79,7 @@
|
|||
<group col="10" colspan="4">
|
||||
<field name="state"/>
|
||||
<button name="proforma_voucher" string="Create" states="draft" icon="terp-document-new"/>
|
||||
<button name="recheck_voucher" string="Approve" states="recheck" icon="terp-check"/>
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma,recheck" icon="gtk-cancel"/>
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
|
||||
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
</form>
|
||||
|
@ -192,18 +191,6 @@
|
|||
</record>
|
||||
<menuitem action="action_voucher_list" id="menu_encode_entries_by_voucher" parent="account.menu_finance_entries" sequence="6"/>
|
||||
|
||||
<record model="ir.ui.view" id="view_account_journal_form_inherit">
|
||||
<field name="name">account.journal.form.inherit</field>
|
||||
<field name="model">account.journal</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="account.view_account_journal_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="allow_date" position="after">
|
||||
<field name="max_amount" select="1"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window
|
||||
domain="[('journal_id','=',active_id)]"
|
||||
id="act_journal_voucher_open"
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
<!-- <field name="act_from" ref="act_proforma"/>-->
|
||||
<!-- <field name="act_to" ref="act_recheck"/>-->
|
||||
<!-- <field name="signal">proforma_voucher</field>-->
|
||||
<!-- <field name="condition">amount > journal_id.max_amount</field>-->
|
||||
<!-- </record>-->
|
||||
<!-- -->
|
||||
<!-- <record id="t4" model="workflow.transition">-->
|
||||
|
|
Loading…
Reference in New Issue