Guewen Baconnier
b015085e63
Invalidate the cache when the table is created so the table_exists()
...
method returns a fresh value after creation of the table
2017-10-03 18:13:03 +02:00
Guewen Baconnier
262a5db1e8
Error on installation of the module
2017-10-03 18:13:02 +02:00
Guewen Baconnier
916d974add
Extract a method so it will be easier to override in printer_tray
2017-10-03 18:13:02 +02:00
Guewen Baconnier
9df607093d
Refresh the list of printers every 15 seconds instead of 10
2017-10-03 18:13:01 +02:00
Guewen Baconnier
ebe52ef481
Avoid to hits the database too many times to check if the list of
...
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.
2017-10-03 18:13:01 +02:00
Guewen Baconnier
7ac2564668
Move the 'skip_update' right in the browse, it prevents a loop
...
See https://github.com/odoo/odoo/issues/3644
Also, it helps to have the value set/read in context close to each
other.
2017-10-03 18:13:01 +02:00
Guewen Baconnier
39bd5e94e4
We need the report in print_document and print options (needed in
...
printer_tray)
2017-10-03 18:13:00 +02:00
Guewen Baconnier
ad5e8b6e46
missing api decorator
2017-10-03 18:13:00 +02:00
Guewen Baconnier
975afd7c72
Update translations, add a string to URI so it is uppercased
2017-10-03 18:12:59 +02:00
Guewen Baconnier
9c4ea8c10c
Implements the print on the new 'report' model
2017-10-03 18:12:58 +02:00
Guewen Baconnier
87ae352f5a
browse is called often enough to call the update routine (even too much)
2017-10-03 18:12:57 +02:00
Guewen Baconnier
8a80de3ced
Remove the Lock because it is useless on multiprocess
...
Replace it by a database lock so the different processes are
all aware of the lock and the last update timestamp.
2017-10-03 18:12:57 +02:00
Guewen Baconnier
fbe8630323
Recursion when calling a method with old-style api signature from browse
2017-10-03 18:12:56 +02:00
Guewen Baconnier
ce0876ef9f
Migrate printing.py to new API
2017-10-03 18:12:54 +02:00
Guewen Baconnier
0f7bb5f8d6
Move base_report_to_printer to root from __unported__
2017-10-03 18:12:52 +02:00
Yannick Vaucher
e49f662403
move modules in __unported__ for 8.0
2017-10-03 18:12:52 +02:00
Lionel Sausin
7b226117d4
[FIX] the button 'set default' on printers did not work because the field was 'required' - this is deprecated on booleans in v7
2017-10-03 18:12:49 +02:00
Joel Grand-Guillaume
9f2c1df8b9
[FIX] Use explicit kwargs: context=context
2017-10-03 18:12:48 +02:00
Yannick Vaucher
2e4ebc8486
[IMP] base_report_to_printer - split code in multiple files
2017-10-03 18:05:18 +02:00
Yannick Vaucher
c51ba5de1f
[IMP] base_report_to_printer - remove osv.except_osv as it breaks the workflow and doesn't permits multiple report to be sent to the printer.
2017-10-03 18:05:18 +02:00
Yannick Vaucher
78ef3fd528
[FIX] base_report_to_printer - restore error message as osv + propagate options
2017-10-03 18:05:18 +02:00
Yannick Vaucher
448ceb3c1e
[FIX] base_report_to_printer - mistake in params of print_direct
2017-10-03 18:05:18 +02:00
Yannick Vaucher
a11af7292e
[IMP] base_report_to_printer - pass report id instead of report key
2017-10-03 18:05:18 +02:00
Yannick Vaucher
b00c963cd7
[TYPO]
2017-10-03 18:05:18 +02:00
Yannick Vaucher
d1f3bd5c76
[FIX] base_report_to_printer - missing class call
2017-10-03 18:05:17 +02:00
Yannick Vaucher
63874cbb96
[IMP] base_report_to_printer - return browse record instead of string in behavior for printer
2017-10-03 18:05:17 +02:00
Yannick Vaucher
3878a868a3
[IMP] base_report_to_printer - remove uselsee context set
2017-10-03 18:05:17 +02:00
Yannick Vaucher
ec028b35f4
[FIX] base_report_to_printer - using system_name of printer instead of printer browse record
2017-10-03 18:05:17 +02:00
Yannick Vaucher
60d01e0862
[IMP] base_report_to_printer - use an action id in an action method instead of a report id makes more sens
2017-10-03 18:05:17 +02:00
Yannick Vaucher
c7f1e0beb8
[IMP] base_report_to_printer - add report_id on print_direct
2017-10-03 18:05:16 +02:00
Yannick Vaucher
7d39b4d567
[IMP] base_report_to_printer - replace lpr by use of pycups
2017-10-03 18:05:16 +02:00
Yannick Vaucher
ab4afa3289
[TYPO]
2017-10-03 18:05:16 +02:00
Yannick Vaucher
0dc248dd7c
[IMP] base_report_to_printer - simplify calls on class
2017-10-03 18:05:16 +02:00
Yannick Vaucher
121865f311
[IMP] base_report_to_printer - remove class call
2017-10-03 18:05:16 +02:00
Yannick Vaucher
c336491c0e
[IMP] base_report_to_printer - clean imports
2017-10-03 18:05:16 +02:00
Yannick Vaucher
10b5678b67
[IMP] base_report_to_printer - remove class calls and use orm.Model and orm.TransientModel instead of osv aliases
2017-10-03 18:05:16 +02:00
Yannick Vaucher
bbe21426a7
[IMP] base_report_to_printer - retab and clean extra spaces
2017-10-03 18:05:16 +02:00
Andrew Schrafel
49d4e2e938
base_report_to_printer V7 upgrade
2017-10-03 18:05:15 +02:00
Lorenzo Battistini
76f97048cd
[FIX] isinstance(printer, (str,unicode)):
...
replaced by isinstance(printer, basestring)
2017-10-03 18:05:15 +02:00
Lorenzo Battistini
576fbe467e
[FIX] using logging
2017-10-03 18:05:15 +02:00
Lorenzo Battistini
5db700c439
[FIX] context=None
2017-10-03 18:05:15 +02:00
Lorenzo Battistini
64f8a7ff18
[fix] get_default return value
2017-10-03 18:05:14 +02:00
Lorenzo Battistini
b452b33b38
[FIX] print_direct return value
2017-10-03 18:05:14 +02:00
Lorenzo Battistini
6930c5cf6e
[FIX] update method is accessible from XML/RPC and should return something else than None which is forbidden
2017-10-03 18:05:14 +02:00
Lorenzo Battistini
ced1d0c13d
[FIX] We better have to use the "with" syntax
2017-10-03 18:05:14 +02:00
Lorenzo Battistini
4498bced20
[FIX] The close should be done in the finally: clause of a try: except: because if an exception occurs,
...
a postgresql transaction will be leaked.
The except clause should properly rollback the cr
2017-10-03 18:05:14 +02:00
Lorenzo Battistini
feae5dba24
[ADD] base_report_to_printer
2017-10-03 18:05:14 +02:00