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

chat.freenode.net #tryton log beginning Wed Feb 27 00:00:01 CET 2013
scrapperhey 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?06:31
scrapperits 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 :-(06:35
scrapperany hints?06:35
scrapperso 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...07:21
ralf58Is there a simple way to get the display-value of a Selection-field? Using record.field I only get the database-value of the field08:53
rmuscrapper: you can deactivate the "first" one09:20
scrapperrmu: 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!09:23
scrapperrmu: not to confuse you. Its the same company - just two different locations with other "Brand Company Name".09:26
scrapperrmu: i just want two different LOGOs headers and footers on the invoice report. So i think my solution will work. (hopefully)09:26
rmuscrapper: 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 included09:28
rmuscrapper: i did it with some libreoffice-trickery09:29
scrapperrmu: trickeries are always welcome ;-) - I think i am fine to go, just some last adjustments and i am ready. (again: hopefully) :D09:29
ronaldmsharoonthomas: I am trying out Neried and I am stuck on the defining templates section09:31
sharoonthomasronaldm: ok09:31
sharoonthomasronaldm: which version are you on ?09:31
ronaldmsharoonthomas: 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)?09:32
ronaldmsharoonthomas: tryton 2.609:32
sharoonthomasronaldm: ok, got it09:32
sharoonthomasronaldm: 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 there09:33
sharoonthomasronaldm: inside that template folder, there should be a folder with the site name09:33
sharoonthomasronaldm: and then templates there09:33
ronaldmsharoonthomas: I guess you are referring to: TEMPLATE_SEARCH_PATH = '.', in application.py09:34
sharoonthomasronaldm: yes09:34
sharoonthomasronaldm: if you use '.' it is going to be relative to from where you launched the application (or fired up the python interpreter)09:35
ronaldmsharoonthomas: there is something that I doing wrong, still getting: TemplateNotFound: localhost/home.jinja09:38
sharoonthomasronaldm: is it throwing the werkzeug debugger ?09:39
sharoonthomasronaldm: also can you paste your application.py on a paste or gist ?09:39
ronaldmsharoonthomas: http://pastie.org/634641309:40
ronaldmsharoonthomas: application.py : http://pastie.org/634641809:41
sharoonthomasronaldm: and you are running the application by `python application.py`09:42
ronaldmsharoonthomas: yes09:42
ronaldmsharoonthomas: I am following the nereid doc, mainly copy and paste09:43
sharoonthomasronaldm: in that case there should be a folder 'localhost' in the same level as application.py09:43
ronaldmsharoonthomas: 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)09:47
sharoonthomasronaldm: yes, at the sometime there could be multiple websites being served from the same tryton database and the templates could be different (or same)09:49
sharoonthomasronaldm: can you tell me how your templates are organized now ?09:50
sharoonthomasronaldm: I can help you from there09:50
ronaldmsharoonthomas: I have home.jinja in a folder localhost on my Desktop09:50
sharoonthomasronaldm: 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 templates09:52
ronaldmsharoonthomas: thanks, I have managed to run the Welcome to Nereid template10:08
ronaldmsharoonthomas: is it possible to use Nereid with GNU Health10:12
sharoonthomasronaldm: it should be possible to use with any tryton module10:21
sharoonthomasronaldm: there is no limitation, in-fact smarro was interested in trying out too. Not sure he made any progress on that10:21
ronaldmsharoonthomas: is there any documentation for beginners on how to connect to any tryton module?10:23
sharoonthomasronaldm: there are example modules, but no specific documentation.10:23
sharoonthomasronaldm: can you explain what you would like to do ? I can help10:24
ronaldmsharoonthomas: I just want to test Nereid, I have seen your demo site before, but want to run it local10:24
ronaldmsharoonthomas: my interest in Tryton, is mainly GNU Health and we are looking at the new web client and Nereid10:25
sharoonthomasronaldm: interesting. one of the simple modules that you might want to refer to is nereid-catalog10:25
sharoonthomasronaldm: see https://github.com/openlabs/nereid-catalog10:26
sharoonthomasronaldm: if you do decide to do something specific, feel free to ask me or @shalabhaggarwal for help10:29
sharoonthomascedk: does any existing tryton module use triggers ?10:34
cedksharoonthomas: no, it will never be10:39
sharoonthomascedk: then what do you think triggers should be used for ?10:39
cedksharoonthomas: for customization10:40
sharoonthomascedk: i really cannot think of how write triggers could be useful with the current way it works10:40
cedksharoonthomas: trigger changes10:54
cedksharoonthomas: for example, it is usefull to send an email on sale validation11:02
flo0Where 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.12:42
cedkflo0: it is a client options12:52
flo0cedk: Thanks, I found it.12:57
basmanhow to enter the salaries of the employees of the company or the daily expences into Tryton?13:46
cedkbasman: you can book using the journal entry13:48
basmancedk: would you please give me more details on how to do that ?13:49
cedkbasman: journal entry is quite standard accounting process13:54
scrapperhey guys, tryton basics: how can I access a Many2One fields-property-value? dpaste: http://dpaste.com/1004287/14:00
cedkscrapper: what do you mean?14:06
scrappercedk: if I try: self.invoice_company.party.name I receive error message: Attribute error Many2One object has no attribute 'party'.14:09
scrappercedk: so do I need a getter method for accessing this properties?14:09
scrappercedk: 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?14:17
rmuscrapper: you should not need a getter method. your issue is something else.14:20
scrapperrmu: thx for the input - will help me to find the error faster.14:21
rmuscrapper: 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 IIUC14:24
scrapperrmu: self is class Invoice(ModelWorkflow, ModelSQL, ModelView) in invoice.py14:25
scrapperrmu: ah, so I am missing a browse record.14:25
rmuscrapper: can you put the whole method on dpaste?14:25
rmuscrapper: which tryton-version? 2.6?14:26
scrapperrmu: first I try with browse record. If I will again fail, I ask again. -> Tryton 2.2.414:26
scrapperrmu: thx for your time!14:26
rmuscrapper: yw. i already garbage-collected everything from pre-active-record times. ignore comment on "instance method"14:27
scrapperrmu: ok thx!14:30
basmanI 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?15:04
basmanIn addition, I want a more detailed chart of account that contained the general accounts for any small company15:05
basmanThe chart of account must be more comprehensive of minimal COA15:06
cedkbasman: yes15:06
jonanI 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 ?15:53
cedkjonan: to get the difference stored in expense16:05
jonanyou mean in the case you receive a partial shipment ?16:07
cedkjonan: if there is a difference between the price on the stock move and the price on the invoice16:09
cedkjonan: see http://doc.tryton.org/2.6/modules/account_stock_anglo_saxon/doc/index.html16:10
Guest7660i 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?16:29
cedkGuest7660: you must use nclone to fecth all the modules16:36
Guest7660yes 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.16:39
cedkGuest7660: need to update the database16:40
Guest7660how do i do that ?16:43
cedkGuest7660: https://bugs.tryton.org/issue263816:45
Guest7660ok thanks, hope  i will be able to do that :)16:53
jonancedk: 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 ?16:59
cedkjonan: don't understand17:07
jonanOk 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 ?17:17
jonanThe invoice open move between expense-stocksupplier is $0. Should it not be amount on invoice of $50 ?17:21
flo0In 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?18:03
udonoflo0: something like this? http://hg.tryton.org/modules/account/file/03438cc69990/journal.py#l16618:27
basmanI need a very general and comprehensive COA that could be used for small company in any country>19:23
plantianbasman: Did you have a look at the minimal chart of accounts that is included, I think in the account module?19:43
plantianbasman: sorry, didn't see your earlier comments, nm19:44
cedkbasman: it doesn't exist19:45
-!- version2beta(~rob@cpe-65-28-169-219.wi.res.rr.com) has left #tryton20:30
-!- scrapper(~scrapper@089144206090.atnat0015.highway.a1.net) has left #tryton20:39
flo0udono: Thanks for the hint, I will follow this idea.21:23
plantianIs it possible to create many records at once?  It seems that .create() only can take a single dictionary.22:01
cedkplantian: changed in trunk22:49
plantiancedk: okay, I'm sort of trapped in 2.6, so I probably wont' be able to use that change22:52
cedkplantian: no it was a big change22:52
plantiancedk: Yeah, I can imagine it was.22:54
cedkplantian: by the way, how the migration is going?22:59
plantiancedk: 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.23:07
cedkplantian: the delete did not work?23:08
cedkplantian: I think it should be possible to fix ir.action* and it should be easier than make a dump/restore23:13
plantiancedk: I had to log back in, it made two of each menu.23:15
cedkplantian: if you don't mind I can take a look23:15
plantiancedk: At the output?23:16
cedkplantian: at the DB23:17
plantiancedk: The 1.8 one of the broken 2.6 one ?23:19
cedkplantian: 1.823:20
plantiancedk: Let me scrub a few things.23:27

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!