It is currently Mon May 21, 2012 7:01 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: [filter domain]partner - customer supplier(in progress)
PostPosted: Tue Jun 14, 2011 7:06 pm 
Offline

Joined: Tue Jun 14, 2011 6:23 pm
Posts: 12
Hello,

I have an object which inherits from the crm.lead object, like this :
Code:
from osv import fields,osv

class res_partner_opportunities2(osv.osv):
    """ Inherits crm.lead and adds opportunitie's product name add quantity """
    _inherit = 'crm.lead'
    _columns = {
        'product_name':fields.many2one('product.product','Product Name'),
        'product_quantity':fields.integer('Quantity'),
        'customer':fields.many2one('res.partner','customer'),
        'supplier':fields.many2one('res.partner','supplier'),
        'prospect':fields.many2one('res.partner','prospect'),
    }
res_partner_opportunities2()

and the opportunity's search, like this: - prospect field come from an res.partner inherit object-
Code:
<field name="date_closed" position="after">
          <separator orientation="vertical"/>
          <filter string="Customer" name="customer" icon="terp-personal" domain="[('is_customer_add','=','1')]" />
          <filter string="Supplier" name="supplier"  icon="terp-personal" domain="[('is_supplier_add','=','1')]" />
          <filter string="Prospect" name="prospect" icon="terp-personal" domain="[('prospect','=',1)]" help="Prospective Partners\
"/>

so when I request simple search -only customer, or, only supplier- everythings works fine
but when I request compound search -customer and supplier- I've got an error :
Code:
  File "/data/openerp/prod/server/bin/sql_db.py", line 131, in execute
    res = self._obj.execute(query, params)
ProgrammingError: operator does not exist: integer = boolean
LINE 1: ....id,crm_lead.id FROM "crm_lead" WHERE crm_lead.id IN (false)...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.

so I searched in the (openerp) manual but don't find the solution,

Every help is welcome

thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP