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
Migration of base_report_to_printer #12
Conversation
a462b59
to
43640a1
Compare
Replace it by a database lock so the different processes are all aware of the lock and the last update timestamp.
43640a1
to
b7e1303
Compare
1 similar comment
} | ||
|
||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
printing_action = fields.Selection(_user_available_action_types) |
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.
Field string 'Printing Action' was removed intentionally ?
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.
Yes.
As advised in https://www.odoo.com/documentation/8.0/reference/orm.html in Porting from the old API:
if a field’s string is the titlecased version of the field name:
name = fields.Char(string="Name")
it is useless and should be removed
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.
ok
I will make a few changes (extract a method at least) to reduce the code in printer_tray. |
See odoo/odoo#3644 Also, it helps to have the value set/read in context close to each other.
printers needs to be refreshed. Keep the last update datetime in cache and invalidate this datetime if is is older than POLL_INTERVAL. Thus, one process won't hit the DB more than 1 time every POLL_INTERVAL (10 seconds currently) to check if it needs to update the list.
f659a39
to
5805a6f
Compare
eae5341
to
caa9edb
Compare
Done. |
There is an issue on install: Programming error: relation "printing_printer_polling" does not exist |
ba4f670
to
d46d9b7
Compare
d46d9b7
to
2cc8ae8
Compare
@yvaucher I fixed it |
👍 |
but my last commit is bad |
method returns a fresh value after creation of the table
Pushed the fix. |
👍 Thanks for the conversion to new API. |
Migration of base_report_to_printer
Migration of base_report_to_printer
report
module, but only thepdf
ones, not implemented forhtml
reports, I don't think that's useful)Lock()
local to the process and replaced it by a database lock so the processes share the same lock and last update timestamp