[MERGE] merge with mdi branch to get customer invoice related changes

bzr revid: psi@tinyerp.com-20120612130417-4u5pji6ojs7eqk66
This commit is contained in:
Purnendu Singh (OpenERP)
2012-06-12 18:34:17 +05:30
6 changed files with 58 additions and 23 deletions
+20 -11
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"/>
@@ -274,9 +274,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_form_button_hi"/>
<button name="invoice_print" string="Print Invoice" type="object" states="open" attrs="{'invisible':['|',('sent','=',True), ('state', '=', 'draft')]}" class="oe_form_button_hi"/>
<button name="invoice_open" states="draft" string="Validate" class="oe_form_button_hi"/>
<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 +340,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 +358,7 @@
<field name="amount_tax"/>
<field name="amount_total" class="oe_form_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>
@@ -485,7 +486,11 @@
<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;
The Invoice can be generated automatically from a sale order or a delivery order. The invoice can be send by email.
</field>
</record>
@@ -526,7 +531,11 @@
<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">
+2 -2
View File
@@ -323,7 +323,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),
@@ -556,7 +556,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
"""
@@ -7,9 +7,12 @@
<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>
<xpath expr="//button[@name='invoice_open']" position="after">
<div>
<button name="invoice_pay_customer" type="object" string="Register Payment" attrs="{'invisible':['|',('sent','=',True), ('state', '!=', 'open')]}"/>
<button name="invoice_pay_customer" type="object" string="Register Payment" attrs="{'invisible':['|',('sent','=',False), ('state', '!=', 'open')]}" class="oe_form_button_hi"/>
</div>
</xpath>
</field>
</record>
<record id="view_invoice_supplier" model="ir.ui.view">
@@ -111,6 +111,9 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
@@ -259,6 +259,9 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
@@ -297,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_form_button_hi"/>
<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)"/>
@@ -412,6 +415,9 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
@@ -425,7 +431,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"/>
@@ -82,8 +82,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_form_button_hi"/>
<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_form_button_hi"/>
<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"/>
@@ -93,7 +93,7 @@
<group col="6">
<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="date" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/>
<field name="journal_id" domain="[('type','in',['sale','sale_refund'])]" widget="selection" on_change="onchange_journal(journal_id, line_cr_ids, tax_id, partner_id, date, amount, type, company_id, context)"/>
<field name="journal_id" domain="[('type','in',['sale','sale_refund'])]" widget="selection" on_change="onchange_journal(journal_id, line_cr_ids, tax_id, partner_id, date, amount, type, company_id, context)" groups="account.group_account_user"/>
<field name="number"/>
<field name="name" colspan="2"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
@@ -104,7 +104,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"/>
@@ -157,6 +157,9 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
@@ -171,7 +174,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"/>
@@ -277,6 +284,9 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>