[IMP] Credit Note useability
bzr revid: fp@openerp.com-20120930170256-csm6kpjhfr2jg2nt
This commit is contained in:
parent
1370ae133d
commit
672c2c0d05
|
@ -300,8 +300,8 @@
|
|||
<button name="invoice_open" states="draft" string="Validate" class="oe_highlight"/>
|
||||
<button name="invoice_open" states="proforma2" string="Validate"/>
|
||||
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" groups="account.group_proforma_invoices"/>
|
||||
<button name="%(action_account_invoice_refund)d" type='action' string='Refund Invoice' states='paid'/>
|
||||
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" groups="base.group_no_one"/>
|
||||
<button name="%(action_account_invoice_refund)d" type='action' string='Refund Invoice' states='open,proforma2,paid'/>
|
||||
<button name="invoice_cancel" states="draft,proforma2,open" string="Cancel" groups="base.group_no_one"/>
|
||||
<button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object"/>
|
||||
<button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','<>','paid'), ('reconciled', '=', True)]}" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
|
||||
<!--button name="%(account_invoices)d" string="Print Invoice" type="action" states="open,paid,proforma,sale,proforma2"/-->
|
||||
|
|
|
@ -32,11 +32,11 @@ class account_invoice_refund(osv.osv_memory):
|
|||
_name = "account.invoice.refund"
|
||||
_description = "Invoice Refund"
|
||||
_columns = {
|
||||
'date': fields.date('Operation Date', help='This date will be used as the invoice date for credit note and period will be chosen accordingly!'),
|
||||
'date': fields.date('Date', help='This date will be used as the invoice date for credit note and period will be chosen accordingly!'),
|
||||
'period': fields.many2one('account.period', 'Force period'),
|
||||
'journal_id': fields.many2one('account.journal', 'Refund Journal', help='You can select here the journal to use for the credit note that will be created. If you leave that field empty, it will use the same journal as the current invoice.'),
|
||||
'description': fields.char('Description', size=128, required=True),
|
||||
'filter_refund': fields.selection([('refund', 'Create a draft refund'), ('cancel', 'Cancel: create credit note and reconcile'),('modify', 'Modify: create credit note, reconcile and create a new draft invoice')], "Refund Method", required=True, help='Credit note base on this type. You can not Modify and Cancel if the invoice is already reconciled'),
|
||||
'description': fields.char('Reason', size=128, required=True),
|
||||
'filter_refund': fields.selection([('refund', 'Create a draft credit note'), ('cancel', 'Cancel: create credit note and reconcile'),('modify', 'Modify: create credit note, reconcile and create a new draft invoice')], "Refund Method", required=True, help='Credit note base on this type. You can not Modify and Cancel if the invoice is already reconciled'),
|
||||
}
|
||||
|
||||
def _get_journal(self, cr, uid, context=None):
|
||||
|
|
|
@ -7,19 +7,40 @@
|
|||
<field name="model">account.invoice.refund</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Credit Note" version="7.0">
|
||||
<separator string="Credit Note Options"/>
|
||||
<group col="4">
|
||||
<field name="description"/>
|
||||
<field name="journal_id" widget='selection'/>
|
||||
<field name="date"/>
|
||||
<field name="period"/>
|
||||
<field name="filter_refund"/>
|
||||
<group>
|
||||
<group colspan="2">
|
||||
<label for="filter_refund"/>
|
||||
<div>
|
||||
<field name="filter_refund" class="oe_inline"/>
|
||||
<p attrs="{'invisible':[('filter_refund','<>','refund')]}" class="oe_grey">
|
||||
You will be able to edit and validate this
|
||||
credit note directly or keep it draft,
|
||||
waiting for the document to be issued by
|
||||
your supplier/customer.
|
||||
</p>
|
||||
<p attrs="{'invisible':[('filter_refund','<>','cancel')]}" class="oe_grey">
|
||||
Use this option if you want to cancel an invoice you should not
|
||||
have issued. The credit note will be created, validated and reconciled
|
||||
with the invoice. You will not be able to modify the credit note.
|
||||
</p>
|
||||
<p attrs="{'invisible':[('filter_refund','<>','modify')]}" class="oe_grey">
|
||||
Use this option if you want to cancel an invoice and create a new
|
||||
one. The credit note will be created, validated and reconciled
|
||||
with the current invoice. A new, draft, invoice will be created
|
||||
so that you can edit it.
|
||||
</p>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="description"/>
|
||||
<field name="journal_id" widget='selection'/>
|
||||
</group><group>
|
||||
<field name="date"/>
|
||||
<field name="period"/>
|
||||
</group>
|
||||
</group>
|
||||
<label string="Modify Invoice: Cancels the current invoice and creates a new copy of it ready for editing."/>
|
||||
<label string="Credit Note: Creates the credit note, ready for editing."/>
|
||||
<label string="Cancel Invoice: Creates the credit note, validate and reconcile it to cancel the current invoice."/>
|
||||
<footer>
|
||||
<button string='Refund' name="invoice_refund" type="object" class="oe_highlight"/>
|
||||
<button string='Create Credit Note' name="invoice_refund" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||
</footer>
|
||||
|
@ -28,7 +49,7 @@
|
|||
</record>
|
||||
|
||||
<record id="action_account_invoice_refund" model="ir.actions.act_window">
|
||||
<field name="name">Refund</field>
|
||||
<field name="name">Refund Invoice</field>
|
||||
<field name="res_model">account.invoice.refund</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
|
Loading…
Reference in New Issue