summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/automatic_purchase.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/indoteknik_custom/models/automatic_purchase.py b/indoteknik_custom/models/automatic_purchase.py
index d0bbdb1e..4051c093 100644
--- a/indoteknik_custom/models/automatic_purchase.py
+++ b/indoteknik_custom/models/automatic_purchase.py
@@ -283,7 +283,7 @@ class AutomaticPurchase(models.Model):
purchase_pricelist = self.env['purchase.pricelist'].search(domain, order=orderby, limit=1)
vendor_id = purchase_pricelist.vendor_id
- price = self._get_valid_purchase_price(purchase_pricelist)
+ price = self._get_vaokelid_purchase_price(purchase_pricelist)
last_po_line = self.env['purchase.order.line'].search([('product_id', '=', job.product_id.id), ('order_id.state', '=', 'done')], order='id desc', limit=1)
self.env['automatic.purchase.line'].create([{
@@ -460,3 +460,19 @@ class AutomaticPurchaseSalesMatch(models.Model):
product_id = fields.Many2one('product.product', string='Product')
qty_so = fields.Float(string='Qty SO')
qty_po = fields.Float(string='Qty PO')
+
+
+class SyncPurchasingJob(models.Model):
+ _name = 'sync.purchasing.job'
+ _auto = False
+ _rec_name = 'product_id'
+
+ automatic_purchase_id = fields.Many2one('automatic.purchase', string='Ref', required=True, ondelete='cascade', index=True, copy=False)
+ product_id = fields.Many2one('product.product', string="Product")
+ brand = fields.Char(string='Brand')
+ item_code = fields.Char(string='Item Code')
+ product = fields.Char(string='Product Name')
+ onhand = fields.Float(string='OnHand')
+ incoming = fields.Float(string="Incoming")
+ outgoing = fields.Float(string="Outgoing")
+ action = fields.Char(string="Status")