as it was kindly explained to me that most of my messages should be here…
in terms of documentation, what’s missing, in my opinion, for newbie developers are code snippets. There are tons of them in the forum replies. It might be a good idea to organize them, perhaps with tags
for example.
#relatorio #invoice #first_line
<for each="i, line in enumerate(invoice.invoice_address.full_address.split('\n'))">
<if test="i==0">
FIRST LINE
</if>
</for>
OR
#relatorio #test #when
<choose>
<when test="o.total <= 100">
</when>
<otherwise>
</otherwise>
</choose>
OR
#invoice #lines #count #line
class Invoice(metaclass=PoolMeta):
'Invoice'
__name__ = 'account.invoice'
@property
def get_nbr_ligne (self):
total=0
for i in self.lines :
total +=1
return (total)
OR
#invoice #product #code
class Invoice(metaclass=PoolMeta):
'Invoice'
__name__ = 'account.invoice'
@property
def get_nbr_ligne (self):
for i in self.lines :
if not i.product.code:
for many people, this can be an easy entry into the code and, above all, it exposes “recipes” that can help them understand. The “skilled" and “knowers” could comment on possible/desirable improvements and point out blind spots. and the ‘good’ snippets would have a ‘badge’ given by “senior” developers…
it would be much easier to understand than
Function.getter_with_context
A boolean telling if the getter result depends on the context.
If it does not depend, the getter is called without context and the result is stored in the transaction cache when readonly.
The default value is True.
Of course when you have sufficient skills you needs that documentation, but when you start it seems to me to be too difficult