-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
12.0 mig auditlog #1392
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
12.0 mig auditlog #1392
Conversation
… ones to make overridding easier
…itlog.log' model (standard 'create_date' field is used instead)
…S.txt file removed
…ail data - if any - are migrated during the installation)
… a field is deleted (e.g. migration)
… 'field_description' fields changed into related fields
elicoidal
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.
LGTM
Some remarks based on new standard (most of them nice to have).
no technical review
| 'ir.model.fields', ondelete='cascade', string="Field", required=True) | ||
| log_id = fields.Many2one( | ||
| 'auditlog.log', string="Log", ondelete='cascade', index=True) | ||
| old_value = fields.Text("Old Value") |
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.
technically no need for string anymore if the name is same as column name
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.
I don't think this is good practic
| @@ -0,0 +1,201 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <odoo> | |||
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.
add copyright in all XML files
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.
can you give me some example to add copyright in XML?
I never see MIS builder nor module_auto_update get this lines.
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's a bit opinionated, some add, some don't. Usually it's the same as in code files, just inside <!-- -->. I'm pro-copyright in XML - it's still sort-of code and licensed thing
| 'views/auditlog_view.xml', | ||
| 'views/http_session_view.xml', | ||
| 'views/http_request_view.xml', | ||
| ], |
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.
add image key as cover to improve the visibility in the apps store
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.
have to leave it to next PR, I am not good at icon design :)
|
You can try to improve test coverage based on the codecov report |
|
actrually we found some issue on this module, about read audit. what I concern is should we finish all the tasks(migration, bugfix, coverage) for a module in same PR or focus on migration first then do other parts. I totally agree test coverage is very important. will try our best to catch up. |
|
It will depend and is a bit up to you. First PR could be the mandatory part and a second one for additional functions or improvements but sometimes it can make sense (or more simple) to do it at once. |
chienandalu
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.
@GoodERPJeff What's the state of this PR?
sebalix
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.
Minor comment/suggestion, but the commit e04431b should be removed, I don't know why it's there actually.
| <menuitem id="menu_action_auditlog_rule_tree" parent="menu_audit" action="action_auditlog_rule_tree"/> | ||
| <menuitem id="menu_action_auditlog_rule_tree" | ||
| parent="menu_audit" | ||
| action="action_auditlog_rule_tree"/> |
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.
Is there a lint error about this? If not, we must try to avoid change to make commits backport easier.
| @@ -1,4 +1,4 @@ | |||
| .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | |||
| .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | |||
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.
Would you use the new README structure? https://github.com/OCA/maintainer-tools/tree/master/template/module
It would be wonderful 😄
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.
@GoodERPJeff it would be great to have this split as mentioned above
|
@GoodERPJeff About the bug when logging |
chienandalu
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.
Overall looks ok (waiting for runbot to test) but the commit history is really messed up. Please fix it to keep a clean history.
alexey-pelykh
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.
Please enhance tests coverage
| <tree> | ||
| <field name="field_description"/> | ||
| <field name="field_name"/> | ||
| <!--<field name="old_value"/>--> |
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.
This comment is not needed
| <field name="field_name"/> | ||
| <!--<field name="old_value"/>--> | ||
| <field name="old_value_text"/> | ||
| <!--<field name="new_value"/>--> |
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.
Also not needed
| @@ -0,0 +1,201 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <odoo> | |||
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's a bit opinionated, some add, some don't. Usually it's the same as in code files, just inside <!-- -->. I'm pro-copyright in XML - it's still sort-of code and licensed thing
| @@ -0,0 +1,47 @@ | |||
| # © 2016 ABF OSIELL <https://osiell.com> | |||
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.
Copyrights should be reformatted as
# Copyright <YEAR(S)> <AUTHOR(S)>
| @@ -1,4 +1,4 @@ | |||
| .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | |||
| .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | |||
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.
@GoodERPJeff it would be great to have this split as mentioned above
|
Hello @GoodERPJeff What is the current state of this auditlog migration? Thanks in advance. |
Same question from me :) |
|
@EvgeniyERP you can put this PR in your system, try, and provide feedback. This is the main goal of a PR: being tested by reviewers. |
| If no HTTP user session is available, returns `False`. | ||
| """ | ||
| if not request: | ||
| return False |
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.
@GoodERPJeff Remove if not request condition and use if request condition, if not request it will return False as per method.
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.
@murtuzasaleh don't if it's worth to change this existing code, it is also to avoid an indentation level.
| first call. | ||
| If no HTTP request is available, returns `False`. | ||
| """ | ||
| if not request: |
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.
Same as above comment.
| "updated, but it is slower)\n" | ||
| "Fast log: only log the changes made through the create and " | ||
| "write operations (less information, but it is faster)")) | ||
| # log_action = fields.Boolean( |
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.
Please remove it if it is not used.
|
@GoodERPJeff If possible can you please make fields readonly after do |
|
Superseeded by #1556 |
Syncing from upstream OCA/server-tools (10.0)
No description provided.