-
-
Notifications
You must be signed in to change notification settings - Fork 305
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
[MIG][11.0] Migrate base_report_to_printer #109
[MIG][11.0] Migrate base_report_to_printer #109
Conversation
…t: because if an exception occurs, a postgresql transaction will be leaked. The except clause should properly rollback the cr
…thing else than None which is forbidden
replaced by isinstance(printer, basestring)
… activated when their migration is done.
…nd orm.TransientModel instead of osv aliases
…nstead of a report id makes more sens
…f printer browse record
… in behavior for printer
@sylvain-garancher et al, lets work to get this done. If you are busy I can take over. I think its nearly there. |
Yes, sorry, I'm very busy at the moment... |
@sylvain-garancher I missed this, anyway I was just doing something else and I noticed they refactored the web client post release, so the js is going to need to change now anyway as there is no more web.Model |
@lasley Can I ask you for a quick bit of help please. In this module we had a javascript call to select the action, either print or send to client. With changes to the web client it is no longer valid and I can't work out how it needs to be changed to still work. Do you know how to call a models method in 11.0 web client? |
@gdgellatly - Sure, can you point me to the old code we're trying to replace? |
|
||
if ('report_type' in action_val && action_val.report_type === 'qweb-pdf') { | ||
framework.blockUI(); | ||
new Model('ir.actions.report'). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gdgellatly Is this what we're replacing?
@lasley Yes, web.Model no longer exists, I tried a straight swap with Basic and Abstract but no dice. The call method fails so I'm guessing its a bit more complicated than that. When I debug it, I see that the args are being passed as the main arguments, instead of the method and method args. |
@gdgellatly - sweet thanks for the elaboration. And when you say you used the basic and abstract, you're referring to From what I understand, the models just allow for the basic CRUD operations. You've honestly got me if there is a new entrypoint for any method call, but I think an easy solution here would just be to use RPC directly instead:
|
@lasley Thanks. Yes its quite different now and completely undocumented and I never really understood the last one, so not having fun. I'm going with what you did. That was very close to my hackish attempts. |
If I understand correctly, things would be different if we actually had a record to attach to. I haven't actually tried it, but I feel like you can |
I close this PR to avoid splitting the conversations :) |
Migration of printer_tray to v11 and integration with base_report_to_printer
Migration of printer_tray to v11 and integration with base_report_to_printer
Migration of printer_tray to v11 and integration with base_report_to_printer
Migration of printer_tray to v11 and integration with base_report_to_printer
Migration of printer_tray to v11 and integration with base_report_to_printer
Migration of printer_tray to v11 and integration with base_report_to_printer
Migration of printer_tray to v11 and integration with base_report_to_printer
Migration of printer_tray to v11 and integration with base_report_to_printer
Migration of printer_tray to v11 and integration with base_report_to_printer
Migration of printer_tray to v11 and integration with base_report_to_printer
Migration of printer_tray to v11 and integration with base_report_to_printer
Migration of printer_tray to v11 and integration with base_report_to_printer
Migration of printer_tray to v11 and integration with base_report_to_printer
Migration of printer_tray to v11 and integration with base_report_to_printer
Migration of printer_tray to v11 and integration with base_report_to_printer
Migration of printer_tray to v11 and integration with base_report_to_printer
Migration of the
base_report_to_printer
module to v11.0 (currently tested on master as the 11.0 branch has not already been created on Odoo's repo).