OCA / commission

Odoo Commission Management
GNU Affero General Public License v3.0
115 stars 344 forks source link

[IMP] *commission: update settlement, tables and models names #535

Closed CLaurelB closed 5 months ago

CLaurelB commented 5 months ago

commission module: Add migration scripts to update the settlement and commision references in the account.move.line and commission.settlement.line models. Also, add a migration script to rename commission tables and models to match the new ones defined in the module.

account_commission module: Add a migration script to update the settlement line data to match the new field type defined in the module.

OCA-git-bot commented 5 months ago

Hi @pedrobaeza, some modules you are maintaining are being modified, check this out!

CLaurelB commented 5 months ago

@luisg123v could you review, please?

luisg123v commented 5 months ago

@pedrobaeza,

If you are doing an enterprise migration directly from 14.0-, please don't publish things here.

Could you elaborate on this, please? I'd like to understand the correct way to do this in the OCA and why.

It's also good to respect copyright from others' work.

I don't think @CLaurelB aims to take credit over someone else's work.

Regards,

pedrobaeza commented 5 months ago

The migration scripts are already done in its corresponding version where the DB schema changed. You can't put the same migration scripts here in this version because you are jumping using the enterprise migration blackbox from 14.0- to 17.0.

These migration scripts are not idempotent, so that means that this, executed several times, can break things. Users coming from 16.0 or from previous one but using OpenUpgrade will have incorrect migrations due to them.

You have to gather all the OCA modules migration scripts (and maybe adapt them) on your own, but you can't put them on OCA, as there can be as many scripts as combinations of the source and target version (from 13 to 17, from 14 to 17, from 13 to 16, from 14 to 16, etc, etc).

luisg123v commented 5 months ago

@pedrobaeza thanks a lot for the explanation, that's just what I was suspecting.

ANd sorry, this was asked by myself, @CLaurelB was just following my advice on this.

I'll keep it in mind for future migrations.

Regards,

pedrobaeza commented 5 months ago

At the end, migration through enterprise service with a lot of OCA modules doesn't worth too much due to this work, but it's your choice.