Skip to content

[12.0][MIG] report_qweb_element_page_visibility - #289

Merged
OCA-git-bot merged 9 commits into
OCA:12.0from
Saran440:12.0-mig-report_qweb_element_page_visibility
Feb 21, 2020
Merged

OCA-git-bot merged 9 commits into
OCA:12.0from
Saran440:12.0-mig-report_qweb_element_page_visibility

Conversation

@Saran440

@Saran440 Saran440 commented May 24, 2019

Copy link
Copy Markdown
Member
  • [BUG] : not support when print document more than 1

@oca-clabot

Copy link
Copy Markdown

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

cvinh commented Oct 28, 2019

Copy link
Copy Markdown

👍 We use it in production

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM (functional)

@ioans73

ioans73 commented Nov 27, 2019

Copy link
Copy Markdown
Member

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

@Saran440

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

ioans73 commented Nov 29, 2019

Copy link
Copy Markdown
Member

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

Saran440 commented Dec 1, 2019

Copy link
Copy Markdown
Member Author

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

@ioans73

ioans73 commented Dec 2, 2019

Copy link
Copy Markdown
Member

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

Saran440 commented Dec 2, 2019

Copy link
Copy Markdown
Member Author

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

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

@ioans73

ioans73 commented Dec 2, 2019

Copy link
Copy Markdown
Member

I test your structure and works correctly:

Result:

qweb_page_visibility_1

qweb_page_visibility_2

@Saran440

Saran440 commented Dec 3, 2019

Copy link
Copy Markdown
Member Author

@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
Copy Markdown
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

ioans73 commented Dec 3, 2019

Copy link
Copy Markdown
Member

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

Saran440 commented Dec 3, 2019

Copy link
Copy Markdown
Member Author

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

@dreispt

dreispt commented Feb 20, 2020

Copy link
Copy Markdown
Member

/ocabot merge

@OCA-git-bot

Copy link
Copy Markdown
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
Copy Markdown
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.

10 participants