diff options
| author | Vo Minh Thu <vmt@openerp.com> | 2013-06-03 15:35:55 +0200 |
|---|---|---|
| committer | Vo Minh Thu <vmt@openerp.com> | 2013-06-03 15:35:55 +0200 |
| commit | de673a99a9e8fc40e2eb0b5df11189b4e7ba66bc (patch) | |
| tree | 2c845ebfd5e3abd76d71b26a5582ca0541098b10 | |
| parent | e081fd19dc522a55e4ef93cfd1c3c22b1a81f4da (diff) | |
| parent | 7542d8885d5ab01d7447448c707618e1f97d0928 (diff) | |
[MERGE] res.partner: ondelete=restrict on the state and country many2one.
bzr revid: vmt@openerp.com-20130603133555-2oz1bxotnkdh7tu4
| -rw-r--r-- | openerp/addons/base/res/res_partner.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openerp/addons/base/res/res_partner.py b/openerp/addons/base/res/res_partner.py index d140fe62ccc..c8c5ddf2acc 100644 --- a/openerp/addons/base/res/res_partner.py +++ b/openerp/addons/base/res/res_partner.py @@ -259,8 +259,8 @@ class res_partner(osv.osv, format_address): 'street2': fields.char('Street2', size=128), 'zip': fields.char('Zip', change_default=True, size=24), 'city': fields.char('City', size=128), - 'state_id': fields.many2one("res.country.state", 'State'), - 'country_id': fields.many2one('res.country', 'Country'), + 'state_id': fields.many2one("res.country.state", 'State', ondelete='restrict'), + 'country_id': fields.many2one('res.country', 'Country', ondelete='restrict'), 'country': fields.related('country_id', type='many2one', relation='res.country', string='Country', deprecated="This field will be removed as of OpenERP 7.1, use country_id instead"), 'email': fields.char('Email', size=240), |
