Skip to content

[11.0][MIG] bi_sql_editor - #230

Merged
JordiBForgeFlow merged 19 commits into
OCA:11.0from
ForgeFlow:11.0-mig-bi_sql_editor
Sep 19, 2018
Merged

JordiBForgeFlow merged 19 commits into
OCA:11.0from
ForgeFlow:11.0-mig-bi_sql_editor

Conversation

@HviorForgeFlow

Copy link
Copy Markdown
Member

No description provided.

@HviorForgeFlow
HviorForgeFlow force-pushed the 11.0-mig-bi_sql_editor branch 3 times, most recently from d4c3fa0 to cebf2f0 Compare August 1, 2018 16:39

@pedrobaeza pedrobaeza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash a bit the commit history by author/logical set and I think we are good to go with this PR.

legalsylvain and others added 13 commits August 9, 2018 18:43
…fresh date time on the action name of each sql materialized view
Fix error '... is not a table or foreign table'
Fix view (colors + oe_highlight)
Fix tests
Fix README + manifest
Fix back to draft
Fix cron call + default values
Use Postgres version 9.6 for travis builds
* [IMP] is_materialized field non readonly on sql_valid state ; [FIX] block possibility to set indexes on non materialized view

* [FIX] set domain_force, group_ids readonly if state > sql_valid

* [IMP] better display of the field group_ids

* [IMP] possibility to reorder menu items from sql views

* [IMP] Do not warn user when setting sql view to draft if state is sql_valid

* [REF]

* [FIX] Set Date of the first execution in the action name
@HviorForgeFlow
HviorForgeFlow force-pushed the 11.0-mig-bi_sql_editor branch from cebf2f0 to c2b1beb Compare August 9, 2018 16:44
@nicomacr

Copy link
Copy Markdown
Contributor

@hveficent Do you make those changes or can I do them?

@HviorForgeFlow

Copy link
Copy Markdown
Member Author

They are done @nicomacr . I'm working on a error that I caught in production environment. I wish you could help me.
It appears when you try to update bi_sql_editor module and you've already have a materialized view created.

Traceback (most recent call last):
  File "/odoo/odoo/modules/registry.py", line 85, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/odoo/odoo/modules/loading.py", line 376, in load_modules
    force, status, report, loaded_modules, update_module, models_to_check)
  File "/odoo/odoo/modules/loading.py", line 274, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/odoo/odoo/modules/loading.py", line 153, in load_module_graph
    registry.init_models(cr, model_names, {'module': package.name})
  File "/odoo/odoo/modules/registry.py", line 306, in init_models
    model._auto_init()
  File "/reporting-engine/bi_sql_editor/models/bi_sql_view.py", line 22, in _auto_init
    return super(BaseModel, self)._auto_init()
  File "/odoo/odoo/models.py", line 2219, in _auto_init
    new = field.update_db(self, columns)
  File "/odoo/odoo/fields.py", line 1944, in update_db
    return super(Many2one, self).update_db(model, columns)
  File "/odoo/odoo/fields.py", line 845, in update_db
    self.update_db_column(model, column)
  File "/odoo/odoo/fields.py", line 1947, in update_db_column
    super(Many2one, self).update_db_column(model, column)
  File "/odoo/odoo/fields.py", line 859, in update_db_column
    sql.create_column(model._cr, model._table, self.name, self.column_type[1], self.string)
  File "/odoo/odoo/tools/sql.py", line 77, in create_column
    cr.execute('ALTER TABLE "{}" ADD COLUMN "{}" {}'.format(tablename, columnname, columntype))
  File "/odoo/odoo/sql_db.py", line 155, in wrapper
    return f(self, *args, **kwargs)
  File "/odoo/odoo/sql_db.py", line 232, in execute
    res = self._obj.execute(query, params)
psycopg2.ProgrammingError: "x_bi_sql_view_ddmrp_lt_product" is not a table, composite type, or foreign table

@HviorForgeFlow
HviorForgeFlow force-pushed the 11.0-mig-bi_sql_editor branch from b66bcc8 to 1e9273d Compare August 28, 2018 15:46
@HviorForgeFlow
HviorForgeFlow force-pushed the 11.0-mig-bi_sql_editor branch from 1e9273d to 72e31ea Compare August 28, 2018 15:57
@HviorForgeFlow

Copy link
Copy Markdown
Member Author

Still failing when base module is upgraded, upgrade sql_view_editor is possible now, without sending to draft materialized views.

@LoisRForgeFlow LoisRForgeFlow left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that I can update this module without problem now 👍 Let's wait for the Odoo fix to greenify travis and runbot.

@MiquelRForgeFlow

Copy link
Copy Markdown
Contributor

Included cherry-pick of #239.

@MiquelRForgeFlow

Copy link
Copy Markdown
Contributor

Now this PR is 🍏

@lreficent please, could you functionally review again?

@JordiBForgeFlow JordiBForgeFlow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks @mreficent ! Nice work

@JordiBForgeFlow
JordiBForgeFlow merged commit 5c45219 into OCA:11.0 Sep 19, 2018
@MiquelRForgeFlow
MiquelRForgeFlow deleted the 11.0-mig-bi_sql_editor branch September 19, 2018 15:58
@emagdalenaC2i emagdalenaC2i mentioned this pull request Dec 29, 2018
12 tasks
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

Successfully merging this pull request may close these issues.