Skip to content

Conversation

@GoodERPJeff
Copy link

No description provided.

sebalix and others added 30 commits October 13, 2018 14:21
…itlog.log' model (standard 'create_date' field is used instead)
…ail data - if any - are migrated during the installation)
… 'field_description' fields changed into related fields
@GoodERPJeff GoodERPJeff mentioned this pull request Oct 14, 2018
32 tasks
@elicoidal elicoidal added this to the 12.0 milestone Oct 14, 2018
Copy link

@elicoidal elicoidal left a 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")

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

Copy link
Author

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>

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

Copy link
Author

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.

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',
],

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

Copy link
Author

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 :)

@elicoidal
Copy link

You can try to improve test coverage based on the codecov report

@GoodERPJeff
Copy link
Author

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.

@elicoidal
Copy link

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.
If unclear ask but in principle just common sense will do just fine
@GoodERPJeff

Copy link
Member

@chienandalu chienandalu left a 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?

Copy link
Contributor

@sebalix sebalix left a 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"/>
Copy link
Contributor

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
Copy link
Contributor

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 😄

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

@sebalix
Copy link
Contributor

sebalix commented Nov 30, 2018

@GoodERPJeff About the bug when logging read calls, it's here since a long time (Odoo 8.0), don't bother with this in this PR, having the module migrated is enough at first.

Copy link
Member

@chienandalu chienandalu left a 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.

Copy link

@alexey-pelykh alexey-pelykh left a 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"/>-->

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"/>-->

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>

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>

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

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

@BT-fgarbely
Copy link

Hello @GoodERPJeff

What is the current state of this auditlog migration?
I need this module in v12 too. It would be great if you could make it mergeable.

Thanks in advance.

@EvgeniyERP
Copy link

Hello @GoodERPJeff

What is the current state of this auditlog migration?
I need this module in v12 too. It would be great if you could make it mergeable.

Thanks in advance.

Same question from me :)
Is there any ETA: when the module will be available for v12?
Waiting for it with passion. Ready to run some tests on our system (Odoo Enterprise on Premise, v12).

@pedrobaeza
Copy link
Member

@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
Copy link
Member

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.

Copy link
Contributor

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:
Copy link
Member

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(
Copy link
Member

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.

@murtuzasaleh
Copy link
Member

@GoodERPJeff If possible can you please make fields readonly after do Subscribe in auditlog.rule because when we change model after Subscribe it will create a previous model log and current model log.
Settings << Technical << Audit << Rules

@pedrobaeza
Copy link
Member

Superseeded by #1556

@pedrobaeza pedrobaeza closed this Apr 9, 2019
SiesslPhillip pushed a commit to grueneerde/OCA-server-tools that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/server-tools (10.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.