Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC odoo bootstrap settings #50

Closed
bealdav opened this issue Jul 1, 2019 · 1 comment
Closed

RFC odoo bootstrap settings #50

bealdav opened this issue Jul 1, 2019 · 1 comment

Comments

@bealdav
Copy link
Contributor

bealdav commented Jul 1, 2019

Hi all ,

I need to apply the same the settings over multiple new db used for test/fix, etc.

settings = {
    'group_discount_per_so_line': True,
    'group_uom': True,
    'group_sale_delivery_address': True,
....
}

this code is sufficient

            config = settings_model.search(
                [('company_id', '=', cpny.id)], limit=1, order='id desc')
            if not config:
                # first configuration
                config = settings_model.create({'company_id': cpny.id})
            config.write(settings)
            # Execute the record in order to trigger save and to apply settings
            config.execute()

Do you think this repo is a convenient place for this kind of script ?

Thanks

@bealdav
Copy link
Contributor Author

bealdav commented Jul 5, 2019

Implemented with #51

@bealdav bealdav closed this as completed Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant