Skip to content
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

[9.0][ADD] Migrated business_requirement_deliverable_report module from v8 to v9 #31

Conversation

sudhir-serpentcs
Copy link
Contributor

@sudhir-serpentcs sudhir-serpentcs commented Sep 30, 2016

WIP until #25 and #26 is merged

Migrated business_requirement_deliverable_report module from v8 to v9.
@dreispt @pedrobaeza @jbeficent @moylop260 Please review.

@elicoidal
Copy link
Contributor

👍 (waiting for #25 to be merged)

Introduction
============

This module is part of a set of modules (`Business Requirements <https://github.com/OCA/business-requirement/blob/8.0/README.md>`_)
Copy link
Contributor

Choose a reason for hiding this comment

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

9.0

'report/report.xml',
],
'image': [
'static/img/bus_req_report1.png',
Copy link
Contributor

Choose a reason for hiding this comment

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

add the icon

@elicoidal elicoidal mentioned this pull request Sep 30, 2016
8 tasks
elicoidal and others added 6 commits September 30, 2016 18:32
Add Test Case in printable report (as it is in V8)
Update report_business_requirement.xml
…o 9.0-migrate_business_requirement_deliverable_report
@sudhir-serpentcs
Copy link
Contributor Author

Rebased the PR.
@dreispt @pedrobaeza @jbeficent @moylop260 @elicoidal

@elicoidal
Copy link
Contributor

@sudhir-serpentcs tested functionally. 3 small details for improvements in the 3 reports:

  • when saving the name should be "BR000001-test.pdf" (name+"-"+description)
  • there is a big gap between the header and the start of the page ("Business Requirement Document" text). Not sure this is not due to standard Odoo header spacing. Please confirm whether you can improve or not (simple spacing is enough)
  • The spacing between "Business Requirement Document" and "BR000001-test" is too big. "BR000001-test" should be centered below "Business Requirement Document"
    (check example in Runbot)

@sudhir-serpentcs
Copy link
Contributor Author

sudhir-serpentcs commented Feb 10, 2017

@elicoidal Thanks for you feedback. I will do the needful.
I guess there is not functionality of having dynamic report name (based on the value of the fields).

when saving the name should be "BR000001-test.pdf" (name+"-"+description)

Do you mean by report name or attachment name of the report?

@elicoidal
Copy link
Contributor

@sudhir-serpentcs I mean attachment name of the report, thanks for pointing out

@sudhir-serpentcs
Copy link
Contributor Author

@elicoidal Added file attachment option and its name for the generated reports.

Copy link
Contributor

@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.

Not sure what was done but runbot says it is not working ;).
My downloaded attachments have respectively the names:

  • "Business Requirement Report.pdf",
  • "Business Requirement Deliverable Report.pdf" and
  • "Business Requirement Deliverable Resource Report.pdf"

Did I miss something?

Besides following issues are not yet attended (you plan them for later?):

  • there is a big gap between the header and the start of the page ("Business Requirement Document" text). Not sure this is not due to standard Odoo header spacing. Please confirm whether you can improve or not (simple spacing is enough)
  • The spacing between "Business Requirement Document" and "BR000001-test" is too big. "BR000001-test" should be centered below "Business Requirement Document"
    (check example in Runbot)

name="business_requirement_deliverable_report.br_report"
file="business_requirement_deliverable_report.br_report"
attachment_use="True"
attachment="((object.name+object.description)+'.pdf')"
Copy link
Contributor

Choose a reason for hiding this comment

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

following the logic below: "'BR- '+((object.name+object.description)+'.pdf')"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@elicoidal Done

@elicoidal
Copy link
Contributor

@sudhir-serpentcs Any news on this front?

@elicoidal elicoidal changed the title [ADD] Migrated business_requirement_deliverable_report module from v8 to v9 [9.0][ADD] Migrated business_requirement_deliverable_report module from v8 to v9 Feb 25, 2017
@elicoidal elicoidal added this to the 9.0 milestone Feb 25, 2017
@sudhir-serpentcs sudhir-serpentcs force-pushed the 9.0-migrate_business_requirement_deliverable_report branch from 392e40f to 7a895e0 Compare February 27, 2017 10:17
@sudhir-serpentcs
Copy link
Contributor Author

  • there is a big gap between the header and the start of the page ("Business Requirement Document" text). Not sure this is not due to standard Odoo header spacing. Please confirm whether you can improve or not (simple spacing is enough)
  • The spacing between "Business Requirement Document" and "BR000001-test" is too big. "BR000001-test" should be centered below "Business Requirement Document"
    (check example in Runbot)

@elicoidal Done. Please review.

@elicoidal
Copy link
Contributor

@sudhir-serpentcs thanks for the update.

there is a big gap between the header and the start of the page ("Business Requirement Document" text). Not sure this is not due to standard Odoo header spacing. Please confirm whether you can improve or not (simple spacing is enough)

OK!

The spacing between "Business Requirement Document" and "BR000001-test" is too big. "BR000001-test" should be centered below "Business Requirement Document"
(check example in Runbot)

You can reduce the space between "Business Requirement Document" and "BR000001-test" to half the current size.

My downloaded attachments have respectively the names:
"Business Requirement Report.pdf",
"Business Requirement Deliverable Report.pdf" and
"Business Requirement Deliverable Resource Report.pdf"

The naming of the files is still incorrect when you save them.

@elicoidal
Copy link
Contributor

@sudhir-serpentcs any feedback here?

@sudhir-serpentcs
Copy link
Contributor Author

sudhir-serpentcs commented Mar 8, 2017

 AFAIU we have only left the name of the report. right @sudhir-serpentcs ?

@elicoidal Thanks Eric. Please check my previous comment for having report name.

@elicoidal
Copy link
Contributor

@sudhir-serpentcs I saw your comment and agree. go ahead

@sudhir-serpentcs
Copy link
Contributor Author

sudhir-serpentcs commented Mar 9, 2017

@elicoidal Added code (controller) for the dynamic report name but you know we don't know how to make UT for controllers and that has reduced the codecov.
dyn_report_name

@elicoidal
Copy link
Contributor

@sudhir-serpentcs I think we can live with the decrease coverage for the moment.

@elicoidal
Copy link
Contributor

To be ported to v8 and v10

@dreispt
Copy link
Member

dreispt commented Mar 12, 2017

Do we really need to extend the Report generation controller?
That sound like bad practice, and adds tight coupling between two components that should be independent.

Do we really need to customize the output file name?
I feel that that is a different feature that should be implemented in an OCA/report module, that could then be leveraged here.

@elicoidal
Copy link
Contributor

@dreispt

That sound like bad practice, and adds tight coupling between two components that should be independent.

Not sure why this is bad practice. What I know is that when you have a project with dozens of BR, you want to have all of them properly identified and I currently spend manual time just to adapt that.
For me it is more the other way round: not having the filename properly generated at printing that looks like bad practice.
In short: if there are good reasons not to change the controller I will follow them. If there is a better way to centralize this feature then let's go for it: when it is ready when could remove the controller in this module.
What do you think?

@dreispt
Copy link
Member

dreispt commented Mar 12, 2017

@elicoidal The feature is good.
Having it implemented together in this module looks clumsy.
Tomorrow someone will have a similar need and will also overwrite the report controller when building some XYZ repo.

For me these are two distinct features.
The controller code should be isolated in it's own module.
This module here should only care to provide the report itself.
I believe that having both these modules installed will have the desired effect, even if they don't depend on each other.

@elicoidal
Copy link
Contributor

@sudhir-serpentcs
Can you split the controller part in a separate module business_requirement_deliverable_report_filenaming?
Once done we can merge this one.

@dreispt
Copy link
Member

dreispt commented Mar 13, 2017

@sudhir-serpentcs @elicoidal AFAICS the report file naming feature is universal and not specific to BRs. I think it should be proposed to https://github.com/OCA/reporting-engine.

@elicoidal
Copy link
Contributor

@sudhir-serpentcs @elicoidal AFAICS the report file naming feature is universal and not specific to BRs. I think it should be proposed to https://github.com/OCA/reporting-engine.

Fine by me: I have no clue about naming though (base_filename?)

@elicoidal
Copy link
Contributor

@sudhir-serpentcs when refactored (removed the controller part), please port this module to v8 and v10

@sudhir-serpentcs
Copy link
Contributor Author

@elicoidal Ok I will separate the report file naming feature (controller) in a new module (report_base_filename). Should I propose the PR in https://github.com/OCA/reporting-engine repo?
We need dynamic reporting name module in v8-v9 only because v10 already have this feature in base report module.

@elicoidal
Copy link
Contributor

@sudhir-serpentcs go ahead

@sudhir-serpentcs
Copy link
Contributor Author

sudhir-serpentcs commented Mar 15, 2017

@elicoidal Removed the code to have dynamic report name. I will add the reference of the PR that will have dynamic report name feature.

@serpentcs-dev1
Copy link
Member

serpentcs-dev1 commented Mar 15, 2017

@sudhir-serpentcs @elicoidal

Please find the PR here OCA/reporting-engine#114 which will help to have the
dynamic feature name on report.

@elicoidal
Copy link
Contributor

@dreispt can we move forward and merge this PR?

Copy link
Member

@dreispt dreispt left a comment

Choose a reason for hiding this comment

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

Thanks for your patience!

@dreispt
Copy link
Member

dreispt commented Mar 16, 2017

PS: Reading the discussion at OCA/reporting-engine#114, I'm now sure that doing the separation was the right thing to do.

@dreispt dreispt merged commit 81f2b77 into OCA:9.0 Mar 16, 2017
@sudhir-serpentcs sudhir-serpentcs deleted the 9.0-migrate_business_requirement_deliverable_report branch March 16, 2017 09:55
@elicoidal
Copy link
Contributor

@dreispt indeed thanks for your help :)

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.

5 participants