[IMP] put groups attribute refund/payment's form view in order to hide the payment information tab from portal users

also, identation

bzr revid: abo@openerp.com-20120725175750-4tqhkheyue0yak0j
This commit is contained in:
Antonin Bourguignon 2012-07-25 19:57:50 +02:00
parent 011f1ab2ab
commit be24d83ce4
1 changed files with 32 additions and 37 deletions

View File

@ -22,7 +22,7 @@
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('bank','cash'))]"/>
<field name="period_id"/>
</group>
<newline/>
<newline/>
<group expand="0" string="Group By...">
<filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
@ -54,7 +54,7 @@
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('bank','cash'))]"/>
<field name="period_id"/>
</group>
<newline/>
<newline/>
<group expand="0" string="Group By...">
<filter string="Supplier" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
@ -72,7 +72,7 @@
<field name="arch" type="xml">
<form string="Bill Payment" version="7.0">
<group col="6">
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Supplier" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1, 'invoice_currency': currency_id}" />
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Supplier" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1, 'invoice_currency': currency_id}"/>
<field name="amount" 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'])]"
@ -94,8 +94,7 @@
<tree string="Open Supplier Journal Entries" editable="bottom" colors="gray:amount==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','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
/>
domain="[('account_id.type','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"/>
<field name="account_id" domain="[('type','=','payable')]"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
@ -108,8 +107,7 @@
<tree string="Open Customer Journal Entries" editable="bottom" colors="gray:amount==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','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
/>
domain="[('account_id.type','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"/>
<field name="account_id" domain="[('type','=','payable')]"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
@ -156,11 +154,11 @@
<group>
<group>
<field name="partner_id" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" context="{'invoice_currency':currency_id, 'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" string="Supplier"/>
<label for="amount" string="Amount"/>
<div>
<label for="amount" string="Amount"/>
<div>
<field name="amount" 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)" class="oe_inline"/>
<field name="currency_id" class="oe_inline"/>
</div>
</div>
<field name="journal_id"
domain="[('type','in',['bank', 'cash'])]"
invisible="context.get('line_type', False)"
@ -182,8 +180,7 @@
<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','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
required="1"
/>
required="1"/>
<field name="account_id" groups="base.group_no_one" domain="[('type','=','payable')]"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
@ -198,8 +195,7 @@
<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','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
required="1"
/>
required="1"/>
<field name="account_id" groups="base.group_no_one" domain="[('type','=','payable')]"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
@ -278,7 +274,7 @@
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_voucher_filter_vendor_pay"/>
<field name="target">current</field>
<field name="help">Click on "Create" to register a supplier payment.
<field name="help">Click on "Create" to register a supplier payment.
&lt;p&gt;
Track payments you do to your supplier and amounts you pay.</field>
</record>
@ -316,14 +312,13 @@
<group>
<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}"/>
<label for="amount"
string="Paid Amount"/>
<div>
<label for="amount" string="Paid Amount"/>
<div>
<field name="amount" class="oe_inline"
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="currency_id" class="oe_inline"/>
</div>
</div>
<field name="journal_id"
domain="[('type','in',['bank', 'cash'])]"
@ -347,7 +342,7 @@
</group>
<notebook>
<page string="Payment Information">
<page string="Payment Information" groups="base.group_user">
<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, 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}"
@ -369,8 +364,7 @@
<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)]"
required="1"
/>
required="1"/>
<field name="account_id" groups="base.group_no_one" domain="[('type','=','receivable')]"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
@ -409,21 +403,21 @@
<field name="audit"/>
</group>
<field name="move_ids" readonly="1">
<tree string="Journal Items">
<field name="move_id"/>
<field name="ref"/>
<field name="date"/>
<field name="statement_id"/>
<field name="partner_id"/>
<field name="account_id"/>
<field name="name"/>
<field name="debit"/>
<field name="credit"/>
<field name="state"/>
<field name="reconcile_id"/>
<field name="amount_currency"/>
<field name="currency_id"/>
</tree>
<tree string="Journal Items">
<field name="move_id"/>
<field name="ref"/>
<field name="date"/>
<field name="statement_id"/>
<field name="partner_id"/>
<field name="account_id"/>
<field name="name"/>
<field name="debit"/>
<field name="credit"/>
<field name="state"/>
<field name="reconcile_id"/>
<field name="amount_currency"/>
<field name="currency_id"/>
</tree>
</field>
</page>
</notebook>
@ -464,5 +458,6 @@
<menuitem action="action_vendor_receipt" icon="STOCK_JUSTIFY_FILL" sequence="12"
id="menu_action_vendor_receipt" parent="account.menu_finance_receivables"/>
</data>
</openerp>