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

[12.0][MIG] report_qweb_element_page_visibility #289

Merged

Conversation

Saran440
Copy link
Member

@Saran440 Saran440 commented May 24, 2019

  • [BUG] : not support when print document more than 1

@oca-clabot
Copy link

Hey @Saran440, thank you for your Pull Request.

It looks like some users haven't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here: http://odoo-community.org/page/cla
Here is a list of the users:

Appreciation of efforts,
OCA CLAbot

@pedrobaeza pedrobaeza added this to the 12.0 milestone May 24, 2019
@OCA-git-bot OCA-git-bot mentioned this pull request May 24, 2019
16 tasks
@cvinh
Copy link

cvinh commented Oct 28, 2019

👍 We use it in production

Copy link

@CasVissers-360ERP CasVissers-360ERP left a comment

Choose a reason for hiding this comment

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

LGTM (functional)

@ioans73
Copy link
Member

ioans73 commented Nov 27, 2019

We have detected a problem related to this issue #349. Can you give it a look?

@Saran440
Copy link
Member Author

@ioans73 yes, I found bug. But I don't know how to solve it.
In javascript it sum all page document.
var toPage = document.getElementsByClassName('topage');
Do you have any ideas to suggest?

@ioans73
Copy link
Member

ioans73 commented Nov 29, 2019

Hi, @Saran440 I've been testing and found the solution.
I tried to PR your fork but I couldn't. Here is the commit can you check if also works for you?

@Saran440
Copy link
Member Author

Saran440 commented Dec 1, 2019

@ioans73 Not work. I test function last-page
print 1 document and many page but it show every page.

@ioans73
Copy link
Member

ioans73 commented Dec 2, 2019

Hi, we have tested several cases including printing a document with a few pages, using the class last-page in the footer and the footer only apeared in the last page, so it worked correctly for me. Can you give me more info on how have you tested it? In which tag/element have you used the class?

@Saran440
Copy link
Member Author

Saran440 commented Dec 2, 2019

My code is :

<div class="article">
   <-------body------->
</div>
<div class="footer">
      <div class="row pt80">
                <------------last-page left footer----------->
                <div class="col-8 last-page text-center">
                    (<span t-esc="o.amount_text(o.amount_total)"/>)
                </div>
                <------------last-page right footer----------->
                <div class="col-4 last-page text-right">
                    <span t-field="o.amount_total"/>
                </div>
     </div>
</div>

Result 1 document but it's show every page:
Selection_002

@kongrattapong
Copy link
Contributor

@Saran440 I'm test @ioans73 commit and it's working.

@ioans73
Copy link
Member

ioans73 commented Dec 2, 2019

I test your structure and works correctly:

Result:

qweb_page_visibility_1

qweb_page_visibility_2

@Saran440
Copy link
Member Author

Saran440 commented Dec 3, 2019

@ioans73 @kongrattapong
I'm sorry, my typo that vars.sitepage === vars.sitepage but I fixed, it's work.
Thank you for your help

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@ioans73
Copy link
Member

ioans73 commented Dec 3, 2019

Hi, @Saran440

I notice you copy/paste the patch I made, whould be better if you cherry-pick my commit isn't it?
And also your error would have been avoided.

@Saran440 Saran440 force-pushed the 12.0-mig-report_qweb_element_page_visibility branch 4 times, most recently from 971a811 to c32f7a4 Compare December 3, 2019 09:07
@Saran440 Saran440 force-pushed the 12.0-mig-report_qweb_element_page_visibility branch from c32f7a4 to c2e7352 Compare December 3, 2019 09:08
@Saran440 Saran440 force-pushed the 12.0-mig-report_qweb_element_page_visibility branch from b4d74c8 to a03195e Compare December 3, 2019 09:36
@Saran440
Copy link
Member Author

Saran440 commented Dec 3, 2019

@ioans73 yes, it's good idea and I fixed it. Thank you. 👍

@dreispt
Copy link
Sponsor Member

dreispt commented Feb 20, 2020

/ocabot merge

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 12.0-ocabot-merge-pr-289-by-dreispt-bump-no, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit f429df6 into OCA:12.0 Feb 21, 2020
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 51ae748. Thanks a lot for contributing to OCA. ❤️

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.

None yet

10 participants