-
-
Notifications
You must be signed in to change notification settings - Fork 865
[16.0][MIG] bi_sql_editor (from 15.0) #670
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
Conversation
|
/ocabot migration bi_sql_editor |
|
Sorry @legalsylvain you are not allowed to mark the addon tobe migrated. To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons. If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the |
|
/ocabot migration bi_sql_editor |
1e66f6c to
db5a8f6
Compare
734a2d3 to
94eace5
Compare
|
Probably needs a rebase because of sql_request_abstract merged cc @legalsylvain |
|
/ocabot rebase |
|
Sorry @legalsylvain you are not allowed to rebase. To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons. If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the |
|
Oops @legalsylvain you probably needs to remove test-requirement.txt |
01a614e to
61b434f
Compare
|
/ocabot rebase |
|
Sorry @legalsylvain you are not allowed to rebase. To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons. If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the |
Done. CI is right. Thanks for updating your review. |
bealdav
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only review in 3 last commits
Tested on runboat
Thanks a lot
florian-dacosta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review only
Just one remark @legalsylvain
| "many2one_model_id": many2one_model_id, | ||
| } | ||
| ) | ||
| return super().create(vals) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems quite wrong to me, should be vals_list instead of vals right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for your review !
fixed.
61b434f to
6b2bf44
Compare
|
Edit : 01/03/2022 : done. Ready to be merged. |
47a1319 to
0705d2c
Compare
[UPD] README.rst
Currently translated at 38.3% (43 of 112 strings) Translation: reporting-engine-13.0/reporting-engine-13.0-bi_sql_editor Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-13-0/reporting-engine-13-0-bi_sql_editor/es/
this commit allows specifying the group operator for each field. This functionality was originally included in a seperate module "bi_sql_editor_aggregate" in version 12.
On class creation by the ORM of 'manual' model, odoo now check if the table is a real table or a view to automatically set the '_auto' property on the class definition. We can therefore remove the monkey patch on 'ir.model'. see odoo/odoo@17c4f47
Currently translated at 41.0% (46 of 112 strings) Translation: reporting-engine-15.0/reporting-engine-15.0-bi_sql_editor Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-15-0/reporting-engine-15-0-bi_sql_editor/ca/
Currently translated at 97.3% (109 of 112 strings) Translation: reporting-engine-15.0/reporting-engine-15.0-bi_sql_editor Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-15-0/reporting-engine-15-0-bi_sql_editor/ca/
- move menu and action in according view file - use new sql_request_abstract menu entry for SQL views configuration - Use sql_request_abstract primary tree view - Use sql_request_abstract primary form view - move has_grouped_changed in sql_request_abstract module - improve demo data - add default count value to display in pivot, if no pivot_measures are defined ; - set widget handle to sequence field - reorder fields in tree view and add optional hide for some fields - simplify : make field_description field required - improve : add optional='hide' and 'show' on tree visibility - replace obsolete base.menu_board_root by spreadsheet_dashboard entries - update translation
The `table_columns()` slows down modules loading significantly up to 2-3x. In most cases `model._name.startswith(self._model_prefix)` returns `False`, so better to check it first.
|
Congratulations, PR rebased to 16.0. |
3372a0b to
c55dc6f
Compare
|
/ocabot merge nobump |
|
This PR looks fantastic, let's merge it! |
|
Congratulations, your PR was merged at ff0d4f1. Thanks a lot for contributing to OCA. ❤️ |
Depends on #669
Description
This module extends the functionality of reporting, to support creation
of extra custom reports.
It allows user to write a custom SQL request. (Generally, admin users)
Once written, a new model is generated, and user can map the selected field
with odoo fields.
Then user ends the process, creating new menu, action and graph view.
Technically, the module create SQL View (or materialized view, if option is
checked). Materialized view duplicates datas, but request are fastest. If
materialized view is enabled, this module will create a cron task to refresh
the data).
By default, users member of 'SQL Request / User' can see all the views.
You can specify extra groups that have the right to access to a specific view.
Warning
This module is intended for technician people in a company and for Odoo integrators.
It requires the user to know SQL syntax and Odoo models.
If you don't have such skills, do not try to use this module specially on a production
environment.
Use Cases
this module is interesting for the following use cases
You want to realize technical SQL requests, that Odoo framework doesn't allow
(For exemple, UNION with many SELECT) A typical use case is if you want to have
Sale Orders and PoS Orders datas in a same table
You want to customize an Odoo report, removing some useless fields and adding
some custom ones. In that case, you can simply select the fields of the original
report (sale.report model for exemple), and add your custom fields
You have a lot of data, and classical SQL Views have very bad performance.
In that case, MATERIALIZED VIEW will be a good solution to reduce display duration
configure
Go to Dashboard / Configuration / SQL Views
tip your SQL request
Optionnaly, you can add a domain.
A tipical domain in a multi company context is to write
['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]to make reporting depending on the current companies of the user.
Click on the button 'Validate SQL Expression'
Once the sql request checked, the module analyses the column of the view,
and propose field mapping. For each field, you can decide to create an index
and set if it will be displayed on the pivot graph as a column, a row or a
measure.
Click on the button 'Create SQL elements'. (this step could
take a while, if view is materialized)
If it's a MATERIALIZED view:
the view. You can so define the frequency of the refresh.
search view.