Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
3099 Widoki

When I am in editing a partner, I'd like to have the Chatter (on res.partner level) to keep track of the changes made in partner's accounting tab > Bank accounts > bank number field.

I added track_visibility='always' on the fields I'm interested on tracking in res.partner.bank but they would notify the res.partner.bank chatter, no the res.partner one 

Awatar
Odrzuć

Do you want to track the change in res.partner.bank record from Partner or want to track the change in the res.partner object when Bank field is changed?

Autor

I actually want both:

1) If a new partner.bank line is added (or deleted) add it to the res.partner chatter (with all the information inside)

2) If any of the partner.bank data is changed (like account number), also have it show up in the res.partner chatter

Thanks for your time!

Najlepsza odpowiedź

Hi DevReaction,

You can add log when record write. What you need to do is, you need to override write method of res.partner and write code something like:

@api.multi

def write(self, vals):

    if vals.get('bank_ids'):

        self.message_post(body="You have added/changed bank accounts")

    return super(ClassName, self).write(vals)

Hope this will help you


Thanks and regards

Haresh Kansara

Awatar
Odrzuć