Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: OpenChatter for one2many

by
MoaHub, Graeme Gellatly
- 19/09/2016 02:24:24
This is something we currently do for sale orders and would be really interested in a clean generic implementation.

However our present approach is to simply write to open chatter on the write.

Qty of Widget A reduced from 1000 to 900 - price reduced from $90 to $80.
so on and so forth.

I've not got the code handy and don't remember exactly how we tracked old and new quantities.  I know it involves clicking a button amend order, which sets some hidden fields on the sale line.

However as an idea, how about track_visibility on the purchase line fields, then intercepting the message_track call to chatter to switch to the associated order.
Or else something else we did, and I can't remember where or how or even for who right now (might have been products and product templates), but I think we overwrote the message_ids to be a functional one2many field in a model, in order to return (in your example) not just purchase order chatter but also any related one2many chatter.

On Mon, Sep 19, 2016 at 11:53 AM, Pedro M. Baeza (Tecnativa) <pedro.baeza@tecnativa.com> wrote:
Hi, I don't know any, so it can be welcome. I suppose you know that you can put a track over the full one2many field, but this will create a message when any of the fields of the one2many model changes.

Regards.

2016-09-18 8:24 GMT+02:00 Quentin THEURET <odoo@kerpeo.com>:
Hi contributors,

I need to log modifications on a purchase order line (quantity, unit 
price) in the OpenChatter of the linked purchase order. I didn't find a 
way or a module to do that.

Is there a way or a module that allows me to define a _track_visibility 
on a purchase.order.line field (or in the _trace dictionary) and put 
theses modifications on the linked purchase.order record ?

If not, I'll try to create a module to do that.

Regards,

-- 
Quentin THEURET
https://twitter.com/qtheuret

_______________________________________________
Mailing-List: http://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: http://odoo-community.org/groups?unsubscribe


_______________________________________________
Mailing-List: http://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: http://odoo-community.org/groups?unsubscribe


Reference