Public release from ruodoo-project: 19.0 - 2026-05-31 21:19:12 UTC
This commit is contained in:
18
mklab_dms_document/models/res_partner.py
Normal file
18
mklab_dms_document/models/res_partner.py
Normal file
@ -0,0 +1,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import models
|
||||
|
||||
|
||||
class DmsResPartner(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
|
||||
def action_show_document_incoming(self):
|
||||
self.ensure_one()
|
||||
document_action = self.env['ir.actions.act_window'].for_xml_id('mklab_dms_document','action_window_incoming')
|
||||
document_action['domain'] = str([('partner_id','=',self.id),('type_document','=','incoming')])
|
||||
return document_action
|
||||
|
||||
def action_show_document_outgoing(self):
|
||||
self.ensure_one()
|
||||
document_action = self.env['ir.actions.act_window'].for_xml_id('mklab_dms_document','action_window_outgoing')
|
||||
document_action['domain'] = str([('partner_id','=',self.id),('type_document','=','outgoing')])
|
||||
return document_action
|
||||
Reference in New Issue
Block a user