[FIX] Account: put a domain on the journal_id in order to see only the sale journal in customer invoice, the sale refund journal in the customer refund invoices, the purchase journal in supplier invoices and the purchase_refund in the supplier refunds

bzr revid: mra@mra-laptop-20100921111436-sdzf6ra6wvsa8723
This commit is contained in:
Mustufa Rangwala 2010-09-21 16:44:36 +05:30
parent 1ac8b3d991
commit 8a7c9fc7b4
1 changed files with 8 additions and 8 deletions

View File

@ -212,7 +212,7 @@
<field name="residual"/>
<group col="6" colspan="4">
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
<button name="invoice_open" states="draft,proforma2" string="Approve" icon="terp-camera_test"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
<button name="%(action_account_state_open)d" type='action' string='Re-Open' states='paid' icon="gtk-convert" groups="base.group_no_one"/>
@ -431,7 +431,7 @@
<field name="view_mode">tree,form,calendar,graph</field>
<field eval="False" name="view_id"/>
<field name="domain">[('type','=','out_invoice')]</field>
<field name="context">{'type':'out_invoice'}</field>
<field name="context">{'type':'out_invoice', 'journal_type': 'sale'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help">Most of customer invoices are automatically generated in draft mode by OpenERP flows, following a purchase order for instance. Review, confirm or cancel, pay or refund your customers' invoices here. A manual invoice can be created here.</field>
</record>
@ -457,7 +457,7 @@
<field name="view_mode">tree,form,calendar,graph</field>
<field eval="False" name="view_id"/>
<field name="domain">[('type','=','in_invoice')]</field>
<field name="context">{'type':'in_invoice'}</field>
<field name="context">{'type':'in_invoice', 'journal_type': 'purchase'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help">Proposal for vendor invoices are usually automatically generate by OpenERP, following a procurement order or a production order for instance. To consult and to check for, or to manually create a customer invoice, use this menu. You can review, confirm or cancel, pay or refund an invoice from the view from of the invoices.</field>
</record>
@ -470,7 +470,7 @@
<field name="view_mode">tree,form,calendar,graph</field>
<field eval="False" name="view_id"/>
<field name="domain">[('type','=','out_refund')]</field>
<field name="context">{'type':'out_refund'}</field>
<field name="context">{'type':'out_refund', 'journal_type': 'sale_refund'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help">A customer refund is a credit note to your customer that cancel invoice or a part of it.</field>
</record>
@ -496,7 +496,7 @@
<field name="view_mode">tree,form,calendar,graph</field>
<field eval="False" name="view_id"/>
<field name="domain">[('type','=','in_refund')]</field>
<field name="context">{'type':'in_refund'}</field>
<field name="context">{'type':'in_refund', 'journal_type': 'purchase_refund'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help">A vendor refund is a credit note from your supplier indicating that he refunds part or totality of the invoice sent to you.</field>
</record>
@ -504,11 +504,11 @@
<act_window context="{'search_default_partner_id':[active_id]}" id="act_res_partner_2_account_invoice_opened" name="Invoices" res_model="account.invoice" src_model="res.partner"/>
<act_window
id="act_account_journal_2_account_invoice_opened"
<act_window
id="act_account_journal_2_account_invoice_opened"
name="Unpaid Invoices"
context="{'search_default_journal_id':active_id, 'search_default_unpaid':1,}"
res_model="account.invoice"
res_model="account.invoice"
src_model="account.journal"/>
<act_window