summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorP. Christeas <xrg@openerp.com>2011-01-17 12:10:22 +0100
committerP. Christeas <xrg@openerp.com>2011-01-17 12:10:22 +0100
commit8e809ace7fc59ea9b7325b4e3b75f7f309c593f9 (patch)
treeabff326020b6f302d4027232c982a2c91c70bf99
parent3aed57ec2343bcacba884e15e6a727ac312f9daa (diff)
parent5b2e2371ca3b72c451d8d7aeb441147d768c616d (diff)
Merge branch 'official-trunk' into deb-scripts
bzr revid: xrg@openerp.com-20110117111022-qmkv7jpo448iwvyh
-rw-r--r--bin/addons/base/res/partner/partner_view.xml2
-rw-r--r--bin/addons/base/res/res_company.py6
-rw-r--r--bin/osv/osv.py7
3 files changed, 10 insertions, 5 deletions
diff --git a/bin/addons/base/res/partner/partner_view.xml b/bin/addons/base/res/partner/partner_view.xml
index 8c949a7f410..cf1d36cbaec 100644
--- a/bin/addons/base/res/partner/partner_view.xml
+++ b/bin/addons/base/res/partner/partner_view.xml
@@ -108,7 +108,7 @@
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner.address</field>
<field name="view_type">form</field>
- <field name="context">{"search_default_customer":1,"search_default_partner_id":self}</field>
+ <field name="context">{"search_default_customer":1}</field>
<field name="search_view_id" ref="view_res_partner_address_filter"/>
<field name="help">Customers (also called Partners in other areas of the system) helps you manage your address book of companies whether they are prospects, customers and/or suppliers. The partner form allows you to track and record all the necessary information to interact with your partners from the company address to their contacts as well as pricelists, and much more. If you installed the CRM, with the history tab, you can track all the interactions with a partner such as opportunities, emails, or sales orders issued.</field>
</record>
diff --git a/bin/addons/base/res/res_company.py b/bin/addons/base/res/res_company.py
index 8cafa28ccff..ba4c0fabc83 100644
--- a/bin/addons/base/res/res_company.py
+++ b/bin/addons/base/res/res_company.py
@@ -81,9 +81,9 @@ class res_company(osv.osv):
'rml_header1': fields.char('Report Header', size=200),
'rml_footer1': fields.char('Report Footer 1', size=200),
'rml_footer2': fields.char('Report Footer 2', size=200),
- 'rml_header' : fields.text('RML Header'),
- 'rml_header2' : fields.text('RML Internal Header'),
- 'rml_header3' : fields.text('RML Internal Header'),
+ 'rml_header' : fields.text('RML Header', required=True),
+ 'rml_header2' : fields.text('RML Internal Header', required=True),
+ 'rml_header3' : fields.text('RML Internal Header', required=True),
'logo' : fields.binary('Logo'),
'currency_id': fields.many2one('res.currency', 'Currency', required=True),
'currency_ids': fields.one2many('res.currency', 'company_id', 'Currency'),
diff --git a/bin/osv/osv.py b/bin/osv/osv.py
index 5a798e7dcaf..138e8c8daab 100644
--- a/bin/osv/osv.py
+++ b/bin/osv/osv.py
@@ -340,7 +340,12 @@ class osv(osv_base, orm.orm):
exist = False
for c2 in range(len(new)):
#For _constraints, we should check field and methods as well
- if new[c2][2]==c[2] and new[c2][0]==c[0]:
+ if new[c2][2]==c[2] and (new[c2][0] == c[0] \
+ or getattr(new[c2][0],'__name__', True) == \
+ getattr(c[0],'__name__', False)):
+ # If new class defines a constraint with
+ # same function name, we let it override
+ # the old one.
new[c2] = c
exist = True
break