You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
465 B

7 years ago
  1. # -*- coding: utf-8 -*-
  2. # © 2017 Therp BV <http://therp.nl>
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from odoo import api, SUPERUSER_ID
  5. def post_init_hook(cr, registry):
  6. env = api.Environment(cr, SUPERUSER_ID, {})
  7. partner_model = env['res.partner']
  8. # get all fields with a parent
  9. partners = partner_model.search(['!', ('parent_id', 'in', [False])])
  10. import pudb
  11. pudb.set_trace()
  12. partners.update_relations()