IRC logs of #tryton for Tuesday, 2013-04-09

chat.freenode.net #tryton log beginning Tue Apr 9 00:00:09 CEST 2013
2013-04-09 09:36 <plantian> Hey guys when printing opens open office instead of printing to printer is that a client side option or something I could configured from a wizard?
2013-04-09 10:38 <plantian> It seems that print and report keywords do the same thing.
2013-04-09 10:43 <cedk> plantian: direct print depends on the OS
2013-04-09 10:44 <plantian> cedk: Well I'm trying to set it up on Linux and Mac.
2013-04-09 10:44 <plantian> cedk: There used to be a way to configure the command line call that printed right?
2013-04-09 10:45 <cedk> plantian: it doesn't work on linux nor MacOS because they don't have a API for it
2013-04-09 10:46 <cedk> plantian: yes but it was removed in favor of xdg-open for linux and /usr/bin/open for MacOS
2013-04-09 10:47 <plantian> cedk: And xdg-open and open don't support direct printing?
2013-04-09 10:48 <cedk> plantian: no
2013-04-09 10:50 <plantian> cedk: ok thanks, can you think of any other way I could make it possible to get direct printing?
2013-04-09 10:51 <cedk> plantian: you can tune xdg-open to do it always for a specific extension
2013-04-09 10:52 <plantian> cedk: The downside to that is that opening other open office documents on that machine will just print them right?
2013-04-09 10:53 <cedk> plantian: yes but you can use an other extension
2013-04-09 11:05 <cedk> plantian: but a good solution will be to have a API on those OS for printing
2013-04-09 11:09 <plantian> cedk: Yeah, I think I had something working before in 1.8. I must have hacked something together on the mac with File Options.
2013-04-09 11:09 <plantian> I have wizard that is a faster way to create a sale, sort of like a register, and after it was done it auto printed.
2013-04-09 11:12 <cedk> plantian: yes before the client managed a extension file register
2013-04-09 11:12 <cedk> plantian: but it was very simple and it required to duplicate the information with what the OS has
2013-04-09 11:13 <cedk> plantian: so I really think you should try with a custom extension like: .odt_print
2013-04-09 11:14 <plantian> Right, and change the file path in the xml and module ?
2013-04-09 11:15 <plantian> cedk: The mac client is almost more important but maybe there is a way to use a script wrapper to create an app that just prints the file in the same way.
2013-04-09 11:16 <cedk> plantian: I guess
2013-04-09 11:18 <plantian> I guess I don't have a lot of other ideas.
2013-04-09 13:29 <rpit> A question on products: the list-price is requiered, but allowed to be "0.0". Is this intended?
2013-04-09 13:32 <corro> rpit: yes, it's been discussed on the mailing list but I don't find the thread
2013-04-09 13:34 <corro> rpit: here we are: https://groups.google.com/forum/?fromgroups=#!topic/tryton/y8azeglzE-A
2013-04-09 13:37 <rpit> corro: Thank you, that's good for me! But I think then there's an error in the import:
2013-04-09 13:38 <rpit> res = value and Decimal(value) or None will result in None for a "0.0"-value and cannot be imported
2013-04-09 15:39 <cedk> rpit: yes
2013-04-09 15:40 <cedk> rpit: indeed, I don't think there is an issue because value is a string
2013-04-09 15:41 <rpit> cedk: But the string "0.00" results in "None" and will not satisfy the required constraint
2013-04-09 15:42 <cedk> rpit: heu, yes
2013-04-09 15:43 <rpit> cedk: To be analogue to the GUI the import had to distinguish between null and zero
2013-04-09 15:43 <cedk> rpit: it should be a if-else test
2013-04-09 15:45 <rpit> cedk: But a patch would change the behaviour for all numeric fields.
2013-04-09 15:45 <cedk> rpit: don't understand
2013-04-09 15:47 <rpit> cedk: on import an emplty field behaves equal a zero-value: They don't pass the required constraint. After patching the zero-value would pass it.
2013-04-09 15:48 <cedk> rpit: '0' should become 0 not None
2013-04-09 15:49 <rpit> cedk: yes, I agree. But we should know, that the behavouier changes concerning the required constraint
2013-04-09 15:52 <cedk> rpit: http://hg.tryton.org/trytond/file/f9ceafbf6669/CHANGELOG#l54
2013-04-09 15:56 <rpit> cedk: To explain: The create-method of a product-template accepts a record with a list price Decimal(0), but reject it with the list price "None".
2013-04-09 15:57 <cedk> rpit: yes I know, it is the expected behavior
2013-04-09 15:57 <rpit> cedk: now the import_data transfers "0.0" to "None" and the following create rejects the record. If we change the import, it will accept the same record.
2013-04-09 15:58 <cedk> rpit: yes
2013-04-09 15:58 <rpit> cedk: okay, let's patch it

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!