This commit is contained in:
Mathias Behrle committed 2008-12-23 13:26:24 +01:00
commit fa2041fbcb
2 files changed
+10 -4

No files matched your search

+4
View File
@@ -24,6 +24,7 @@ class Purchase(OSV):
'readonly': "state != 'draft' or bool(lines)",
})
reference = fields.Char('Reference', size=None, readonly=True, select=1)
supplier_reference = fields.Char('Supplier Reference', select=1)
description = fields.Char('Description', size=None, states=_STATES)
state = fields.Selection([
('draft', 'Draft'),
@@ -577,6 +578,9 @@ class Purchase(OSV):
ids = self.search(cursor, user,
[('reference', operator, name)] + args, limit=limit,
context=context)
ids += self.search(cursor, user,
[('supplier_reference', operator, name)] + args, limit=limit,
context=context)
if not ids:
ids = self.search(cursor, user, [('party', operator, name)] + args,
limit=limit, context=context)
+6 -4
View File
@@ -21,7 +21,8 @@ this repository contains the full copyright notices and license terms. -->
<field name="party"/>
<label name="invoice_address"/>
<field name="invoice_address"/>
<newline/>
<label name="supplier_reference"/>
<field name="supplier_reference"/>
<label name="description"/>
<field name="description" colspan="3"/>
<label name="reference"/>
@@ -103,8 +104,8 @@ this repository contains the full copyright notices and license terms. -->
<field name="packings" colspan="4" widget="one2many"/>
</page>
</notebook>
<field name="currency_digits" invisible="1"/>
<field name="party_lang" invisible="1"/>
<field name="currency_digits" invisible="1" colspan="6"/>
<field name="party_lang" invisible="1" colspan="6"/>
</form>
]]>
</field>
@@ -116,7 +117,8 @@ this repository contains the full copyright notices and license terms. -->
<![CDATA[
<tree string="Purchases">
<field name="reference" select="1"/>
<field name="purchase_date" select="1"/>
<field name="supplier_reference" select="1"/>
<field name="purchase_date" select="2"/>
<field name="party" select="1"/>
<field name="warehouse"/>
<field name="currency" select="2"/>