feat: extend sale.order, stock.picking, account.move, res.partner with WooCommerce fields

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-03-31 20:10:08 -04:00
parent fdd67c9e51
commit 7b085a87a1
5 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
from odoo import models, fields
class StockPicking(models.Model):
_inherit = 'stock.picking'
woo_tracking_number = fields.Char(string='WC Tracking Number')
woo_carrier_id = fields.Many2one('woo.shipping.carrier', string='WC Shipping Carrier')
woo_shipment_ids = fields.One2many('woo.shipment', 'picking_id', string='WC Shipments')
is_woo_delivery = fields.Boolean(compute='_compute_is_woo_delivery', string='Is WC Delivery')
def _compute_is_woo_delivery(self):
for picking in self:
picking.is_woo_delivery = bool(picking.woo_shipment_ids) or bool(
picking.sale_id and picking.sale_id.woo_bind_ids
)