IRC logs of #tryton for Wednesday, 2017-02-01 #tryton log beginning Wed Feb 1 00:00:01 CET 2017
2017-02-01 01:12 -!- kstenger1( has joined #tryton
2017-02-01 01:33 -!- mamcode(~mamcode@ has joined #tryton
2017-02-01 01:48 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-02-01 02:28 -!- csotelo(~csotelo@2001:1388:49c4:3f05:e302:8afb:4f4b:cd8) has joined #tryton
2017-02-01 08:01 -!- dj_xatra(~dj_xatra@ has joined #tryton
2017-02-01 08:06 -!- Timitos( has joined #tryton
2017-02-01 08:07 -!- JanGB( has joined #tryton
2017-02-01 08:09 -!- mamcode(~mamcode@ has joined #tryton
2017-02-01 08:22 -!- rpit( has joined #tryton
2017-02-01 08:48 -!- JanGB(~jan@ has joined #tryton
2017-02-01 09:33 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-02-01 10:52 -!- nicoe( has joined #tryton
2017-02-01 11:17 -!- thaneor( has joined #tryton
2017-02-01 11:49 -!- mariomop( has joined #tryton
2017-02-01 12:31 -!- uha4(d5bb453a@gateway/web/freenode/ip. has joined #tryton
2017-02-01 13:24 -!- smarro(~sebastian@ has joined #tryton
2017-02-01 13:49 -!- andrespoliti( has joined #tryton
2017-02-01 13:49 <andrespoliti> hello, 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?
2017-02-01 14:05 -!- mariomop( has joined #tryton
2017-02-01 14:12 -!- uha4(~uha4@ has joined #tryton
2017-02-01 14:15 -!- apostatize(~visavis@unaffiliated/apostatize) has joined #tryton
2017-02-01 14:18 <uha4> Hello, can anyone help me with the stock.lot module?
2017-02-01 14:19 <uha4> i'm having problems acessing the quantity of a lot
2017-02-01 14:21 <uha4> I tryed to access it like a normal field, as 'quantity' is defines as field.function in the stock.lot, but it always returns 0.0
2017-02-01 14:22 <uha4> vor 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 move
2017-02-01 14:24 <uha4> so i extended the modell move and wrote a function: "def on_change_with_quantity(self, name=None): "
2017-02-01 14:25 <uha4> inside i tryed to access the lot quantity with "self.lot.quantity"
2017-02-01 14:26 <pokoli> uha4: you have to set in the context the location_ids for which you want to compute the quantities
2017-02-01 14:27 <uha4> is there anythin else i have to do? since the quantity is calculated via the StockMixin, it's not easy to track the problem down...
2017-02-01 14:27 <pokoli> uha4: from where you are accessing this field? from the move line?
2017-02-01 14:28 <uha4> pokoli: es from the move line.
2017-02-01 14:28 <pokoli> uha4: and you want the stock on the origin location I immagine
2017-02-01 14:28 <uha4> pokoli: i trird to set the context by "with Transaction().set_context(locations=[self.from_location]):", but it did'nt help
2017-02-01 14:29 <uha4> pokoli: yes
2017-02-01 14:29 <pokoli> uha4: indeed this is done in this patch:
2017-02-01 14:29 <pokoli> uha4: which is related to
2017-02-01 14:29 <pokoli> uha4: could you please explain your use case?
2017-02-01 14:34 <uha4> pokoli: i'll have to test the patch. it cold solve it, but by just reading the code i can't judge it
2017-02-01 14:35 -!- tr33(~tr33@2a01:198:45e:babe:400d:cb1a:e1de:6733) has joined #tryton
2017-02-01 14:36 <uha4> pokoli: We are a startup producing organic food, so it is very essential to keep exactly track of all Material.
2017-02-01 14:37 <tr33> hello again
2017-02-01 14:38 <uha4> pokoli: I want to use Tryton as Inventory Management and later for accounting too.
2017-02-01 14:41 <uha4> pokoli: 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.
2017-02-01 14:43 <tr33> i'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...
2017-02-01 14:47 -!- JanGB(~jan@ has joined #tryton
2017-02-01 14:52 <pokoli> uha4: but then you should extend the production module to find your needs
2017-02-01 14:54 <pokoli> tr33: hi again, which fields are you importing?
2017-02-01 14:59 <uha4> pokoli: 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...
2017-02-01 14:59 <uha4> pokoli: just to get into tryton.
2017-02-01 15:00 <pokoli> uha4: welcome to the tryton project
2017-02-01 15:00 <pokoli> uha4: which version are working on?
2017-02-01 15:00 <uha4> pokoli: 4.2
2017-02-01 15:01 <pokoli> uha4: there is a third party module developed by nantic, which adds a sequence (to define the autoincrement) to lots
2017-02-01 15:01 <pokoli> uha4: have a look on
2017-02-01 15:02 <uha4> the 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 product
2017-02-01 15:03 <pokoli> uha4: maybe you can create this relation when the production is done, but you should ensure that there is only one output lot
2017-02-01 15:04 <pokoli> uha4: otherwise is not possible to know which inputs are related to which outputs
2017-02-01 15:05 <uha4> pokoli: 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 it
2017-02-01 15:08 <uha4> pokoli: 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 production
2017-02-01 15:08 <tr33> in german, the field names are "UnternehmenParteiVarianteBeschreibungEinzelpreisNotizEinzelpreisAnzahlKontoRechnung"
2017-02-01 15:09 <pokoli> uha4: you can use the production_split module to split one production to several ones so then you have only one lot per production
2017-02-01 15:09 <tr33> (didn't figure out how to make the client language-agnostic regarding import field names )
2017-02-01 15:09 <pokoli> tr33: you have to change your user language to english and the fields names will be in english
2017-02-01 15:10 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-02-01 15:10 <pokoli> tr33: You should include the Invoice Type, company, party and currency fields
2017-02-01 15:15 <uha4> pokoli: well having more than one output-lots isn't important, just thought it would even be possible...
2017-02-01 15:16 <uha4> pokoli: do you know, whether anyone already worked on lot-relations?
2017-02-01 15:17 <pokoli> uha4: not that I now, but you can try send an email to the mailing list asking if somebody has some similar use case
2017-02-01 15:17 <tr33> adding unit, unit_type and invoice_type did the trick :-)
2017-02-01 15:17 <tr33> thanks alot!
2017-02-01 15:18 <pokoli> tr33: you're weolcome :)
2017-02-01 15:20 <uha4> pokoli: 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...
2017-02-01 15:21 <uha4> any more hints?
2017-02-01 15:21 <pokoli> uha4: what do you mean by "my extesion of move"? It's a costum view?
2017-02-01 15:21 <pokoli> s/costum/custom/g
2017-02-01 15:24 <uha4> pokoli: 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.lot
2017-02-01 15:27 <uha4> pokoli:
2017-02-01 15:27 <pokoli> uha4: you can remove this for now, as it's not related
2017-02-01 15:28 <pokoli> uha4: BTW, have you restarted the client and the server after applying the patch?
2017-02-01 15:30 <uha4> pokoli: i restarted the server and started the client with option -d other changes take effect like this.
2017-02-01 15:30 <uha4> pokoli: remove what? the patch?
2017-02-01 15:32 <pokoli> uha4: your custom code :)
2017-02-01 15:36 <uha4> pokoli: 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-window
2017-02-01 15:39 <uha4> pokoli: 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.
2017-02-01 15:51 <cedk> uha4: 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 there
2017-02-01 15:52 <cedk> uha4: also it is not allowed to raise warning in on_change event
2017-02-01 15:56 <pokoli> uha4: maybe you should raise the warning on a workflow action (or by triggerring the check with a button)
2017-02-01 15:59 <pokoli> uha4: sorry if i did not express well. What I wanted to say is that your code is not required to make the patch work
2017-02-01 16:00 <pokoli> uha4: if you want to print the inputts lot quantity it's something similar to:
2017-02-01 16:07 <uha4> pokoli: sorry, i was disturbed... the patch itself is working. It just didn't solve my accessing the quantity.
2017-02-01 16:08 <uha4> pokoli: you're right, this might be the wrong place for this warning.
2017-02-01 16:09 <uha4> i just still got the feeling, that i missed something as i'm not able to access the quantity.
2017-02-01 16:12 <cedk> uha4: it is not possible to change the context of an already instantiate record
2017-02-01 16:13 <cedk> uha4: you have to instantiate a new one to get it using the current context
2017-02-01 16:15 <uha4> pokoli: ok, thanks a lot, now it works.
2017-02-01 16:16 -!- mamcode(~mamcode@ has joined #tryton
2017-02-01 16:21 -!- JosDzG(~Thunderbi@ has joined #tryton
2017-02-01 16:36 <pokoli> uha4: happy that it helped you
2017-02-01 18:14 -!- JosDzG(~Thunderbi@ has joined #tryton
2017-02-01 18:20 -!- JosDzG(~Thunderbi@ has joined #tryton
2017-02-01 18:50 -!- csotelo(~csotelo@2001:1388:49c4:d3a1:b0fb:dd6e:8d15:637b) has joined #tryton
2017-02-01 19:11 -!- JosDzG( has joined #tryton
2017-02-01 20:44 -!- giesen(~ggiesen@2001:19f0:0:1019:5400:ff:fe25:bda6) has joined #tryton
2017-02-01 21:05 -!- thaneor( has joined #tryton
2017-02-01 21:09 -!- csotelo(~csotelo@2001:1388:49c5:2bc3:13a0:1e4a:2cb:e0aa) has joined #tryton
2017-02-01 21:13 -!- JosDzG(~Thunderbi@ has joined #tryton
2017-02-01 22:13 -!- kstenger( has joined #tryton
2017-02-01 22:33 -!- JanGB( has joined #tryton
2017-02-01 22:35 -!- perilla( has left #tryton
2017-02-01 23:48 -!- nicoe(~nicoe@2a02:a03f:30b2:3c00:ee55:f9ff:fe7b:f7ac) has joined #tryton

Generated by 2.17.3 by Marius Gedminas - find it at!