janneman wrote:
> Thanks Albert,
> 
> your explanation is clear now.
> Still, at this moment there is no solution for this in the old situation too, 
> but how can we document behavior changes to underlying modules?
> 
> e.g. module account has it's documentation, but when installing module 
> account_anglo_saxon, the behavior of module account is changed.
> It would be nice if module account_anglo_saxon could override that part of 
> the documentation in module account by adding those changes in module 
> account_anglo_saxon.


Maybe the post in the blog is not clear enough, but that's what inheritance is 
for. You can take a look at the "Identifiers" section, but I'll try to clarify 
it again here.

Say 'account' module has a paragraph that says:

"""
When validated, a number will be created for the invoice. This 
///f:account.invoice.number/// may have any structure you like and can be 
defined like any other sequence in the system.
"""

Lets imagine that in England invoice numbers must always be numbers and cannot 
contain other symbols. You'll probably want that the 'account_anglo_saxon' 
reminds the user of this limitation so you'll probably want to extend the 
previous paragraph of the 'account' module.

In that case you'll take a look at what ID the system has generated for the 
paragraph and that it is "account.when_validated_a_number_will_be_created". 
Right, so you can write the following in the documentation of the 
'account_anglo_saxon':

"""
||| : append : account.when_validated_a_number_will_be_created |||
Remember that invoice numbers can only be numbers.
"""

When rendered, this will end up with the following rst text:

"""
When validated, a number will be created for the invoice. This 
///f:account.invoice.number/// may have any structure you like and can be 
defined like any other sequence in the system.
Remember that invoice numbers can only be numbers.
""""

If instead of 'append' we would have used 'after', it would have generated two 
paragraphs, one after the other:

"""
When validated, a number will be created for the invoice. This 
///f:account.invoice.number/// may have any structure you like and can be 
defined like any other sequence in the system.

Remember that invoice numbers can only be numbers.
""""

Take a look at the post, you'll see we admit "before", "after", "prepend", 
"append" and "replace" so you can override the whole paragraph. In the future 
we'd like to allow to replace a whole section so we would introduce something 
like "replace_children", and probably something like "append_children", 
meaning, add inside this section but at the very end.

Please, keeps asking if there're still unclear things.

------------------------
Albert Cervera i Areny
http://www.NaN-tic.com
OpenERP Partners




-------------------- m2f --------------------

--
http://www.openobject.com/forum/viewtopic.php?p=60609#60609

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman2/listinfo/tinyerp-users

Reply via email to