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

Migration of base_report_to_printer #12

Merged
merged 26 commits into from Nov 19, 2014

Conversation

guewen
Copy link
Member

@guewen guewen commented Nov 14, 2014

Migration of base_report_to_printer

  • Migration to the new API
  • Compatible with the new reports (report module, but only the pdf ones, not implemented for html reports, I don't think that's useful)
  • Compatible with deprecated reports (rml, webkit, ...)
  • Removed the Lock() local to the process and replaced it by a database lock so the processes share the same lock and last update timestamp
  • Refreshment of the views

@guewen guewen force-pushed the 8.0-base_report_to_printer-migr branch 2 times, most recently from a462b59 to 43640a1 Compare November 17, 2014 12:13
@guewen guewen force-pushed the 8.0-base_report_to_printer-migr branch from 43640a1 to b7e1303 Compare November 17, 2014 12:15
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling b7e1303 on guewen:8.0-base_report_to_printer-migr into 8c1362e on OCA:8.0.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling b7e1303 on guewen:8.0-base_report_to_printer-migr into 8c1362e on OCA:8.0.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling b7e1303 on guewen:8.0-base_report_to_printer-migr into 8c1362e on OCA:8.0.

}

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
printing_action = fields.Selection(_user_available_action_types)
Copy link
Member

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 ?

Copy link
Member Author

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

Copy link
Member

Choose a reason for hiding this comment

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

ok

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling e8536d4 on guewen:8.0-base_report_to_printer-migr into 8c1362e on OCA:8.0.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling fa77924 on guewen:8.0-base_report_to_printer-migr into 8c1362e on OCA:8.0.

@guewen
Copy link
Member Author

guewen commented Nov 17, 2014

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.
@guewen guewen force-pushed the 8.0-base_report_to_printer-migr branch from f659a39 to 5805a6f Compare November 17, 2014 15:09
@guewen
Copy link
Member Author

guewen commented Nov 17, 2014

Done.

@yvaucher
Copy link
Member

There is an issue on install: Programming error: relation "printing_printer_polling" does not exist

@guewen guewen force-pushed the 8.0-base_report_to_printer-migr branch 2 times, most recently from ba4f670 to d46d9b7 Compare November 18, 2014 09:32
@guewen guewen force-pushed the 8.0-base_report_to_printer-migr branch from d46d9b7 to 2cc8ae8 Compare November 18, 2014 10:12
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 2cc8ae8 on guewen:8.0-base_report_to_printer-migr into 8c1362e on OCA:8.0.

@guewen
Copy link
Member Author

guewen commented Nov 18, 2014

WTF

@yvaucher I fixed it

@yvaucher
Copy link
Member

👍

@guewen
Copy link
Member Author

guewen commented Nov 18, 2014

but my last commit is bad

method returns a fresh value after creation of the table
@guewen
Copy link
Member Author

guewen commented Nov 18, 2014

Pushed the fix.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling de1360f on guewen:8.0-base_report_to_printer-migr into 8c1362e on OCA:8.0.

@pedrobaeza
Copy link
Member

👍

Thanks for the conversion to new API.

pedrobaeza added a commit that referenced this pull request Nov 19, 2014
@pedrobaeza pedrobaeza merged commit 31c61a8 into OCA:8.0 Nov 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants