Files
Odoo-Modules/fusion-woo-odoo/fusion_woocommerce/models/res_partner.py
2026-03-31 20:10:08 -04:00

14 lines
484 B
Python

from odoo import models, fields, api
class ResPartner(models.Model):
_inherit = 'res.partner'
woo_customer_ids = fields.One2many('woo.customer', 'partner_id', string='WooCommerce Links')
is_woo_customer = fields.Boolean(compute='_compute_is_woo_customer', string='Is WC Customer', store=True)
@api.depends('woo_customer_ids')
def _compute_is_woo_customer(self):
for partner in self:
partner.is_woo_customer = bool(partner.woo_customer_ids)