El dijous 17 de juliol de 2014 17:28:19 UTC+2, Albert Cervera i Areny
va escriure:
2014-07-17 16:46 GMT+02:00 Cédric Krier <cedric...@b2ck.com
<javascript:>>:
> On 17 Jul 16:16, Albert Cervera i Areny wrote:
>> > name and code seem redondant
>>
>> I don't think they're redundant. I see it just like party and
product
>> which both have product and code. Though maybe we could make it
work
>> like in party, by default. So the sequence is not required.
>
> It is. You will have generated code or custom name but not both.
> So I guess it should be possible to do it like for party code.
Maybe not name but I think that a 'description' not required field
makes a lot of sense.
>> > The linkage with stock_lot doesn't seem to me as a real
benefit. But it
>> > could be a simple informational link if both modules are
installed.
>>
>> It should not be a requirement but it has some use cases. For
example,
>> a company who sells a large machine for which it later manages its
>> maintenance for the customer. When sold, it should use the lot
as a
>> serial number but as soon as it starts doing the maintenance it
will
>> need to create the asset.
>
> I think it is wrong. Something you have sold can not be an asset.
I understand you mean that the asset must be owned by the company but
I don't see a reason for limiting this. The activity of a company can
be managing other companies assets.
>> I think that whereas the relationship between asset and
account.asset
>> should be o2m (you can have different depreciation tables
because the
>> asset is paid in several invoices).
>
> I don't agree. You don't have many depreciation for the same
asset. If
> you have many invoices for the same asset, you just don't link
the asset
> to any invoice line and manage the amount manually.
What's the problem with managing it this way? Anyway I think your
idea
is to add a m2o from account.asset to asset, so it is up to the user
if he wants to create one or several account assets.
May this field be required or optional?
>
>> I think the link between stock.lot
>> and asset it would be a o2o. At least I cannot imagine a reason
for
>> o2m or m2o here.
>
> I think o2o is wrong, it should be many2one. Because a lot is not
> necessary a unique serial number. So with a many2one, it will be
more
> flexible.
Good point.
I just uploaded a review that implements it:
http://codereview.tryton.org/8501002/
--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk