Public release from ruodoo-project: 19.0 - 2026-11-01 22:52:25 UTC
This commit is contained in:
25
mklab_dms_document/models/res_partner.py
Normal file
25
mklab_dms_document/models/res_partner.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from odoo import models
|
||||
|
||||
|
||||
class DmsResPartner(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
|
||||
def action_show_document_incoming(self):
|
||||
self.ensure_one()
|
||||
action = self.env['ir.actions.act_window']._for_xml_id(
|
||||
'mklab_dms_document.action_window_incoming')
|
||||
action['domain'] = [('partner_id', '=', self.id),
|
||||
('type_document', '=', 'incoming')]
|
||||
action['context'] = {'default_partner_id': self.id,
|
||||
'default_type_document': 'incoming'}
|
||||
return action
|
||||
|
||||
def action_show_document_outgoing(self):
|
||||
self.ensure_one()
|
||||
action = self.env['ir.actions.act_window']._for_xml_id(
|
||||
'mklab_dms_document.action_window_outgoing')
|
||||
action['domain'] = [('partner_id', '=', self.id),
|
||||
('type_document', '=', 'outgoing')]
|
||||
action['context'] = {'default_partner_id': self.id,
|
||||
'default_type_document': 'outgoing'}
|
||||
return action
|
||||
Reference in New Issue
Block a user