13 lines
393 B
Python
13 lines
393 B
Python
from odoo import models, fields
|
|
|
|
|
|
class AccountMove(models.Model):
|
|
_inherit = 'account.move'
|
|
|
|
woo_order_id = fields.Many2one('woo.order', string='WooCommerce Order')
|
|
is_woo_invoice = fields.Boolean(compute='_compute_is_woo_invoice', string='Is WC Invoice')
|
|
|
|
def _compute_is_woo_invoice(self):
|
|
for move in self:
|
|
move.is_woo_invoice = bool(move.woo_order_id)
|