[FIX] Refactoring of view_vendor_receipt_form.
bzr revid: vta@openerp.com-20121102093857-es04l1spvh1h63z8
This commit is contained in:
parent
e60907fa8d
commit
c75d260505
|
@ -302,7 +302,7 @@
|
|||
<field name="domain">[('parent_id','=',False)]</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_gain_loss_tree" model="ir.ui.view">
|
||||
<record id="view_account_gain_loss_tree" model="ir.ui.view">
|
||||
<field name="name">Unrealized Gain or Loss</field>
|
||||
<field name="model">account.account</field>
|
||||
<field name="arch" type="xml">
|
||||
|
@ -322,7 +322,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_gain_loss" model="ir.actions.act_window">
|
||||
<record id="action_account_gain_loss" model="ir.actions.act_window">
|
||||
<field name="name">Unrealized Gain or Loss</field>
|
||||
<field name="res_model">account.account</field>
|
||||
<field name="view_type">form</field>
|
||||
|
|
|
@ -276,7 +276,7 @@
|
|||
</field>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_default_inherit_tree">
|
||||
<record model="ir.ui.view" id="view_default_inherit_tree">
|
||||
<field name="name">account.analytic.default.tree.plans</field>
|
||||
<field name="model">account.analytic.default</field>
|
||||
<field name="inherit_id" ref="account_analytic_default.view_account_analytic_default_tree"/>
|
||||
|
|
|
@ -8,7 +8,7 @@ openerp.account_voucher = function (instance) {
|
|||
instance.web.form.widgets.add('account_voucher_field', 'instance.web.account_voucher.AccountVoucherField');
|
||||
instance.web.account_voucher.AccountVoucherField = instance.web.form.AbstractField.extend({
|
||||
template: 'FieldAccountVoucher',
|
||||
init: function(field_manager, node) {
|
||||
init: function(field_manager, node) {
|
||||
this._super.apply(this, arguments);
|
||||
var self = this;
|
||||
this.set('value', false);
|
||||
|
|
|
@ -390,35 +390,33 @@
|
|||
<field name="model">account.voucher</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Receipt" version="7.0">
|
||||
<header>
|
||||
<button name="proforma_voucher" string="Validate" states="draft" invisible="context.get('line_type', False)" class="oe_highlight"/>
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma" invisible="context.get('line_type', False)"/>
|
||||
<button name="cancel_voucher" string="Unreconcile" type="object" states="posted" invisible="context.get('line_type', False)" confirm="Are you sure to unreconcile and cancel this record ?"/>
|
||||
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" invisible="context.get('line_type', False)"/>
|
||||
<header invisible="context.get('line_type', False)">
|
||||
<button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/>
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma"/>
|
||||
<button name="cancel_voucher" string="Unreconcile" type="object" states="posted" confirm="Are you sure to unreconcile and cancel this record ?"/>
|
||||
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
|
||||
</header>
|
||||
<sheet>
|
||||
<h1 attrs="{'invisible': [('number','=',False)]}"><field name="number"/></h1>
|
||||
<group>
|
||||
<group invisible="context.get('line_type', False)">
|
||||
<group>
|
||||
<field name="partner_id" domain="[('customer','=',True)]" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
|
||||
<field name="partner_id" domain="[('customer','=',True)]" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="amount" class="oe_inline"
|
||||
string="Paid Amount"
|
||||
widget="monetary" options="{'currency_field': 'currency_id'}"
|
||||
invisible="context.get('line_type', False)"
|
||||
on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
|
||||
<field name="journal_id"
|
||||
domain="[('type','in',['bank', 'cash'])]"
|
||||
invisible="context.get('line_type', False)"
|
||||
widget="selection"
|
||||
on_change="onchange_journal(journal_id, line_cr_ids, False, partner_id, date, amount, type, company_id, context)"
|
||||
string="Payment Method"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="date" invisible="context.get('line_type', False)" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id, context)"/>
|
||||
<field name="reference" invisible="context.get('line_type', False)" string="Payment Ref" placeholder="e.g. 003/10"/>
|
||||
<field name="name" colspan="2" invisible="context.get('line_type', False)" placeholder="e.g. Invoice SAJ/0042"/>
|
||||
<field name="date" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id, context)"/>
|
||||
<field name="reference" string="Payment Ref" placeholder="e.g. 003/10"/>
|
||||
<field name="name" colspan="2" placeholder="e.g. Invoice SAJ/0042"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
|
||||
<field name="account_id"
|
||||
|
@ -430,7 +428,7 @@
|
|||
</group>
|
||||
<notebook>
|
||||
<page string="Payment Information" groups="base.group_user">
|
||||
<label for="line_cr_ids"/>
|
||||
<label for="line_cr_ids" invisible="context.get('line_type', False)"/>
|
||||
<field name="line_cr_ids" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
|
||||
<tree string="Invoices and outstanding transactions" editable="bottom" colors="gray:amount==0">
|
||||
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
|
||||
|
@ -511,7 +509,7 @@
|
|||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<div class="oe_chatter" invisible="context.get('line_type', False)">
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue