Am 09.03.2017 um 15:29 schrieb Cédric Krier:
> On 2017-03-09 14:23, Ul wrote:
>> If you just follow the lot relations made by production, you are right.
>> But as i explained to Sergi, i added a aditional field 'supplier_lot' to
>> move, that is filled by shipment in, as i do not want to use the Lot
>> numbers of the supplier internally, but of cause have to track my lots
>> back to them.
> 
> But this could be simply managed by adding the field supplier_lot on the
> lot instead of adding a new field on the move.
this way i have the supplier Lot as a independent Lot that is nicely
integrated in my tree. for example: http://pasteboard.co/HpSrF4dk8.png
The lots with a party as origin are supplier lots, and with the context
menu i can change to the supplier or the shipment..

> With that, you stay standard and your view could be integrated in
> Tryton.
> 
For integration in tryton it anyway has to be a separate module, as it
requires production module and stock_lot module. So why not using my
supplier_lot in move too. I can share my whole module (called
stock_lot_trace) if you are interested. But I'm afraid it does not yet
comply with your programming standards...

>>> For the unique id, it is pretty simple to generate unique id with fixed
>>> number of ids, see model.Union.union_shard.
>> I didn't know about yet. Can you tell me where it is used already, to
>> see an example?
>> My problem with double ids is not about the union, it is mainly from the
>> join in the first select-clause, so i don't know if this tool made for
>> union is solving it.
> 
> Yeps indeed UnionMixin will not work in this case.
> Instead a pairing function should work: http://szudzik.com/ElegantPairing.pdf
I'm sorry, i'm not so fit in math and programming to understand that
deep enough to use it for my ids. I have to wait, until someone prepares
it further...
> 
>>> But I think it is good to
>> have the tree even if there is not lot.
>> I dont see the sense, as i want to see the relations of lots. having a
>> move without lot gives no information about a lot, but i need error
>> handling for missing attributes.
> 
> If you have missing lot for some move, you will still be able to catch
> later.
if you fill in a missing lot later, it will show up, as the query is
executed every time. But in my use-case there can be no missing lots, as
they are all set to required.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/d92b5c5b-b9af-9d65-6bab-3347bf85cb74%40gmx.de.

Reply via email to