Am 10.03.2017 um 00:34 schrieb Cédric Krier:
> On 2017-03-09 20:15, Ul wrote:
>> The supplier lot has to have a full line in the lot table to be
>> searchable as any other lot.
> 
> I do not understand.
In the beginning i i thought you just wanted to add a char field for the
supplier lot number. I just wanted to say this is not a option, it has
to be a relation to a separate lot.
> 
>> Yes, it would be possible with a many2one field in the internal lot. But
>> to include the relation in my tree i would need a function field in move
>> and i would still need a custom query with a union for the tree. So for
>> me it seems more complicated this way as i want to handle and display
>> this relation as the other relations.
> 
> This is a simplification for the developer but for the user it is not as
> he has to enter both lot on each move. Without talking about integrity
> error, how will you prevent a user to encode on a move a lot and a wrong
> supplier lot?
I hide the field for supplier_lot if the from_location is not of type
supplier. So it only shows up were it is relevant.
I think it is even easier for the user, because filling the form of
ShipmentIn, i directly have a field for supplier lot without opening the
internal lot. This is important because i want to automate the
generation of the internal lot in the next step by copying the data of
the supplier lot, replacing the number and origin. So i need to be able
to fill the supplier lot at shipment in before generating the internal lot.

On the other side, if i put the supplier lot into the internal lot it is
harder to hide it when it is irrelevant as for lots generated by
production. It is possible to show it depending on origin field, but the
field is not filled on generation as the creating shipment or production
sometimes don't have a id yet or it is only filled at saving.

Perhaps it's easiest to give you my code so you get the full picture:
https://owncloud.datnest.de/index.php/s/2UaeK68nPT7Q6KT


-- 
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/39e65684-0e3a-20d4-2e36-4e0f4792789d%40gmx.de.

Reply via email to