[MERGE] account: Apply some usability improvements
Purpose ======= General improvements on the accounting application SPECIFICATION ============= 1. On a supplier invoice, everyhting should be in the language of the user, not in the language of the supplier 2. list view on invoices and vendor bills: Add the amount VAT excl. and the tax amount in the columns https://drive.google.com/file/d/0B9XXHE6oGlGJVXVaYjdUekxZbkE/view 3. remove tax scope in the list view of the taxes coming from the search more of the invoice line https://drive.google.com/a/odoo.com/file/d/0B0ITmdw6h3ZrVWc4NVFQZVFpY0E/view?usp=drivesdk 4. Hide the Filters option (While venders bills search view showing only tax scope purchase and sales bills search view showing only tax scope sales so no need purchase and sales option of the filter, also hide active and inactive filters.) https://drive.google.com/file/d/1rWzGr4X5SswUZLZXiNI15Qg4Oqb5wopC/view?usp=drivesdk 5. Payment terms It should not be possible to delete a payment term that is used in another document. Raise the following error : "You can not delete this payment terms as other records still reference it. However, you can archive it."
This commit is contained in:
@@ -1830,6 +1830,8 @@ class AccountPaymentTerm(models.Model):
|
||||
|
||||
@api.multi
|
||||
def unlink(self):
|
||||
if self.env['account.invoice'].search([('payment_term_id', 'in', self.ids)]):
|
||||
raise UserError(_('You can not delete payment terms as other records still reference it. However, you can archive it.'))
|
||||
property_recs = self.env['ir.property'].search([('value_reference', 'in', ['account.payment.term,%s'%payment_term.id for payment_term in self])])
|
||||
property_recs.unlink()
|
||||
return super(AccountPaymentTerm, self).unlink()
|
||||
|
||||
@@ -136,6 +136,8 @@
|
||||
<field name="user_id"/>
|
||||
<field name="date_due"/>
|
||||
<field name="origin"/>
|
||||
<field name="amount_untaxed" string="Tax Excluded" sum="Total"/>
|
||||
<field name="amount_tax" sum="Total"/>
|
||||
<field name="amount_total_signed" string="Total" sum="Total"/>
|
||||
<field name="residual_signed" string="Amount Due" sum="Amount Due"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
@@ -199,6 +201,8 @@
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
<field name="date_due"/>
|
||||
<field name="origin"/>
|
||||
<field name="amount_untaxed" string="Tax Excluded" sum="Total"/>
|
||||
<field name="amount_tax" sum="Total"/>
|
||||
<field name="amount_total_signed" string="Total" sum="Total"/>
|
||||
<field name="residual_signed" string="To Pay" sum="To pay"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
@@ -277,7 +281,7 @@
|
||||
<field name="uom_id" groups="product.group_uom"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="discount" groups="base.group_no_one"/>
|
||||
<field name="invoice_line_tax_ids" widget="many2many_tags" options="{'no_create': True}" context="{'type':parent.type}"
|
||||
<field name="invoice_line_tax_ids" widget="many2many_tags" options="{'no_create': True}" context="{'type':parent.type, 'tree_view_ref': 'account.account_tax_view_tree', 'search_view_ref': 'account.account_tax_view_search'}"
|
||||
domain="[('type_tax_use','=','purchase'),('company_id', '=', parent.company_id)]"/>
|
||||
<field name="price_subtotal" string="Amount"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
@@ -434,7 +438,7 @@
|
||||
<field name="uom_id" groups="product.group_uom"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="discount" groups="base.group_no_one"/>
|
||||
<field name="invoice_line_tax_ids" widget="many2many_tags" options="{'no_create': True}" context="{'type':parent.type}"
|
||||
<field name="invoice_line_tax_ids" widget="many2many_tags" options="{'no_create': True}" context="{'type':parent.type, 'tree_view_ref': 'account.account_tax_view_tree', 'search_view_ref': 'account.account_tax_view_search'}"
|
||||
domain="[('type_tax_use','=','sale'),('company_id', '=', parent.company_id)]"/>
|
||||
<field name="price_subtotal" string="Subtotal"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
|
||||
@@ -1000,6 +1000,18 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_tax_view_tree" model="ir.ui.view">
|
||||
<field name="name">account.invoice.line.tax.search</field>
|
||||
<field name="model">account.tax</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Account Tax">
|
||||
<field name="name"/>
|
||||
<field name="description"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_tax_kanban" model="ir.ui.view">
|
||||
<field name="name">account.tax.kanban</field>
|
||||
<field name="model">account.tax</field>
|
||||
@@ -1043,6 +1055,17 @@
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_view_search" model="ir.ui.view">
|
||||
<field name="name">account.tax.search.filters</field>
|
||||
<field name="model">account.tax</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Taxes">
|
||||
<field name="name" filter_domain="['|', ('name','ilike',self), ('description','ilike',self)]" string="Tax"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_tax_form" model="ir.ui.view">
|
||||
<field name="name">account.tax.form</field>
|
||||
<field name="model">account.tax</field>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<data>
|
||||
<template id="report_invoice_document">
|
||||
<t t-call="web.external_layout">
|
||||
<t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})" />
|
||||
<t t-set="o" t-value="o.with_context({'lang': lang})"/>
|
||||
<div class="page">
|
||||
<div class="row">
|
||||
<div name="invoice_address" class="col-xs-5 col-xs-offset-7">
|
||||
@@ -180,7 +180,8 @@
|
||||
<template id="report_invoice">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="account.report_invoice_document" t-lang="o.partner_id.lang"/>
|
||||
<t t-set="lang" t-value="o.user_id.lang if o.type in ('in_invoice', 'in_refund') else o.partner_id.lang"/>
|
||||
<t t-call="account.report_invoice_document" t-lang="lang"/>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
@@ -188,7 +189,8 @@
|
||||
<template id="report_invoice_with_payments">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="account.report_invoice_document_with_payments" t-lang="o.partner_id.lang"/>
|
||||
<t t-set="lang" t-value="o.user_id.lang if o.type in ('in_invoice', 'in_refund') else o.partner_id.lang"/>
|
||||
<t t-call="account.report_invoice_document_with_payments" t-lang="lang"/>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
<field name="qty_invoiced" attrs="{'column_invisible': [('parent.state', 'not in', ('purchase', 'done'))]}"/>
|
||||
<field name="product_uom" groups="product.group_uom" attrs="{'readonly': [('state', 'in', ('purchase', 'done', 'cancel'))]}" force_save="1"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="taxes_id" widget="many2many_tags" domain="[('type_tax_use','=','purchase')]" context="{'default_type_tax_use': 'purchase'}" options="{'no_create': True}"/>
|
||||
<field name="taxes_id" widget="many2many_tags" domain="[('type_tax_use','=','purchase')]" context="{'default_type_tax_use': 'purchase', 'search_view_ref': 'account.account_tax_view_search'}" options="{'no_create': True}"/>
|
||||
<field name="price_subtotal" widget="monetary"/>
|
||||
</tree>
|
||||
<form string="Purchase Order Line">
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="tax_id" widget="many2many_tags" options="{'no_create': True}" domain="[('type_tax_use','=','sale'),('company_id','=',parent.company_id)]"
|
||||
<field name="tax_id" widget="many2many_tags" options="{'no_create': True}" context="{'search_view_ref': 'account.account_tax_view_search'}" domain="[('type_tax_use','=','sale'),('company_id','=',parent.company_id)]"
|
||||
attrs="{'readonly': [('qty_invoiced', '>', 0)]}"/>
|
||||
<label for="customer_lead"/>
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user