report-print-send icon indicating copy to clipboard operation
report-print-send copied to clipboard

[17.0][IMP] base_report_to_printer : add output_tray

Open ecino opened this issue 1 year ago • 17 comments

This pull request refactors the printer tray handling in the base_report_to_printer module to support separate input and output trays, improving flexibility.

Model and Field Refactoring

  • Split the generic printing.tray model into two distinct models: printing.tray.input and printing.tray.output, and updated all related fields in ir.actions.report, printing.printer, printing.report.xml.action, and res.users to use these new models for input and output trays.
  • Updated onchange and default behaviour methods to reset and return values for both input and output trays, ensuring correct handling when printer or tray selections change.

Printer Synchronization and Options

  • Modified the printer update logic to separately synchronize input and output trays from CUPS, and added new methods for setting printer options for both tray types.

Security and Access Control

  • Updated security rules to grant appropriate access to the new input and output tray models, including separate permissions for users and managers.

Tests and Backwards Compatibility

  • Refactored tests to use the new input/output tray fields and models, ensuring all behaviour checks are updated and remain valid.

Miscellaneous

  • Updated the module version to 17.0.1.1.2 to reflect these changes.

ecino avatar Sep 17 '24 14:09 ecino

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

github-actions[bot] avatar Mar 30 '25 12:03 github-actions[bot]

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

github-actions[bot] avatar Aug 10 '25 12:08 github-actions[bot]

Hello, here is a nice addition ready for review!

ecino avatar Sep 18 '25 14:09 ecino

@chienandalu @pedrobaeza Maybe you would like to give a review?

ecino avatar Sep 25 '25 09:09 ecino

These are deep changes that require migration scripts to adapt existing models and fields.

pedrobaeza avatar Sep 25 '25 11:09 pedrobaeza

@pedrobaeza Added migration scripts.

ecino avatar Sep 25 '25 12:09 ecino

Hi @sergio-teruel,

Just a friendly ping on this PR when you get a chance. Let me know if you have any questions or need more context!

Thanks!

ecino avatar Oct 08 '25 09:10 ecino

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). 🤖

OCA-git-bot avatar Oct 30 '25 20:10 OCA-git-bot

/ocabot merge minor

pedrobaeza avatar Oct 31 '25 07:10 pedrobaeza

What a great day to merge this nice PR. Let's do it! Prepared branch 17.0-ocabot-merge-pr-365-by-pedrobaeza-bump-minor, awaiting test results.

OCA-git-bot avatar Oct 31 '25 07:10 OCA-git-bot

@pedrobaeza your merge command was aborted due to failed check(s), which you can inspect on this commit of 17.0-ocabot-merge-pr-365-by-pedrobaeza-bump-minor.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

OCA-git-bot avatar Oct 31 '25 07:10 OCA-git-bot

@pedrobaeza There is a test failure in module printer_zpl2 that I didn't see previously, is it something coming from my changes I need to fix or not related? Let me know if you are expecting something from me.

ecino avatar Nov 03 '25 07:11 ecino

Well, I can't merge it being red, so I can't go any further.

pedrobaeza avatar Nov 03 '25 07:11 pedrobaeza

@pedrobaeza My branch doesn't produce this error. I don't know how to resolve the issue.

ecino avatar Nov 03 '25 13:11 ecino

It seems to be intermittent. Let's try again:

/ocabot merge minor

pedrobaeza avatar Nov 03 '25 14:11 pedrobaeza

On my way to merge this fine PR! Prepared branch 17.0-ocabot-merge-pr-365-by-pedrobaeza-bump-minor, awaiting test results.

OCA-git-bot avatar Nov 03 '25 14:11 OCA-git-bot

@pedrobaeza your merge command was aborted due to failed check(s), which you can inspect on this commit of 17.0-ocabot-merge-pr-365-by-pedrobaeza-bump-minor.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

OCA-git-bot avatar Nov 03 '25 14:11 OCA-git-bot