[MERGE] merged the branch that add a new field on supplier invoices, to store the number as provided by your supplier. Suggested by Normunds Vilcans

bzr revid: qdp-launchpad@openerp.com-20121023101556-6u2cq378bbkjypeg
This commit is contained in:
Quentin (OpenERP) 2012-10-23 12:15:56 +02:00
commit d8e3f1d46b
2 changed files with 9 additions and 5 deletions

View File

@ -185,6 +185,7 @@ class account_invoice(osv.osv):
_columns = {
'name': fields.char('Description', size=64, select=True, readonly=True, states={'draft':[('readonly',False)]}),
'origin': fields.char('Source Document', size=64, help="Reference of the document that produced this invoice.", readonly=True, states={'draft':[('readonly',False)]}),
'supplier_invoice_number': fields.char('Supplier Invoice Number', size=64, help="The reference of this invoice as provided by the supplier.", readonly=True, states={'draft':[('readonly',False)]}),
'type': fields.selection([
('out_invoice','Customer Invoice'),
('in_invoice','Supplier Invoice'),

View File

@ -168,12 +168,15 @@
context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}"
domain="[('supplier', '=', True)]"/>
<field name="fiscal_position" widget="selection"/>
<field name="origin"/>
<label for="reference_type"/>
<div>
<group>
<field name="origin"/>
<field name="supplier_invoice_number"/>
</group>
<label for="reference_type"/>
<div>
<field name="reference_type" class="oe_inline oe_edit_only"/>
<field name="reference" class="oe_inline"/>
</div>
</div>
</group>
<group>
<field name="date_invoice"/>
@ -445,7 +448,7 @@
<field name="model">account.invoice</field>
<field name="arch" type="xml">
<search string="Search Invoice">
<field name="number" string="Invoice" filter_domain="['|', ('number','ilike',self),('origin','ilike',self)]"/>
<field name="number" string="Invoice" filter_domain="['|','|', ('number','ilike',self), ('origin','ilike',self), ('supplier_invoice_number', 'ilike', self)]"/>
<filter name="draft" icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Invoices"/>
<filter name="proforma" icon="terp-gtk-media-pause" string="Proforma" domain="[('state','=','proforma2')]" help="Proforma Invoices" groups="account.group_proforma_invoices"/>
<filter name="invoices" icon="terp-dolar" string="Invoices" domain="[('state','not in',['draft','cancel'])]" help="Proforma/Open/Paid Invoices"/>