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

migration from 13 to 14 #32

Open
legalsylvain opened this issue Sep 5, 2020 · 14 comments
Open

migration from 13 to 14 #32

legalsylvain opened this issue Sep 5, 2020 · 14 comments
Milestone

Comments

@legalsylvain
Copy link
Collaborator

List of tips https://mobile.twitter.com/Yenthe666/status/1302228260177276930

Cortesy @Yenthe666

@legalsylvain legalsylvain added this to the 14.0 milestone Sep 5, 2020
@Yenthe666
Copy link

Thanks! I'll keep adding if I find new ones :)

@legalsylvain
Copy link
Collaborator Author

Thanks to you. Such analysis is precious.

@ivantodorovich
Copy link
Collaborator

I got tired of going back and forth to twitter, so I've copy-pasted the list here:

  1. The #Odoo map view no longer uses <marker-popup>, you can simply remove the wrapper. There is no longer support for widgets either (I reported this as a bug).

  2. Transient models in #Odoo now require security rules/rights.

  3. Any inherited selection field in #Odoo now needs a cleanup strategy. Set ondelete="" with 'set null', 'set default' or 'cascade' inside. For more info see: odoo/odoo@f048139

  4. #Odoo 14 no longer supports directly assigning invisible to an element, needs to be wrapper in attrs={}
    V13: <field name="count" invisible="[('count','=',1)]" readonly="True"/>
    V14: <field name="count" attrs="{'invisible': [('count','=', 1)]}" readonly="True"/>

  5. The measure_type field is removed from the uom.category model. The UOM's have been simplified and made more logical.

  6. The field named type on the model mail.message has changed to message_type.

  7. The <report> feature has been dropped and replaced by <record>. See odoo/odoo@6835aeb for a lot of code samples.

@pedrobaeza
Copy link
Member

Well, the proper community list in in https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-14.0.

@ivantodorovich
Copy link
Collaborator

ivantodorovich commented Oct 6, 2020

Well, the proper community list in in https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-14.0.

Ahhh it's fresh ;D
Great, I think we should add a few of these ones to that list. ie: 1, 2, 5, and 6

@pedrobaeza
Copy link
Member

1 is not community, and 5 and 6 are model specific changes. If we have to mention in this list each of the model changes... You have OpenUpgrade migration analysis for that, and you will see how huge they are: OCA/OpenUpgrade@d740fa7#diff-f857330c4c0147d8cdcd1260ca667e11

I'm adding point 2 though.

What can be done is to automate some of these points in the library, that is the goal of it.

Closing this.

@pedrobaeza
Copy link
Member

Coming again to this, I'm seeing that library can handle certain renames, but to which point this will scale for any of the changes? Anyway, reopening as this seems to be the hot general point for all the migration from 13 to 14.

@trojikman
Copy link
Member

trojikman commented Nov 30, 2020

  1. Moved tour predefined steps: odoo/odoo@ab2e3fd

  2. phantom_js is now permanently unusable. Now you can only use browser_js

@yelizariev
Copy link
Member

@trojikman both updates are done in #50

@joao-p-marques
Copy link
Member

On invoices (account.move):

  1. default_type -> default_move_type
  2. post() -> action_post()

These should also be easily applicable by this library.

@Yenthe666
Copy link

Yenthe666 commented Jan 15, 2021

A very annoying one, which took me hours to figure out after a migration is if you have an inherit/override/extension on _compute_meeting_count. It used to call the read_group() without a sudo() but was converted to a sudo call in V13 -> V14 at odoo/odoo@b415533.
Now if you do an inherit of this function and call it without a sudo() your events are completely broken and give a keyerror on opportunity_id. Hope it saves somebody (and hope this belongs here too) :)

@pedrobaeza
Copy link
Member

I don't this kind of changes can be automated. For post() for example, you can have a legitimate method with that name that had nothing to do with account.move, so unless we have tools to detect ORM inheritance (which can't be static), this can't be done.

@joao-p-marques
Copy link
Member

Yes, you are right, I hadn't thought of that. However, it could print a log suggesting that as it does currently with act_window and report tags.

@pedrobaeza
Copy link
Member

They are not the same. Your suggestions are "data model" changes. The existing ones are general framework changes.

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

7 participants