IRC logs of #tryton for Wednesday, 2017-02-01 #tryton log beginning Wed Feb 1 00:00:01 CET 2017
-!- kstenger1( has joined #tryton01:12
-!- mamcode(~mamcode@ has joined #tryton01:33
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton01:48
-!- csotelo(~csotelo@2001:1388:49c4:3f05:e302:8afb:4f4b:cd8) has joined #tryton02:28
-!- dj_xatra(~dj_xatra@ has joined #tryton08:01
-!- Timitos( has joined #tryton08:06
-!- JanGB( has joined #tryton08:07
-!- mamcode(~mamcode@ has joined #tryton08:09
-!- rpit( has joined #tryton08:22
-!- JanGB(~jan@ has joined #tryton08:48
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:33
-!- nicoe( has joined #tryton10:52
-!- thaneor( has joined #tryton11:17
-!- mariomop( has joined #tryton11:49
-!- uha4(d5bb453a@gateway/web/freenode/ip. has joined #tryton12:31
-!- smarro(~sebastian@ has joined #tryton13:24
-!- andrespoliti( has joined #tryton13:49
andrespolitihello, in sao, when i have a binary field and i want to select a file, i press the magnifying glass icon, which opens another dialog with a button to open the file explorer. Is it possible to avoid this intermediate step and open the file explorer directly from the magnifying glass icon?13:49
-!- mariomop( has joined #tryton14:05
-!- uha4(~uha4@ has joined #tryton14:12
-!- apostatize(~visavis@unaffiliated/apostatize) has joined #tryton14:15
uha4Hello, can anyone help me with the stock.lot module?14:18
uha4i'm having problems acessing the quantity of a lot14:19
uha4I tryed to access it like a normal field, as 'quantity' is defines as field.function in the stock.lot, but it always returns 0.014:21
uha4vor the beginning i wanted to write a function to check if there is enough product left of a lot, when a lot is specified in a move14:22
uha4so i extended the modell move and wrote a function: "def on_change_with_quantity(self, name=None): "14:24
uha4inside i tryed to access the lot quantity with  "self.lot.quantity"14:25
pokoliuha4: you have to set in the context the location_ids for which you want to compute the quantities14:26
uha4is there anythin else i have to do? since the quantity is calculated via the StockMixin, it's not easy to track the problem down...14:27
pokoliuha4: from where you are accessing this field? from the move line?14:27
uha4pokoli: es from the move line.14:28
pokoliuha4: and you want the stock on the origin location I immagine14:28
uha4pokoli: i trird to set the context by "with Transaction().set_context(locations=[self.from_location]):", but it did'nt help14:28
uha4pokoli: yes14:29
pokoliuha4: indeed this is done in this patch:
pokoliuha4: which is related to
pokoliuha4: could you please explain your use case?14:29
uha4pokoli: i'll have to test the patch. it cold solve it, but by just reading the code i can't judge it14:34
-!- tr33(~tr33@2a01:198:45e:babe:400d:cb1a:e1de:6733) has joined #tryton14:35
uha4pokoli: We are a startup producing organic food, so it is very essential to keep exactly track of all Material.14:36
tr33hello again14:37
uha4pokoli: I want to use Tryton as Inventory Management and later for accounting too.14:38
uha4pokoli: more special: when i fill the input-lines of a production, and of one lot is less left than needed for the production, i need a warning so the user can split the move to use two fifferent lots.14:41
tr33i'm not sure if i found another issue with accout_invoice_line_standalone: I'm trying to import data via CVS file that was precendent exported via tryton-client. But trytond complains that the field 'invoice' is required. But when I add the column in the csv with an empty value, tryton complains that a valid value is required...14:43
-!- JanGB(~jan@ has joined #tryton14:47
pokoliuha4: but then you should extend the production module to find your needs14:52
pokolitr33: hi again, which fields are you importing?14:54
uha4pokoli: i will extend the production module. For now i started with extending the stock.lot module, to add a auto-incremented Lot-Number as default...14:59
uha4pokoli: just to get into tryton.14:59
pokoliuha4: welcome to the tryton project15:00
pokoliuha4: which version are working on?15:00
uha4pokoli: 4.215:00
pokoliuha4: there is a third party module developed by nantic, which adds a sequence (to define the autoincrement) to lots15:01
pokoliuha4: have a look on
uha4the bigser issue i have to solve is to relate the lots to each other. like what what lot of witch ingredient went in what lot of product15:02
pokoliuha4: maybe you can create this relation when the production is done, but you should ensure that there is only one output lot15:03
pokoliuha4: otherwise is not possible to know which inputs are related to which outputs15:04
uha4pokoli: this should be possible to track with the production-moves, but it would involve many tables and searches, so it could be quite slow and hard to debug, so i'm thinking about a extra table to relate the lots directly to each other (with some quantity) and let production fill it15:05
uha4pokoli: there cold bee even several output lots, as long as it's the same product, i could split it by quantity. In the real production everything get's mixed anyway within one production15:08
tr33in german, the field names are "UnternehmenParteiVarianteBeschreibungEinzelpreisNotizEinzelpreisAnzahlKontoRechnung"15:08
pokoliuha4: you can use the production_split module to split one production to several ones so then you have only one lot per production15:09
tr33(didn't figure out how to make the client language-agnostic regarding import field names )15:09
pokolitr33: you have to change your user language to english and the fields names will be in english15:09
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton15:10
pokolitr33: You should include the Invoice Type, company, party and currency fields15:10
uha4pokoli: well having more than one output-lots isn't important, just thought it would even be possible...15:15
uha4pokoli: do you know, whether anyone already worked on lot-relations?15:16
pokoliuha4: not that I now, but you can try send an email to the mailing list asking if somebody has some similar use case15:17
tr33adding unit, unit_type and invoice_type did the trick :-)15:17
tr33thanks alot!15:17
pokolitr33: you're weolcome :)15:18
uha4pokoli: back to the initial top: with the patch i see the lot quantitys when i search for lots, but i still can't access them in my extension of move...15:20
uha4any more hints?15:21
pokoliuha4: what do you mean by "my extesion of move"? It's a costum view?15:21
uha4pokoli: i started my own module to play with the lot relations. within this i extended the Move modell as it is extended in the stock.lot15:24
pokoliuha4: you can remove this for now, as it's not related15:27
pokoliuha4: BTW, have you restarted the client and the server after applying the patch?15:28
uha4pokoli: i restarted the server and started the client with option -d   other changes take effect like this.15:30
uha4pokoli: remove what? the patch?15:30
pokoliuha4: your custom code :)15:32
uha4pokoli: but i still want to understand how to access the quantity of a lot from my code.  i'm curious what i did miss, and i think it's easier to just type the lot-number, and get warned when there isn't enouth left without opening the search-window15:36
uha4pokoli: if you don't have the time to dive into my code, it's ok. I just wanted to say, it doesn't feel solved by now.15:39
cedkuha4: I think it is a wrong design. Use encode the lot they have in front of them even if the system thinks it should not be there15:51
cedkuha4: also it is not allowed to raise warning in on_change event15:52
pokoliuha4: maybe you should raise the warning on a workflow action (or by triggerring the check with a button)15:56
pokoliuha4: sorry if i did not express well. What I wanted to say is that your code is not required to make the patch work15:59
pokoliuha4: if you want to print the inputts lot quantity it's something similar to:
uha4pokoli: sorry, i was disturbed...    the patch itself is working. It just didn't solve my accessing the quantity.16:07
uha4pokoli: you're right, this might be the wrong place for this warning.16:08
uha4i just still got the feeling, that i missed something as i'm not able to access the quantity.16:09
cedkuha4: it is not possible to change the context of an already instantiate record16:12
cedkuha4: you have to instantiate a new one to get it using the current context16:13
uha4pokoli: ok, thanks a lot, now it works.16:15
-!- mamcode(~mamcode@ has joined #tryton16:16
-!- JosDzG(~Thunderbi@ has joined #tryton16:21
pokoliuha4: happy that it helped you16:36
-!- JosDzG(~Thunderbi@ has joined #tryton18:14
-!- JosDzG(~Thunderbi@ has joined #tryton18:20
-!- csotelo(~csotelo@2001:1388:49c4:d3a1:b0fb:dd6e:8d15:637b) has joined #tryton18:50
-!- JosDzG( has joined #tryton19:11
-!- giesen(~ggiesen@2001:19f0:0:1019:5400:ff:fe25:bda6) has joined #tryton20:44
-!- thaneor( has joined #tryton21:05
-!- csotelo(~csotelo@2001:1388:49c5:2bc3:13a0:1e4a:2cb:e0aa) has joined #tryton21:09
-!- JosDzG(~Thunderbi@ has joined #tryton21:13
-!- kstenger( has joined #tryton22:13
-!- JanGB( has joined #tryton22:33
-!- perilla( has left #tryton22:35
-!- nicoe(~nicoe@2a02:a03f:30b2:3c00:ee55:f9ff:fe7b:f7ac) has joined #tryton23:48

Generated by 2.11.0 by Marius Gedminas - find it at!