Skip to content

[MIG] Migrate module attachment_base_synchronize to v10#763

Merged
lasley merged 1 commit into
OCA:10.0from
akretion:10-mig-attachment_base_synchronize
Jul 7, 2017
Merged

[MIG] Migrate module attachment_base_synchronize to v10#763
lasley merged 1 commit into
OCA:10.0from
akretion:10-mig-attachment_base_synchronize

Conversation

@florian-dacosta
Copy link
Copy Markdown
Contributor

The tests fail because of : #762

If I play only the test of this module, it is all ok, but if I play base_kanban_stage tests together, it fails.
Indeed, because of base_kanban_stage's tests, the cursor is already in test_mode.

@florian-dacosta florian-dacosta force-pushed the 10-mig-attachment_base_synchronize branch from 950915e to eddca74 Compare March 8, 2017 15:08
@lasley lasley added this to the 10.0 milestone Apr 19, 2017
Copy link
Copy Markdown
Contributor

@lasley lasley left a comment

Choose a reason for hiding this comment

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

Minor comments, otherwise LGTM

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<odoo>
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.

odoo noupdate="1" & can remove data tag

@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<openerp>
<odoo>
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.

odoo noupdate="1" & can remove data tag

@florian-dacosta florian-dacosta force-pushed the 10-mig-attachment_base_synchronize branch from eddca74 to 090b3e7 Compare April 25, 2017 10:44
@florian-dacosta
Copy link
Copy Markdown
Contributor Author

Thanks for the review @lasley
I've updated the PR

Copy link
Copy Markdown
Contributor

@lasley lasley left a comment

Choose a reason for hiding this comment

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

@florian-dacosta florian-dacosta mentioned this pull request Jun 8, 2017
63 tasks
if domain is None:
domain = []
domain.append(('state', '=', 'pending'))
domain = [('state', '=', 'pending')]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Did you really want to change the behaviour here ?
The ('state', '=', 'pending') tuple is now only added in the domain when the domain was None, instead of being always added like before.

A unit test calling this method with a domain in arguments would be fine.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That is wanted indeed.
The normal way is to just run the attachment at pending state, so the cron does not need any argument. But one can make a cron only with attachment at 'failed' state for instance.
So the idea is that we can ignore the generic domain ('state', '=', 'pending') for more flexibility.

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 agree with @florian-dacosta on this one. An alternative to changing the behavior is to use a context override to stop the hard coded domain, but IMO explicitly adding is better than explicitly removing.

@cmsalmeida
Copy link
Copy Markdown

When will this be accepted?
Any prediction?

@Garamotte
Copy link
Copy Markdown

This will be accepted when there are enough approves.
You can review it, test it, and approve if you find it good, or comment to ask for explanationsor changes if you find something wrong.

=====

Go the menu Settings > Attachments
Go the menu Settings > Technical > Database Structure > Meta Data Attachments
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_attachment_metadata_user,ir.attachment.metadata.user,model_ir_attachment_metadata,base.group_user,1,0,0,0
access_attachment_metadata_user,ir.attachment.metadata.user,model_ir_attachment_metadata,,1,0,0,0
access_attachment_metadata_user,ir.attachment.metadata.user,model_ir_attachment_metadata,base.group_no_one,1,1,1,1
Copy link
Copy Markdown

@cmsalmeida cmsalmeida Jun 14, 2017

Choose a reason for hiding this comment

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

They have same key, I've fixed that in #856 because it needed to pass tests.

Copy link
Copy Markdown
Contributor

@lasley lasley Jul 5, 2017

Choose a reason for hiding this comment

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

What is the change you are recommending that @florian-dacosta perform here?

Edit: (sorry for the accidental ping @sylvain-garancher)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@lasley There is a mistake because 2 security rules have the same id. @cmsalmeida fixed it in the PR of external_file_location migration. I guess it is enought, as for now external_file_location is the only module depending on this one.

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.

Thanks for the elaboration @florian-dacosta. Works for me too!

Copy link
Copy Markdown

@cmsalmeida cmsalmeida left a comment

Choose a reason for hiding this comment

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

It's running well.
Tested together with external_file_localtion in #856
👍

@paulius-sladkevicius
Copy link
Copy Markdown

Took the same path like @cmsalmeida 👍

@lasley
Copy link
Copy Markdown
Contributor

lasley commented Jul 5, 2017

@sylvain-garancher - have your comments been attended to?

Copy link
Copy Markdown

@Garamotte Garamotte left a comment

Choose a reason for hiding this comment

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

Yes 👍

@lasley lasley merged commit 08e0524 into OCA:10.0 Jul 7, 2017
SiesslPhillip pushed a commit to grueneerde/OCA-server-tools that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/server-tools (9.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.

5 participants