IRC logs of #tryton for Wednesday, 2013-02-27

chat.freenode.net #tryton log beginning Wed Feb 27 00:00:01 CET 2013
2013-02-27 06:31 <scrapper> hey guys, I try to add a second "invoice report" with other layout/style to account.invoice. Both work, but the two together -> only the first "record" is used to create report. I am not sure how report in invoice.xml is referenced... Is it possible to have multiple reports in Tryton 2.2.4?
2013-02-27 06:35 <scrapper> its the problem with reference I guess: def print_invoice(...) in invoice.py works with type='report' so I think, it takes the FIRST report record and uses its style settings. If so,... multiple reports are not possible :-(
2013-02-27 06:35 <scrapper> any hints?
2013-02-27 07:21 <scrapper> so it seems I have to find a way to implement def print_invoice(...) in invoice.py to address two different reports in invoice.xml. no idea yet how... but this should be the way...
2013-02-27 08:53 <ralf58> Is there a simple way to get the display-value of a Selection-field? Using record.field I only get the database-value of the field
2013-02-27 09:20 <rmu> scrapper: you can deactivate the "first" one
2013-02-27 09:23 <scrapper> rmu: yes, but i want both. -> my solution right now is... added field "invoice_company" to class invoice in invoice.py + selection fields in invoice.xml. AND: in def print_invoice I work with if company_name = *** use this report from invoice.xml if company_name = **othercompanyname** use other report. This seems to be the best solution to my trouble. thx rmu!
2013-02-27 09:26 <scrapper> rmu: not to confuse you. Its the same company - just two different locations with other "Brand Company Name".
2013-02-27 09:26 <scrapper> rmu: i just want two different LOGOs headers and footers on the invoice report. So i think my solution will work. (hopefully)
2013-02-27 09:28 <rmu> scrapper: i have the case that i sometimes want to print the invoice on company stock, so header and footer should not be included, and sometimes i want to export a pdf, in that case i want header, footer and logo to be included
2013-02-27 09:29 <rmu> scrapper: i did it with some libreoffice-trickery
2013-02-27 09:29 <scrapper> rmu: trickeries are always welcome ;-) - I think i am fine to go, just some last adjustments and i am ready. (again: hopefully) :D
2013-02-27 09:31 <ronaldm> sharoonthomas: I am trying out Neried and I am stuck on the defining templates section
2013-02-27 09:31 <sharoonthomas> ronaldm: ok
2013-02-27 09:31 <sharoonthomas> ronaldm: which version are you on ?
2013-02-27 09:32 <ronaldm> sharoonthomas: I have a site name localhost and according to the manual I have to create the home.jinja file in the localhost folder in my case. where do I find the localhost (site name folder)?
2013-02-27 09:32 <ronaldm> sharoonthomas: tryton 2.6
2013-02-27 09:32 <sharoonthomas> ronaldm: ok, got it
2013-02-27 09:33 <sharoonthomas> ronaldm: there is no specific requirement as to where the template folder should be since it can be defined in application.py when nereid is configured there
2013-02-27 09:33 <sharoonthomas> ronaldm: inside that template folder, there should be a folder with the site name
2013-02-27 09:33 <sharoonthomas> ronaldm: and then templates there
2013-02-27 09:34 <ronaldm> sharoonthomas: I guess you are referring to: TEMPLATE_SEARCH_PATH = '.', in application.py
2013-02-27 09:34 <sharoonthomas> ronaldm: yes
2013-02-27 09:35 <sharoonthomas> ronaldm: if you use '.' it is going to be relative to from where you launched the application (or fired up the python interpreter)
2013-02-27 09:38 <ronaldm> sharoonthomas: there is something that I doing wrong, still getting: TemplateNotFound: localhost/home.jinja
2013-02-27 09:39 <sharoonthomas> ronaldm: is it throwing the werkzeug debugger ?
2013-02-27 09:39 <sharoonthomas> ronaldm: also can you paste your application.py on a paste or gist ?
2013-02-27 09:40 <ronaldm> sharoonthomas: http://pastie.org/6346413
2013-02-27 09:41 <ronaldm> sharoonthomas: application.py : http://pastie.org/6346418
2013-02-27 09:42 <sharoonthomas> ronaldm: and you are running the application by `python application.py`
2013-02-27 09:42 <ronaldm> sharoonthomas: yes
2013-02-27 09:43 <ronaldm> sharoonthomas: I am following the nereid doc, mainly copy and paste
2013-02-27 09:43 <sharoonthomas> ronaldm: in that case there should be a folder 'localhost' in the same level as application.py
2013-02-27 09:47 <ronaldm> sharoonthomas: sorry I am lost. Do I need to create the folder localhost? localhost in this case is name in Nereid -> Configuration -> Websites -> name (equivalent to: abcpartnerportal.com in the doc)
2013-02-27 09:49 <sharoonthomas> ronaldm: yes, at the sometime there could be multiple websites being served from the same tryton database and the templates could be different (or same)
2013-02-27 09:50 <sharoonthomas> ronaldm: can you tell me how your templates are organized now ?
2013-02-27 09:50 <sharoonthomas> ronaldm: I can help you from there
2013-02-27 09:50 <ronaldm> sharoonthomas: I have home.jinja in a folder localhost on my Desktop
2013-02-27 09:52 <sharoonthomas> ronaldm: then the template path should be the desktop, but since i assume you are going to use version control on the templates as well (Recommended), create a new folder on the same level as application.py called templates
2013-02-27 10:08 <ronaldm> sharoonthomas: thanks, I have managed to run the Welcome to Nereid template
2013-02-27 10:12 <ronaldm> sharoonthomas: is it possible to use Nereid with GNU Health
2013-02-27 10:21 <sharoonthomas> ronaldm: it should be possible to use with any tryton module
2013-02-27 10:21 <sharoonthomas> ronaldm: there is no limitation, in-fact smarro was interested in trying out too. Not sure he made any progress on that
2013-02-27 10:23 <ronaldm> sharoonthomas: is there any documentation for beginners on how to connect to any tryton module?
2013-02-27 10:23 <sharoonthomas> ronaldm: there are example modules, but no specific documentation.
2013-02-27 10:24 <sharoonthomas> ronaldm: can you explain what you would like to do ? I can help
2013-02-27 10:24 <ronaldm> sharoonthomas: I just want to test Nereid, I have seen your demo site before, but want to run it local
2013-02-27 10:25 <ronaldm> sharoonthomas: my interest in Tryton, is mainly GNU Health and we are looking at the new web client and Nereid
2013-02-27 10:25 <sharoonthomas> ronaldm: interesting. one of the simple modules that you might want to refer to is nereid-catalog
2013-02-27 10:26 <sharoonthomas> ronaldm: see https://github.com/openlabs/nereid-catalog
2013-02-27 10:29 <sharoonthomas> ronaldm: if you do decide to do something specific, feel free to ask me or @shalabhaggarwal for help
2013-02-27 10:34 <sharoonthomas> cedk: does any existing tryton module use triggers ?
2013-02-27 10:39 <cedk> sharoonthomas: no, it will never be
2013-02-27 10:39 <sharoonthomas> cedk: then what do you think triggers should be used for ?
2013-02-27 10:40 <cedk> sharoonthomas: for customization
2013-02-27 10:40 <sharoonthomas> cedk: i really cannot think of how write triggers could be useful with the current way it works
2013-02-27 10:54 <cedk> sharoonthomas: trigger changes
2013-02-27 11:02 <cedk> sharoonthomas: for example, it is usefull to send an email on sale validation
2013-02-27 12:42 <flo0> Where can I find the definition of the notebook layout? I want to have the tabs moved from the left side to the top. And I hope to find a hint there how to do it.
2013-02-27 12:52 <cedk> flo0: it is a client options
2013-02-27 12:57 <flo0> cedk: Thanks, I found it.
2013-02-27 13:46 <basman> how to enter the salaries of the employees of the company or the daily expences into Tryton?
2013-02-27 13:48 <cedk> basman: you can book using the journal entry
2013-02-27 13:49 <basman> cedk: would you please give me more details on how to do that ?
2013-02-27 13:54 <cedk> basman: journal entry is quite standard accounting process
2013-02-27 14:00 <scrapper> hey guys, tryton basics: how can I access a Many2One fields-property-value? dpaste: http://dpaste.com/1004287/
2013-02-27 14:06 <cedk> scrapper: what do you mean?
2013-02-27 14:09 <scrapper> cedk: if I try: self.invoice_company.party.name I receive error message: Attribute error Many2One object has no attribute 'party'.
2013-02-27 14:09 <scrapper> cedk: so do I need a getter method for accessing this properties?
2013-02-27 14:17 <scrapper> cedk: I already see the Company Many2One Field in Tryton. I can select companies. Works fine! But how can I access the actual value of this field in python code? Do I need a getter method?
2013-02-27 14:20 <rmu> scrapper: you should not need a getter method. your issue is something else.
2013-02-27 14:21 <scrapper> rmu: thx for the input - will help me to find the error faster.
2013-02-27 14:24 <rmu> scrapper: what is "self" in your case? if invoice_company is a Many2One, and you are accessing this field from within an instance method, self.invoice_company should be a browse_record or something like that IIUC
2013-02-27 14:25 <scrapper> rmu: self is class Invoice(ModelWorkflow, ModelSQL, ModelView) in invoice.py
2013-02-27 14:25 <scrapper> rmu: ah, so I am missing a browse record.
2013-02-27 14:25 <rmu> scrapper: can you put the whole method on dpaste?
2013-02-27 14:26 <rmu> scrapper: which tryton-version? 2.6?
2013-02-27 14:26 <scrapper> rmu: first I try with browse record. If I will again fail, I ask again. -> Tryton 2.2.4
2013-02-27 14:26 <scrapper> rmu: thx for your time!
2013-02-27 14:27 <rmu> scrapper: yw. i already garbage-collected everything from pre-active-record times. ignore comment on "instance method"
2013-02-27 14:30 <scrapper> rmu: ok thx!
2013-02-27 15:04 <basman> I set up a company with minimal chart of accounts and defined a list of products, suppose I decided to change the chart of accounts for that company, then, will I have to change all receivalbe and payable accounts for all products I've already defined?
2013-02-27 15:05 <basman> In addition, I want a more detailed chart of account that contained the general accounts for any small company
2013-02-27 15:06 <basman> The chart of account must be more comprehensive of minimal COA
2013-02-27 15:06 <cedk> basman: yes
2013-02-27 15:53 <jonan> I setup anglosaxon accounting and trying to understand the moves done after purchase order when opening the invoice. Why is Expense account debited against payable and then Expense credited against StockSupplier account rather than just debiting StockSupplier against Payable ?
2013-02-27 16:05 <cedk> jonan: to get the difference stored in expense
2013-02-27 16:07 <jonan> you mean in the case you receive a partial shipment ?
2013-02-27 16:09 <cedk> jonan: if there is a difference between the price on the stock move and the price on the invoice
2013-02-27 16:10 <cedk> jonan: see http://doc.tryton.org/2.6/modules/account_stock_anglo_saxon/doc/index.html
2013-02-27 16:29 <Guest7660> i have one question. I have cloned source from trunk and i don't see two new modules (sale_supply_drop_shipment, sale_supply) in the modules list. Was there something that i did wrong?
2013-02-27 16:36 <cedk> Guest7660: you must use nclone to fecth all the modules
2013-02-27 16:39 <Guest7660> yes i did that and i see all modules in the modules directory including sale_supply_drop_shipment, sale_supply. But i don't see them in the tryton client modules list.
2013-02-27 16:40 <cedk> Guest7660: need to update the database
2013-02-27 16:43 <Guest7660> how do i do that ?
2013-02-27 16:45 <cedk> Guest7660: https://bugs.tryton.org/issue2638
2013-02-27 16:53 <Guest7660> ok thanks, hope i will be able to do that :)
2013-02-27 16:59 <jonan> cedk: Im my case using average costing and the cost used on move between expense/stocksupplier is cost price on product. Which was 0 as no inventory was yet received. Doesnt matter if I receive or invoice first. Shouldn't the invoice amount be used ? Or should I never enter 0 cost when creating product ?
2013-02-27 17:07 <cedk> jonan: don't understand
2013-02-27 17:17 <jonan> Ok quick example. Product with average costing. Cost price=0 when created. Purchase 1 unit @ $50. Invoice, Pay, and receive. Ending account balances are: Inventory $50, InventorySupplier: -$50, Expense: $50. Should be $50, 0, 0 correct ?
2013-02-27 17:21 <jonan> The invoice open move between expense-stocksupplier is $0. Should it not be amount on invoice of $50 ?
2013-02-27 18:03 <flo0> In my module I have a selection field, where the choices are hard coded. Now I want to have this selection created from another field. I think I have to write a python function which creates a list of tuples. Is there an example for that?
2013-02-27 18:27 <udono> flo0: something like this? http://hg.tryton.org/modules/account/file/03438cc69990/journal.py#l166
2013-02-27 19:23 <basman> I need a very general and comprehensive COA that could be used for small company in any country>
2013-02-27 19:43 <plantian> basman: Did you have a look at the minimal chart of accounts that is included, I think in the account module?
2013-02-27 19:44 <plantian> basman: sorry, didn't see your earlier comments, nm
2013-02-27 19:45 <cedk> basman: it doesn't exist
2013-02-27 20:30 -!- version2beta(~rob@cpe-65-28-169-219.wi.res.rr.com) has left #tryton
2013-02-27 20:39 -!- scrapper(~scrapper@089144206090.atnat0015.highway.a1.net) has left #tryton
2013-02-27 21:23 <flo0> udono: Thanks for the hint, I will follow this idea.
2013-02-27 22:01 <plantian> Is it possible to create many records at once? It seems that .create() only can take a single dictionary.
2013-02-27 22:49 <cedk> plantian: changed in trunk
2013-02-27 22:52 <plantian> cedk: okay, I'm sort of trapped in 2.6, so I probably wont' be able to use that change
2013-02-27 22:52 <cedk> plantian: no it was a big change
2013-02-27 22:54 <plantian> cedk: Yeah, I can imagine it was.
2013-02-27 22:59 <cedk> plantian: by the way, how the migration is going?
2013-02-27 23:07 <plantian> cedk: I tried those things you mentioned but I ran into more data integrity problems. I mostly of gave up on that approach. I guess now I'm going to try to pump the data from the old db into the new db with scripts.
2013-02-27 23:08 <cedk> plantian: the delete did not work?
2013-02-27 23:13 <cedk> plantian: I think it should be possible to fix ir.action* and it should be easier than make a dump/restore
2013-02-27 23:15 <plantian> cedk: I had to log back in, it made two of each menu.
2013-02-27 23:15 <cedk> plantian: if you don't mind I can take a look
2013-02-27 23:16 <plantian> cedk: At the output?
2013-02-27 23:17 <cedk> plantian: at the DB
2013-02-27 23:19 <plantian> cedk: The 1.8 one of the broken 2.6 one ?
2013-02-27 23:20 <cedk> plantian: 1.8
2013-02-27 23:27 <plantian> cedk: Let me scrub a few things.

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