Vauxoo / addons-vauxoo

All our modules related to developments that solves generic issues on Odoo, or that solve internal problems on Odoo Core, if something is here, maybe it is solving an issue in your company, try it and report what you see.
http://www.vauxoo.com
193 stars 288 forks source link

[FIX] partner_credit_limit: Add hook to initialize credit limit #1395

Closed luisg123v closed 4 years ago

luisg123v commented 4 years ago

Starting from 1e18a7457, the partner's credit limit field is company-dependent, so their values need to be set manually, because they are properties instead of a standard field.

A migration script was provided on the aforementioned commit to set that value when the module is already installed. However, since that field is a native one, values need to be set also when the module is installed.

This commit fixes the above by implementing a post-init hook to set required values.

luisg123v commented 4 years ago

@keylor2906 Could you review, please?

This fix the issue regarding credit limit values not being migrated.

CC @edy1192

luisg123v commented 4 years ago

@moylop260 or @keylor2906 Could you review/merge, please?

moylop260 commented 4 years ago

The main issue here is because of the field partner_credit_limit is defined by odoo itself. So, it is required for installation from scratch.