Skip to Content
Menu
This question has been flagged
1 Reply
479 Views

I am doing custom development on Odoo Enterprise V18, with hosting on Odoo.sh

Recently, when I make edits to a model, specifically by deleting existing fields, the ir.views doesn't seen to take a note of this. Builds fail with the error that the deleted field does not exists in the model, which is correct. 

Flow: 

  • There are requests to change the flow of features (removing fields or a full overhaul)
  • I delete the fields from the models
  • I delete the views as well from the xml files
  • Build the feature, test on local and deploy to Odoo.sh
  • The DB update is successful in develop and the consequent branch, but fails in staging and main. 

I have tried to manually update the DB using the update command with the flag --dev=all but this doesn't work since the next time I build, the current successful staging branch will still be the reference for the next build and not the dummy DB that's created on failed builds.


Avatar
Discard
Best Answer

This is normal behavior.

You could adapt your workflow in development to

  1. delete the fields from view
  2. push and upgrade the module
  3. delete the fields from model
  4. push and upgrade the module

However, when using version numbering correctly in your module, even committing all changes at once should work just fine.
In this scenario this would also make sense, since 1) would be a minor release (if committed individually), still backwards compatible from the model's perspective (i.e 18.0.x.0.1), and 3) would then be a db table modification with, usually, greater impact (i.e 18.0.x.1.0).


See also the output on odoo.sh Shell for odoo-update:

cfarnleitner-xyz [staging/18.0]:~$ odoo-update -h
Update Odoo module

This script proceed to a manual update of one or more Odoo modules in the database.

NOTE: this command is handy to quickly test updates during some development iterations,
      however keep in mind that on Odoo.sh the convention is to increase a module's
      version number in it's manifest file whenever the committed changes requires
      a database upgrade. Please refer to the documentation for more details:
      https://www.odoo.sh/doc/getting_started/branches.html#production



Usage:
  odoo-update [--help] <module>

Options:
  -h, --help           Show this screen and exit.
  <module>             Module list to update separated by comma.
                       Use 'all' as module name to update all modules at once.


In addition, in odoo.sh you may navigate to the Builds menu. Here you should be able to access recent, failed instances as well:

Avatar
Discard
Author

Thank you @Christoph.
I had tried versioning but that did not work. I'll see if deleting the views from the current branch will work, since I do know their IDs.

Before and After source could be helpful in that case

Related Posts Replies Views Activity
1
Jun 25
472
0
Apr 25
18
1
Jun 25
1024
2
Mar 25
6067
3
Mar 25
1905