[MERGE] trunk-first_10_clicks_einvoicing-psi (usability improvements in account and account_voucher)

bzr revid: rco@openerp.com-20120626141549-3c2xac2t5m7i9bjw
This commit is contained in:
Raphael Collet 2012-06-26 16:15:49 +02:00
commit f1980fec77
7 changed files with 140 additions and 49 deletions

View File

@ -39,7 +39,7 @@
<field name="quantity"/>
<field name="uos_id" groups="product.group_uom"/>
<field name="price_unit"/>
<field name="discount"/>
<field name="discount" groups="sale.group_discount_per_so_line"/>
<field name="price_subtotal"/>
</tree>
</field>
@ -61,8 +61,8 @@
on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
</div>
<field name="price_unit"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
<field name="discount"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)" groups="account.group_account_user"/>
<field name="discount" groups="sale.group_discount_per_so_line"/>
<field name="invoice_line_tax_id" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]" widget="many2many_tags"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
@ -98,7 +98,7 @@
<group col="4">
<field name="name"/>
<field name="sequence"/>
<field name="account_id"/>
<field name="account_id" groups="account.group_account_user"/>
<field name="manual"/>
<field name="amount"/>
<field name="base" readonly="0"/>
@ -148,7 +148,8 @@
<field name="arch" type="xml">
<form version="7.0">
<header>
<button name="invoice_open" states="draft,proforma2" string="Validate"/>
<button name="invoice_open" states="draft" string="Validate" class="oe_highlight"/>
<button name="invoice_open" states="proforma2" string="Validate"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Ask Refund' states='open,paid'/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" groups="base.group_no_one"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
@ -190,7 +191,7 @@
<field context="{'partner_id': partner_id, 'price_type': 'price_type' in dir() and price_type or False, 'type': type}" name="invoice_line">
<tree string="Invoice lines">
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(product_id,parent.partner_id,parent.type,parent.fiscal_position,account_id)"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(product_id,parent.partner_id,parent.type,parent.fiscal_position,account_id)" groups="base.group_account_user"/>
<field name="invoice_line_tax_id" view_mode="2" context="{'type':parent.type}" domain="[('parent_id','=',False)]"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
<field name="quantity"/>
@ -274,9 +275,10 @@
<field name="arch" type="xml">
<form version="7.0">
<header>
<button name="action_invoice_sent" type="object" string="Send by Email" states="open" attrs="{'invisible':['|',('sent','=',True), ('state', '=', 'draft')]}"/>
<button name="invoice_print" string="Print Invoice" type="object" states="open" attrs="{'invisible':['|',('sent','=',True), ('state', '=', 'draft')]}"/>
<button name="invoice_open" states="draft,proforma2" string="Validate"/>
<button name="action_invoice_sent" type="object" string="Send by Email" states="open" attrs="{'invisible':['|',('sent','=',True), ('state', '=', 'draft')]}" class="oe_highlight"/>
<button name="invoice_print" string="Print Invoice" type="object" states="open" attrs="{'invisible':['|',('sent','=',True), ('state', '=', 'draft')]}" class="oe_highlight"/>
<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"/>
@ -339,7 +341,7 @@
<field name="tax_line" nolabel="1">
<tree editable="bottom" string="Taxes">
<field name="name"/>
<field name="account_id" groups="account.group_account_invoice"/>
<field name="account_id" groups="account.group_account_user"/>
<field name="base" on_change="base_change(base,parent.currency_id,parent.company_id,parent.date_invoice)" readonly="1"/>
<field name="amount" on_change="amount_change(amount,parent.currency_id,parent.company_id,parent.date_invoice)"/>
<field invisible="True" name="base_amount"/>
@ -357,7 +359,7 @@
<field name="amount_tax"/>
<field name="amount_total" class="oe_subtotal_footer_separator"/>
<field name="residual" style="margin-top: 10px"/>
<field name="residual" style="margin-top: 10px" groups="account.group_account_user"/>
<field name="reconciled" invisible="1"/>
</group>
</group>
@ -482,7 +484,12 @@
<field name="domain">[('type','=','out_invoice')]</field>
<field name="context">{'default_type':'out_invoice', 'type':'out_invoice', 'journal_type': 'sale'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help">With Customer Invoices you can create and manage sales invoices issued to your customers. OpenERP can also generate draft invoices automatically from sales orders or deliveries. You should only confirm them before sending them to your customers.</field>
<field name="help">
Click here to create a new Invoice.
&lt;p&gt;
An invoice can be generated automatically from a sale order or a delivery order.
The invoice can be send by email.
</field>
</record>
@ -510,7 +517,12 @@
<field name="domain">[('type','=','in_invoice')]</field>
<field name="context">{'default_type': 'in_invoice', 'type': 'in_invoice', 'journal_type': 'purchase'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help">With Supplier Invoices you can enter and manage invoices issued by your suppliers. OpenERP can also generate draft invoices automatically from purchase orders or receipts. This way, you can control the invoice from your supplier according to what you purchased or received.</field>
<field name="help">
Click here to create Supplier invoice.
&lt;p&gt;
You can control the invoice from your supplier according to what you purchased or received.
OpenERP can also generate draft invoices automatically from purchase orders or receipts.
</field>
</record>
<menuitem action="action_invoice_tree2" id="menu_action_invoice_tree2" parent="menu_finance_payables"/>
@ -523,7 +535,12 @@
<field name="domain">[('type','=','out_refund')]</field>
<field name="context">{'default_type':'out_refund', 'type':'out_refund', 'journal_type': 'sale_refund'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help">With Customer Refunds you can manage the credit notes for your customers. A refund is a document that credits an invoice completely or partially. You can easily generate refunds and reconcile them directly from the invoice form.</field>
<field name="help">
Click here to create a new customer refund.
&lt;p&gt;
A refund is a document that credits an invoice completely or partially.
You can also generate refunds and reconcile them directly from the invoice form.
</field>
</record>
<record id="action_invoice_tree3_view1" model="ir.actions.act_window.view">
@ -549,7 +566,12 @@
<field name="domain">[('type','=','in_refund')]</field>
<field name="context">{'default_type': 'in_refund', 'type': 'in_refund', 'journal_type': 'purchase_refund'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help">With Supplier Refunds you can manage the credit notes you receive from your suppliers. A refund is a document that credits an invoice completely or partially. You can easily generate refunds and reconcile them directly from the invoice form.</field>
<field name="help">
Click here to create a new supplier refund.
&lt;p&gt;
Track refunds you receive from your suppliers.
You can also generate refunds and reconcile them directly from the invoice form.
</field>
</record>
<menuitem action="action_invoice_tree4" id="menu_action_invoice_tree4" parent="menu_finance_payables"/>

View File

@ -20,7 +20,7 @@
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='invoice_cancel']" position="replace">
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="account.group_account_invoice"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" groups="account.group_account_invoice"/>
</xpath>
</field>
</record>
@ -32,7 +32,7 @@
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='invoice_cancel']" position="replace">
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="account.group_account_invoice"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" groups="account.group_account_invoice"/>
</xpath>
</field>
</record>

View File

@ -250,6 +250,7 @@ class account_voucher(osv.osv):
_name = 'account.voucher'
_description = 'Accounting Voucher'
_inherit = ['mail.thread']
_order = "date desc, id desc"
# _rec_name = 'number'
_columns = {
@ -323,7 +324,7 @@ class account_voucher(osv.osv):
'amount': _get_amount,
'type':_get_type,
'state': 'draft',
'pay_now': 'pay_later',
'pay_now': 'pay_now',
'name': '',
'date': lambda *a: time.strftime('%Y-%m-%d'),
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.voucher',context=c),
@ -334,6 +335,11 @@ class account_voucher(osv.osv):
'payment_rate_currency_id': _get_payment_rate_currency,
}
def create(self, cr, uid, vals, context=None):
voucher = super(account_voucher, self).create(cr, uid, vals, context=context)
self.create_send_note(cr, uid, [voucher], context=context)
return voucher
def compute_tax(self, cr, uid, ids, context=None):
tax_pool = self.pool.get('account.tax')
partner_pool = self.pool.get('res.partner')
@ -556,7 +562,7 @@ class account_voucher(osv.osv):
@return: Returns a dict which contains new values, and context
"""
def _remove_noise_in_o2m():
"""if the line is partially reconciled, then we must pay attention to display it only once and
"""if the line is partially reconciled, then we must pay attention to display it only once and
in the good o2m.
This function returns True if the line is considered as noise and should not be displayed
"""
@ -1249,12 +1255,16 @@ class account_voucher(osv.osv):
'state': 'posted',
'number': name,
})
self.post_send_note(cr, uid, [voucher.id], context=context)
if voucher.journal_id.entry_posted:
move_pool.post(cr, uid, [move_id], context={})
# We automatically reconcile the account move lines.
reconcile = False
for rec_ids in rec_list_ids:
if len(rec_ids) >= 2:
move_line_pool.reconcile_partial(cr, uid, rec_ids, writeoff_acc_id=voucher.writeoff_acc_id.id, writeoff_period_id=voucher.period_id.id, writeoff_journal_id=voucher.journal_id.id)
reconcile = move_line_pool.reconcile_partial(cr, uid, rec_ids, writeoff_acc_id=voucher.writeoff_acc_id.id, writeoff_period_id=voucher.period_id.id, writeoff_journal_id=voucher.journal_id.id)
if reconcile:
self.reconcile_send_note(cr, uid, [voucher.id], context=context)
return True
def copy(self, cr, uid, id, default={}, context=None):
@ -1270,6 +1280,32 @@ class account_voucher(osv.osv):
default['date'] = time.strftime('%Y-%m-%d')
return super(account_voucher, self).copy(cr, uid, id, default, context)
# -----------------------------------------
# OpenChatter notifications and need_action
# -----------------------------------------
_document_type = {
'sale': 'Sales Receipt',
'purchase': 'Purchase Receipt',
'payment': 'Supplier Payment',
'receipt': 'Customer Payment',
False: 'Payment',
}
def create_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
message = "%s <b>created</b>." % self._document_type[obj.type or False]
self.message_append_note(cr, uid, [obj.id], body=message, context=context)
def post_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
message = "%s '%s' is <b>posted</b>." % (self._document_type[obj.type or False], obj.move_id.name)
self.message_append_note(cr, uid, [obj.id], body=message, context=context)
def reconcile_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
message = "%s <b>reconciled</b>." % self._document_type[obj.type or False]
self.message_append_note(cr, uid, [obj.id], body=message, context=context)
account_voucher()
class account_voucher_line(osv.osv):

View File

@ -2,15 +2,18 @@
<openerp>
<data>
<record id="view_invoice_customer" model="ir.ui.view">
<field name="name">account.invoice.customer.pay</field>
<field name="model">account.invoice</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<button name="invoice_open" position="after">
<button name="invoice_pay_customer" type="object" string="Register Payment" states="open" icon="gtk-go-forward"/>
</button>
</field>
<field name="name">account.invoice.customer.pay</field>
<field name="model">account.invoice</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='invoice_open'][last()]" position="after">
<button name="invoice_pay_customer" type="object" string="Register Payment"
attrs="{'invisible': ['|', ('state','!=','open'), ('sent','=',True)]}"/>
<button name="invoice_pay_customer" type="object" string="Register Payment"
attrs="{'invisible': ['|', ('state','!=','open'), ('sent','=',False)]}" class="oe_highlight"/>
</xpath>
</field>
</record>
<record id="view_invoice_supplier" model="ir.ui.view">
<field name="name">account.invoice.supplier.pay</field>
@ -18,9 +21,9 @@
<field name="type">form</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<button name="invoice_open" position="after">
<button name="invoice_pay_customer" type="object" string="Pay" states="open" icon="gtk-go-forward"/>
</button>
<xpath expr="//button[@name='invoice_open'][last()]" position="after">
<button name="invoice_pay_customer" type="object" string="Pay" states="open" class="oe_highlight"/>
</xpath>
</field>
</record>
</data>

View File

@ -11,7 +11,7 @@
<field name="number"/>
<field name="reference"/>
<field name="partner_id"/>
<field name="journal_id"/>
<field name="journal_id" groups="account.group_account_user"/>
<field name="period_id" invisible="context.get('visible', True)"/>
<field name="type" invisible="context.get('visible', True)"/>
<field name="amount" sum="Total Amount"/>
@ -110,7 +110,10 @@
</field>
</page>
</notebook>
</sheet>
</sheet>
<footer>
<field name="message_ids" widget="ThreadView"/>
</footer>
</form>
</field>
</record>

View File

@ -143,7 +143,7 @@
<field name="arch" type="xml">
<form version="7.0">
<header>
<button name="proforma_voucher" string="Validate" states="draft" invisible="context.get('line_type', False)"/>
<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)"/>
@ -183,8 +183,8 @@
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
<field name="amount_original" readonly="1"/>
<field name="amount_unreconciled" readonly="1"/>
<field name="reconcile" on_change="onchange_reconcile(reconcile, amount, amount_unreconciled, context)"/>
<field name="amount_unreconciled" readonly="1" groups="account.group_account_user"/>
<field name="reconcile" on_change="onchange_reconcile(reconcile, amount, amount_unreconciled, context)" groups="account.group_account_user"/>
<field name="amount" sum="Total Allocation" on_change="onchange_amount(amount, amount_unreconciled, context)"/>
</tree>
</field>
@ -199,8 +199,8 @@
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
<field name="amount_original" readonly="1"/>
<field name="amount_unreconciled" readonly="1"/>
<field name="reconcile" on_change="onchange_reconcile(reconcile, amount, amount_unreconciled, context)"/>
<field name="amount_unreconciled" readonly="1" groups="account.group_account_user"/>
<field name="reconcile" on_change="onchange_reconcile(reconcile, amount, amount_unreconciled, context)" groups="account.group_account_user"/>
<field name="amount" sum="Total Allocation" on_change="onchange_amount(amount, amount_unreconciled, context)"/>
</tree>
</field>
@ -257,6 +257,9 @@
</page>
</notebook>
</sheet>
<footer>
<field name="message_ids" widget="ThreadView"/>
</footer>
</form>
</field>
</record>
@ -270,7 +273,9 @@
<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">The supplier payment form allows you to track the payment you do to your suppliers. When you select a supplier, the payment method and an amount for the payment, OpenERP will propose to reconcile your payment with the open supplier invoices or bills.</field>
<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>
<record id="action_vendor_payment_tree" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
@ -295,7 +300,7 @@
<field name="arch" type="xml">
<form version="7.0">
<header>
<button name="proforma_voucher" string="Validate" states="draft" invisible="context.get('line_type', False)"/>
<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)"/>
@ -425,6 +430,9 @@
</page>
</notebook>
</sheet>
<footer>
<field name="message_ids" widget="ThreadView"/>
</footer>
</form>
</field>
</record>
@ -438,7 +446,11 @@
<field name="search_view_id" ref="view_voucher_filter_customer_pay"/>
<field name="view_id" eval="False"/>
<field name="target">current</field>
<field name="help">Sales payment allows you to register the payments you receive from your customers. In order to record a payment, you must enter the customer, the payment method (=the journal) and the payment amount. OpenERP will propose to you automatically the reconciliation of this payment with the open invoices or sales receipts.</field>
<field name="help">
Click on create to register a payment.
&lt;p&gt;
Enter the customer and the payment method and then, either create manually a payment record or OpenERP will propose to you automatically the reconciliation of this payment with the open invoices or sales receipts.
</field>
</record>
<record id="action_vendor_receipt_tree" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>

View File

@ -80,8 +80,8 @@
<field name="arch" type="xml">
<form version="7.0">
<header>
<button name="proforma_voucher" string="Validate" states="draft"/>
<button name="%(act_pay_voucher)d" context="{'narration':narration, 'title':'Customer Payment', 'type':'receipt', 'partner_id':partner_id, 'reference':reference, 'amount':amount}" type="action" string="Pay" attrs="{'invisible':['|',('pay_now','=','pay_now'),'|',('state','=','draft'), ('paid','=',True)]}"/>
<button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/>
<button name="%(act_pay_voucher)d" context="{'narration':narration, 'title':'Customer Payment', 'type':'receipt', 'partner_id':partner_id, 'reference':reference, 'amount':amount}" type="action" string="Pay" attrs="{'invisible':['|',('pay_now','=','pay_now'),'|',('state','=','draft'), ('paid','=',True)]}" class="oe_highlight"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" />
<button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to confirm this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
@ -119,7 +119,7 @@
<page string="Sales Information">
<field name="line_cr_ids" on_change="onchange_price(line_cr_ids, tax_id, partner_id)" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}">
<tree string="Sales Lines" editable="bottom">
<field name="account_id" domain="[('user_type.report_type','=','income'),('type','!=','view')]" widget="selection"/>
<field name="account_id" domain="[('user_type.report_type','=','income'),('type','!=','view')]" widget="selection" groups="account.group_account_user"/>
<field name="name"/>
<field name="amount" sum="Total"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
@ -167,6 +167,9 @@
</page>
</notebook>
</sheet>
<footer>
<field name="message_ids" widget="ThreadView"/>
</footer>
</form>
</field>
</record>
@ -181,7 +184,11 @@
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_voucher_filter_sale"/>
<field name="target">current</field>
<field name="help">When you sell products to a customer, you can give him a sales receipt or an invoice. When the sales receipt is confirmed, it creates journal items automatically and you can record the customer payment related to this sales receipt.</field>
<field name="help">
Click here to create a sale receipt.
&lt;p&gt;
When the sales receipt is confirmed, you can record the customer payment related to this sales receipt.
</field>
</record>
<record id="action_sale_receipt_tree" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
@ -217,8 +224,8 @@
<field name="arch" type="xml">
<form version="7.0">
<header>
<button name="proforma_voucher" string="Validate" states="draft"/>
<button name="%(act_pay_bills)d" context="{'narration':narration, 'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay Bill" attrs="{'invisible':['|',('pay_now','=','pay_now'),'|',('state','=','draft'), ('paid','=',True)]}"/>
<button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/>
<button name="%(act_pay_bills)d" context="{'narration':narration, 'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay Bill" attrs="{'invisible':['|',('pay_now','=','pay_now'),'|',('state','=','draft'), ('paid','=',True)]}" class="oe_highlight"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" />
<button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to confirm this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
@ -259,7 +266,7 @@
<page string="Bill Information">
<field name="line_dr_ids" on_change="onchange_price(line_dr_ids, tax_id, partner_id)" context="{'journal_id':journal_id,'partner_id':partner_id}">
<tree string="Expense Lines" editable="bottom">
<field name="account_id" widget="selection" domain="[('user_type.report_type','=','expense'), ('type','!=','view')]"/>
<field name="account_id" widget="selection" domain="[('user_type.report_type','=','expense'), ('type','!=','view')]" groups="account.group_account_user"/>
<field name="name"/>
<field name="amount"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
@ -313,6 +320,9 @@
</page>
</notebook>
</sheet>
<footer>
<field name="message_ids" widget="ThreadView"/>
</footer>
</form>
</field>
</record>
@ -325,6 +335,11 @@
<field name="view_id" eval="False"/>
<field name="search_view_id" eval="view_voucher_filter_vendor"/>
<field name="target">current</field>
<field name="help">
Click here to create a purchase receipt.
&lt;p&gt;
When the purchase receipt is confirmed, you can record the supplier payment related to this purchase receipt.
</field>
</record>
<record id="action_purchase_receipt_tree" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>