[FIX] account.invoice: only allow selecting partners that are `commercial entities`

Following-up to the discussion on bug 1160365, this will help users
make the right choice when manualling creating invoices.

lp bug: https://launchpad.net/bugs/1160365 fixed

bzr revid: odo@openerp.com-20130408000124-wcmjco9561hc9fbl
This commit is contained in:
Olivier Dony 2013-04-08 02:01:24 +02:00
parent 347c784dab
commit e4f04efdd6
1 changed files with 3 additions and 2 deletions

View File

@ -166,7 +166,7 @@
<field string="Supplier" name="partner_id"
on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)"
context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}"
domain="[('supplier', '=', True)]"/>
domain="[('supplier', '=', True),'|',('parent_id','=',False),('is_company','=',True)]"/>
<field name="fiscal_position" widget="selection"/>
<field name="origin"/>
<field name="supplier_invoice_number"/>
@ -320,7 +320,8 @@
<field string="Customer" name="partner_id"
on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)"
groups="base.group_user" context="{'search_default_customer':1, 'show_address': 1}"
options='{"always_reload": True}'/>
options='{"always_reload": True}'
domain="[('customer', '=', True),'|',('parent_id','=',False),('is_company','=',True)]"/>
<field name="fiscal_position" widget="selection" />
</group>
<group>