diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-06-11 08:58:41 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-06-11 08:58:41 +0700 |
| commit | 5be65f6f512124cb3b4c3b83d69f9ff86dc1c6b4 (patch) | |
| tree | d934e09d70fc8b0df6748a99f4fe3ff1aae75136 /fixco_custom/models | |
| parent | 21d0b685e0946b5a3490629490ef80cd6c3e6816 (diff) | |
table bundling line product
Diffstat (limited to 'fixco_custom/models')
| -rwxr-xr-x | fixco_custom/models/product_product.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fixco_custom/models/product_product.py b/fixco_custom/models/product_product.py index 2e571a8..719a183 100755 --- a/fixco_custom/models/product_product.py +++ b/fixco_custom/models/product_product.py @@ -13,6 +13,7 @@ from io import BytesIO class ProductProduct(models.Model): _inherit = "product.product" + bundling_line_ids = fields.One2many('bundling.line', 'product_id', string="Bundling Lines", auto_join=True) qty_pcs_box = fields.Float("Pcs Box") barcode_box = fields.Char("Barcode Box") qr_code_variant = fields.Binary("QR Code Variant", compute='_compute_qr_code_variant') @@ -38,4 +39,12 @@ class ProductProduct(models.Model): img.save(buffer, format="PNG") qr_code_img = base64.b64encode(buffer.getvalue()).decode() - rec.qr_code_variant = qr_code_img
\ No newline at end of file + rec.qr_code_variant = qr_code_img + +class BundlingLine(models.Model): + _name = "bundling.line" + + product_id = fields.Many2one('product.product', string="Product") + variant_id = fields.Many2one('product.product', string="Variant") + master_sku = fields.Char(string="Master SKU") + price = fields.Float(string="Price") |
