From ede74761c8556b18b4555af22738a76538682512 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Tue, 11 Feb 2025 14:52:22 +0700 Subject: add CR cancel so >30jt --- indoteknik_custom/models/sale_order.py | 73 +++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 9631fe6e..b1039750 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -7,6 +7,44 @@ from collections import defaultdict _logger = logging.getLogger(__name__) +class CancelReasonOrder(models.TransientModel): + _name = 'cancel.reason.order' + _description = 'Wizard for Cancel Reason order' + + request_id = fields.Many2one('sale.order', string='Request') + reason_cancel = fields.Selection([ + ('harga_terlalu_mahal', 'Harga barang terlalu mahal'), + ('harga_web_tidak_valid', 'Harga web tidak valid'), + ('stok_kosong', 'Stock kosong'), + ('tidak_mau_indent', 'Customer tidak mau indent'), + ('batal_rencana_pembelian', 'Customer membatalkan rencana pembelian'), + ('vendor_tidak_support_demo', 'Vendor tidak support demo/trial product'), + ('product_knowledge_kurang', 'Product knowledge kurang baik'), + ('barang_tidak_sesuai', 'Barang tidak sesuai/tepat'), + ('tidak_sepakat_pembayaran', 'Tidak menemukan kesepakatan untuk pembayaran'), + ('dokumen_tidak_support', 'Indoteknik tidak bisa support document yang dibutuhkan (Ex: TKDN, COO, SNI)'), + ('ganti_quotation', 'Ganti Quotation'), + ('testing_internal', 'Testing Internal'), + ], string='Reason for Cancel', required=True, copy=False, index=True, tracking=3) + attachment_bukti = fields.Many2many( + 'ir.attachment', + string="Attachment Bukti", readonly=False, + tracking=3, required=True + ) + nomor_so_pengganti = fields.Char(string='Nomor SO Pengganti', copy=False, tracking=3) + + def confirm_reject(self): + order = self.request_id + if order: + order.write({'reason_cancel': self.reason_cancel}) + order.write({'attachment_bukti': self.attachment_bukti}) + order.message_post(body='Attachment Bukti Cancel', + attachment_ids=[self.attachment_bukti.id]) + if self.nomor_so_pengganti or self.reason_cancel == 'ganti_quotation': + order.write({'nomor_so_pengganti': self.nomor_so_pengganti}) + order.confirm_cancel_order() + + return {'type': 'ir.actions.act_window_close'} class SaleOrder(models.Model): _inherit = "sale.order" @@ -145,6 +183,25 @@ class SaleOrder(models.Model): ('NP', 'Non Pareto') ]) shipping_method_picking = fields.Char(string='Shipping Method Picking', compute='_compute_shipping_method_picking') + reason_cancel = fields.Selection([ + ('harga_terlalu_mahal', 'Harga barang terlalu mahal'), + ('harga_web_tidak_valid', 'Harga web tidak valid'), + ('stok_kosong', 'Stock kosong'), + ('tidak_mau_indent', 'Customer tidak mau indent'), + ('batal_rencana_pembelian', 'Customer membatalkan rencana pembelian'), + ('vendor_tidak_support_demo', 'Vendor tidak support demo/trial product'), + ('product_knowledge_kurang', 'Product knowledge kurang baik'), + ('barang_tidak_sesuai', 'Barang tidak sesuai/tepat'), + ('tidak_sepakat_pembayaran', 'Tidak menemukan kesepakatan untuk pembayaran'), + ('dokumen_tidak_support', 'Indoteknik tidak bisa support document yang dibutuhkan (Ex: TKDN, COO, SNI)'), + ('ganti_quotation', 'Ganti Quotation'), + ('testing_internal', 'Testing Internal'), + ], string='Reason for Cancel', copy=False, index=True, tracking=3) + attachment_bukti = fields.Many2one( + 'ir.attachment', + string="Attachment Bukti Cancel", readonly=False, + ) + nomor_so_pengganti = fields.Char(string='Nomor SO Pengganti', copy=False, tracking=3) def _compute_shipping_method_picking(self): for order in self: @@ -1085,8 +1142,22 @@ class SaleOrder(models.Model): self.due_id = False if main_parent.use_so_approval: self.send_notif_to_salesperson(cancel=True) + for order in self: + if order.amount_total > 30000000: + return { + 'type': 'ir.actions.act_window', + 'name': _('Cancel Reason'), + 'res_model': 'cancel.reason.order', + 'view_mode': 'form', + 'target': 'new', + 'context': {'default_request_id': self.id}, + } return super(SaleOrder, self).action_cancel() - + + def confirm_cancel_order(self): + """Fungsi ini akan dipanggil oleh wizard setelah alasan pembatalan dipilih""" + return super(SaleOrder, self).action_cancel() + def validate_partner_invoice_due(self): parent_id = self.partner_id.parent_id.id parent_id = parent_id if parent_id else self.partner_id.id -- cgit v1.2.3 From 7f284e263de51242459ca780af32fe0e372f7ac4 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Wed, 12 Feb 2025 15:02:14 +0700 Subject: update code --- indoteknik_custom/models/sale_order.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index b1039750..d0b72ed3 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -37,11 +37,16 @@ class CancelReasonOrder(models.TransientModel): order = self.request_id if order: order.write({'reason_cancel': self.reason_cancel}) + if not self.attachment_bukti: + raise UserError('Attachment bukti wajib disertakan') order.write({'attachment_bukti': self.attachment_bukti}) order.message_post(body='Attachment Bukti Cancel', attachment_ids=[self.attachment_bukti.id]) - if self.nomor_so_pengganti or self.reason_cancel == 'ganti_quotation': - order.write({'nomor_so_pengganti': self.nomor_so_pengganti}) + if self.reason_cancel == 'ganti_quotation': + if self.nomor_so_pengganti: + order.write({'nomor_so_pengganti': self.nomor_so_pengganti}) + else: + raise UserError('Nomor SO pengganti wajib disertakan') order.confirm_cancel_order() return {'type': 'ir.actions.act_window_close'} -- cgit v1.2.3 From b7580b1590fc3259aa028c0c909b0ee564e801d5 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Wed, 19 Feb 2025 14:49:40 +0700 Subject: update customer --- indoteknik_custom/models/commision.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/commision.py b/indoteknik_custom/models/commision.py index 3f035e2f..03473b09 100644 --- a/indoteknik_custom/models/commision.py +++ b/indoteknik_custom/models/commision.py @@ -233,6 +233,8 @@ class CustomerCommision(models.Model): return def action_confirm_customer_payment(self): + if self.payment_status == 'payment': + raise UserError('Customer Commision sudah berstatus Payment') group_id = self.env.ref('indoteknik_custom.group_role_fat').id users_in_group = self.env['res.users'].search([('groups_id', 'in', [group_id])]) if self.env.user.id not in users_in_group.mapped('id'): -- cgit v1.2.3 From 7c1c4def22a72b9a6f6806d70a865594ae14386c Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Thu, 20 Feb 2025 16:20:25 +0700 Subject: add CR voucher type account --- indoteknik_custom/models/res_users.py | 7 +++++++ indoteknik_custom/models/voucher.py | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/res_users.py b/indoteknik_custom/models/res_users.py index 31b84ae3..63942bb5 100755 --- a/indoteknik_custom/models/res_users.py +++ b/indoteknik_custom/models/res_users.py @@ -71,6 +71,13 @@ class ResUsers(models.Model): if not vouchers: return None return ', '.join(x.code for x in vouchers) return None + + def get_voucher_code_switch_account(self, type): + if type == 'switch_account': + vouchers = self.env['voucher'].get_active_voucher([('account_type', 'in', ['all','company'])]) + if not vouchers: return None + return ', '.join(x.code for x in vouchers) + return None def check_access(self, model, mode): assert mode in ('read', 'write', 'create', 'unlink', 'import', 'export'), 'Invalid access mode' diff --git a/indoteknik_custom/models/voucher.py b/indoteknik_custom/models/voucher.py index 37c97338..101d4bcf 100644 --- a/indoteknik_custom/models/voucher.py +++ b/indoteknik_custom/models/voucher.py @@ -59,7 +59,11 @@ class Voucher(models.Model): show_on_email = fields.Selection([ ('user_activation', 'User Activation') ], 'Show on Email') - + account_type = fields.Selection(string='Account Type', default="all", selection=[ + ('all', "All Account"), + ('person', "Account Individu"), + ('company', "Account Company"), + ]) @api.constrains('description') def _check_description_length(self): for record in self: -- cgit v1.2.3 From 093bd33ba36ba123a53853e7407e534f9f23734b Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Fri, 21 Feb 2025 10:21:34 +0700 Subject: add voucher info in email approve switch account --- indoteknik_custom/models/res_users.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/res_users.py b/indoteknik_custom/models/res_users.py index 63942bb5..b0864f2c 100755 --- a/indoteknik_custom/models/res_users.py +++ b/indoteknik_custom/models/res_users.py @@ -70,11 +70,8 @@ class ResUsers(models.Model): vouchers = self.env['voucher'].get_active_voucher([('show_on_email', '=', 'user_activation')]) if not vouchers: return None return ', '.join(x.code for x in vouchers) - return None - - def get_voucher_code_switch_account(self, type): if type == 'switch_account': - vouchers = self.env['voucher'].get_active_voucher([('account_type', 'in', ['all','company'])]) + vouchers = self.env['voucher'].get_active_voucher([('excl_pricelist_ids', 'not in', [1]), ('apply_type', 'in', ['all', 'brand']), ('account_type', 'in', ['all', 'company']), ('visibility', 'in', ['public'])]) if not vouchers: return None return ', '.join(x.code for x in vouchers) return None -- cgit v1.2.3 From 8696e202ecf594890a9ad29bc2bd2729321459c5 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Mon, 24 Feb 2025 14:58:11 +0700 Subject: add copy to field state_reserve and date_reserved --- indoteknik_custom/models/stock_picking.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 49e66786..954a5d52 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -94,7 +94,7 @@ class StockPicking(models.Model): purchase_representative_id = fields.Many2one('res.users', related='move_lines.purchase_line_id.order_id.user_id', string="Purchase Representative") carrier_id = fields.Many2one('delivery.carrier', string='Shipping Method') shipping_status = fields.Char(string='Shipping Status', compute="_compute_shipping_status") - date_reserved = fields.Datetime(string="Date Reserved", help='Tanggal ter-reserved semua barang nya') + date_reserved = fields.Datetime(string="Date Reserved", help='Tanggal ter-reserved semua barang nya', copy=False) status_printed = fields.Selection([ ('not_printed', 'Belum Print'), ('printed', 'Printed') @@ -120,7 +120,7 @@ class StockPicking(models.Model): ('ready', 'Ready to Ship'), ('done', 'Done'), ('cancel', 'Cancelled'), - ], string='Status Reserve', readonly=True, tracking=True, help="The current state of the stock picking.") + ], string='Status Reserve', readonly=True, tracking=True, copy=False, help="The current state of the stock picking.") notee = fields.Text(string="Note") @api.model -- cgit v1.2.3 From b20368190fbf08b87d8a665c4b316786e3d73141 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Mon, 24 Feb 2025 15:36:22 +0700 Subject: state reserve --- indoteknik_custom/models/stock_picking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 954a5d52..36d9f63d 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -120,7 +120,7 @@ class StockPicking(models.Model): ('ready', 'Ready to Ship'), ('done', 'Done'), ('cancel', 'Cancelled'), - ], string='Status Reserve', readonly=True, tracking=True, copy=False, help="The current state of the stock picking.") + ], string='Status Reserve', tracking=True, copy=False, help="The current state of the stock picking.") notee = fields.Text(string="Note") @api.model -- cgit v1.2.3 From 63c712cd38666723a112899d49af3ee82af9bf89 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Mon, 24 Feb 2025 16:04:59 +0700 Subject: adjusment number --- indoteknik_custom/models/__init__.py | 1 + indoteknik_custom/models/stock_inventory.py | 59 +++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 indoteknik_custom/models/stock_inventory.py (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index dea3eeea..f33a7411 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -143,3 +143,4 @@ from . import coretax_fatur from . import ir_actions_report from . import barcoding_product from . import account_payment_register +from . import stock_inventory diff --git a/indoteknik_custom/models/stock_inventory.py b/indoteknik_custom/models/stock_inventory.py new file mode 100644 index 00000000..12a891de --- /dev/null +++ b/indoteknik_custom/models/stock_inventory.py @@ -0,0 +1,59 @@ +from odoo import models, api, fields +from odoo.exceptions import UserError +from datetime import datetime +import logging + +_logger = logging.getLogger(__name__) + + +class StockInventory(models.Model): + _inherit = ['stock.inventory'] + _order = 'id desc' + _rec_name = 'number' + + number = fields.Char(string='Document No', index=True, copy=False, readonly=True) + adjusment_type = fields.Selection([ + ('in', 'Adjusment In'), + ('out', 'Adjusment Out'), + ], string='Adjusments Type', required=True) + + def _generate_number_stock_inventory(self): + """Men-generate nomor untuk semua stock inventory yang belum memiliki number.""" + stock_records = self.env['stock.inventory'].search([('number', '=', False)], order='id asc') + for record in stock_records: + self._assign_number(record) + + _logger.info('Generate Number Done') + + def _assign_number(self, record): + """Menentukan nomor berdasarkan kategori Adjust-In atau Adjust-Out.""" + name_upper = record.name.upper() if record.name else "" + + if self.adjusment_type == 'out' or "ADJUST OUT" in name_upper or "ADJUST-OUT" in name_upper or "OUT" in name_upper: + last_number = self._get_last_sequence("ADJUST/OUT/") + record.number = f"ADJUST/OUT/{last_number}" + elif self.adjusment_type == 'in' or "ADJUST IN" in name_upper or "ADJUST-IN" in name_upper or "IN" in name_upper: + last_number = self._get_last_sequence("ADJUST/IN/") + record.number = f"ADJUST/IN/{last_number}" + else: + record.number = "UNKNOWN" # Jika tidak termasuk kategori + + def _get_last_sequence(self, prefix): + """Mengambil nomor terakhir berdasarkan prefix (ADJUST/OUT/ atau ADJUST/IN/) dengan format 00001, 00002, dst.""" + last_record = self.env['stock.inventory'].search( + [("number", "like", f"{prefix}%")], order="number desc", limit=1 + ) + + if last_record and last_record.number: + try: + last_number = int(last_record.number.split("/")[-1]) # Ambil angka terakhir + return str(last_number + 1).zfill(5) # Format jadi 00001, 00002, dst. + except ValueError: + return "00001" # Jika format tidak valid, mulai dari 00001 + return "00001" # Jika belum ada data, mulai dari 00001 + + @api.model + def create(self, vals): + order = super(StockInventory, self).create(vals) + self._assign_number(order) + return order -- cgit v1.2.3 From 6352ba63a39293b3e260bd7bd933c9de2c023172 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 25 Feb 2025 10:47:35 +0700 Subject: add purchase price po and so on po sales matches --- indoteknik_custom/models/purchase_order_sales_match.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/purchase_order_sales_match.py b/indoteknik_custom/models/purchase_order_sales_match.py index d1d929d3..d6c2a631 100644 --- a/indoteknik_custom/models/purchase_order_sales_match.py +++ b/indoteknik_custom/models/purchase_order_sales_match.py @@ -24,6 +24,13 @@ class PurchaseOrderSalesMatch(models.Model): margin_item = fields.Float(string='Margin') delivery_amt = fields.Float(string='Delivery Amount', compute='_compute_delivery_amt') margin_deduct = fields.Float(string='After Deduct', compute='_compute_delivery_amt') + purchase_price_so = fields.Float(string='Purchase Price Sale Order', related='sale_line_id.purchase_price') + purchase_price_po = fields.Float('Purchase Price PO', compute='_compute_purchase_price_po') + + def _compute_purchase_price_po(self): + for line in self: + purchase_price = self.env['purchase.order.line'].search([('order_id', '=', line.purchase_order_id.id), ('product_id', '=', line.product_id.id)]) + line.purchase_price_po = purchase_price.purchase_price def _compute_delivery_amt(self): for line in self: -- cgit v1.2.3 From f7a149c71824ba40f9e585d1df287b36853b7213 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 25 Feb 2025 10:49:49 +0700 Subject: fix bug --- indoteknik_custom/models/purchase_order_sales_match.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/purchase_order_sales_match.py b/indoteknik_custom/models/purchase_order_sales_match.py index d6c2a631..4ebe959b 100644 --- a/indoteknik_custom/models/purchase_order_sales_match.py +++ b/indoteknik_custom/models/purchase_order_sales_match.py @@ -30,7 +30,7 @@ class PurchaseOrderSalesMatch(models.Model): def _compute_purchase_price_po(self): for line in self: purchase_price = self.env['purchase.order.line'].search([('order_id', '=', line.purchase_order_id.id), ('product_id', '=', line.product_id.id)]) - line.purchase_price_po = purchase_price.purchase_price + line.purchase_price_po = purchase_price.price_unit def _compute_delivery_amt(self): for line in self: -- cgit v1.2.3 From 787aa90ca730936c93e0afb250285ebc8708ad3a Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Tue, 25 Feb 2025 11:17:36 +0700 Subject: cr approved margin SO --- indoteknik_custom/models/sale_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 430b4526..e23f39bc 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -1122,7 +1122,7 @@ class SaleOrder(models.Model): return self.total_percent_margin < 15 and not self.env.user.is_leader def _requires_approval_margin_manager(self): - return self.total_percent_margin <= 20 and not self.env.user.is_leader and not self.env.user.is_sales_manager + return self.total_percent_margin >= 15 and not self.env.user.is_leader and not self.env.user.is_sales_manager def _create_approval_notification(self, approval_role): title = 'Warning' -- cgit v1.2.3 From 5fc94808e034dac8efeff3367b665dbd6b4f3df2 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 25 Feb 2025 11:26:52 +0700 Subject: trying to fix bug margin po --- indoteknik_custom/models/purchase_order.py | 70 ++++++++++-------------------- 1 file changed, 24 insertions(+), 46 deletions(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 54d771ba..83f86e8e 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -943,63 +943,41 @@ class PurchaseOrder(models.Model): def compute_total_margin_from_apo(self): sum_so_margin = sum_sales_price = sum_margin = 0 - for line in self.order_sales_match_line: - po_line = self.env['purchase.order.line'].search([ - ('product_id', '=', line.product_id.id), - ('order_id', '=', line.purchase_order_id.id) - ], limit=1) - sale_order_line = line.sale_line_id + for line in self.order_line: + sale_order_line = line.so_line_id if not sale_order_line: sale_order_line = self.env['sale.order.line'].search([ ('product_id', '=', line.product_id.id), - ('order_id', '=', line.sale_id.id) + ('order_id', '=', line.so_id.id) ], limit=1, order='price_reduce_taxexcl') - if sale_order_line and po_line: - so_margin = (line.qty_po / line.qty_so) * sale_order_line.item_margin - sum_so_margin += so_margin - - sales_price = sale_order_line.price_reduce_taxexcl * line.qty_po - if sale_order_line.order_id.shipping_cost_covered == 'indoteknik': - sales_price -= (sale_order_line.delivery_amt_line / sale_order_line.product_uom_qty) * line.qty_po - if sale_order_line.order_id.fee_third_party > 0: - sales_price -= (sale_order_line.fee_third_party_line / sale_order_line.product_uom_qty) * line.qty_po - sum_sales_price += sales_price - - - purchase_price = po_line.price_subtotal - if po_line.ending_price > 0: - if po_line.taxes_id.id == 22: - ending_price = po_line.ending_price / 1.11 - purchase_price = ending_price - else: - purchase_price = po_line.ending_price - if line.purchase_order_id.delivery_amount > 0: - purchase_price += (po_line.delivery_amt_line / po_line.product_qty) * line.qty_po - if line.purchase_order_id.delivery_amt > 0: - purchase_price += line.purchase_order_id.delivery_amt - real_item_margin = sales_price - purchase_price - sum_margin += real_item_margin - - if sum_so_margin != 0 and sum_sales_price != 0 and sum_margin != 0: - self.total_so_margin = sum_so_margin - self.total_so_percent_margin = round((sum_so_margin / sum_sales_price), 2) * 100 - self.total_margin = sum_margin - self.total_percent_margin = round((sum_margin / sum_sales_price), 2) * 100 - - else: - self.total_margin = 0 - self.total_percent_margin = 0 - self.total_so_margin = 0 - self.total_so_percent_margin = 0 - + sum_so_margin += sale_order_line.item_margin + sales_price = sale_order_line.price_reduce_taxexcl * sale_order_line.product_uom_qty + if sale_order_line.order_id.shipping_cost_covered == 'indoteknik': + sales_price -= sale_order_line.delivery_amt_line + if sale_order_line.order_id.fee_third_party > 0: + sales_price -= sale_order_line.fee_third_party_line + sum_sales_price += sales_price + purchase_price = line.price_subtotal + if line.ending_price > 0: + if line.taxes_id.id == 22: + ending_price = line.ending_price / 1.11 + purchase_price = ending_price + else: + purchase_price = line.ending_price + # purchase_price = line.price_subtotal + if line.order_id.delivery_amount > 0: + purchase_price += line.delivery_amt_line + if line.order_id.delivery_amt > 0: + purchase_price += line.order_id.delivery_amt + real_item_margin = sales_price - purchase_price + sum_margin += real_item_margin if sum_so_margin != 0 and sum_sales_price != 0 and sum_margin != 0: self.total_so_margin = sum_so_margin self.total_so_percent_margin = round((sum_so_margin / sum_sales_price), 2) * 100 self.total_margin = sum_margin self.total_percent_margin = round((sum_margin / sum_sales_price), 2) * 100 - else: self.total_margin = 0 self.total_percent_margin = 0 -- cgit v1.2.3 From ab1ba4b2b482b207a39ae17e43cdac4b1abb72ce Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 25 Feb 2025 11:38:21 +0700 Subject: trying to fix bug margin po --- indoteknik_custom/models/purchase_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 83f86e8e..9c05780b 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -959,7 +959,7 @@ class PurchaseOrder(models.Model): sales_price -= sale_order_line.fee_third_party_line sum_sales_price += sales_price purchase_price = line.price_subtotal - if line.ending_price > 0: + if line.order_id.total_delivery_amount > 0 and line.order_id.total_cost_service > 0: if line.taxes_id.id == 22: ending_price = line.ending_price / 1.11 purchase_price = ending_price -- cgit v1.2.3 From 6eecc5ecd377e6e7b69519294259b8e66cd8e564 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 25 Feb 2025 11:40:28 +0700 Subject: fix error --- indoteknik_custom/models/purchase_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 9c05780b..faf0955d 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -959,7 +959,7 @@ class PurchaseOrder(models.Model): sales_price -= sale_order_line.fee_third_party_line sum_sales_price += sales_price purchase_price = line.price_subtotal - if line.order_id.total_delivery_amount > 0 and line.order_id.total_cost_service > 0: + if line.order_id.total_delivery_amt > 0 and line.order_id.total_cost_service > 0: if line.taxes_id.id == 22: ending_price = line.ending_price / 1.11 purchase_price = ending_price -- cgit v1.2.3 From 0f9e8f280cd50ed5af7cbc98253ebf02068d5f24 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 25 Feb 2025 11:59:08 +0700 Subject: trying to fix bug margin po --- indoteknik_custom/models/purchase_order.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index faf0955d..6d02038d 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -944,20 +944,21 @@ class PurchaseOrder(models.Model): def compute_total_margin_from_apo(self): sum_so_margin = sum_sales_price = sum_margin = 0 for line in self.order_line: - sale_order_line = line.so_line_id - if not sale_order_line: - sale_order_line = self.env['sale.order.line'].search([ - ('product_id', '=', line.product_id.id), - ('order_id', '=', line.so_id.id) - ], limit=1, order='price_reduce_taxexcl') - - sum_so_margin += sale_order_line.item_margin - sales_price = sale_order_line.price_reduce_taxexcl * sale_order_line.product_uom_qty - if sale_order_line.order_id.shipping_cost_covered == 'indoteknik': - sales_price -= sale_order_line.delivery_amt_line - if sale_order_line.order_id.fee_third_party > 0: - sales_price -= sale_order_line.fee_third_party_line - sum_sales_price += sales_price + sales_order_line = self.env['purchase.order.sales.match'].search([ + ('product_id', '=', line.product_id.id), + ('order_id', '=', line.so_id.id) + ]) + + for so_line in sales_order_line: + sale_order_line = so_line.sale_line_id + sum_so_margin += sale_order_line.item_margin + sales_price = sale_order_line.price_reduce_taxexcl * sale_order_line.product_uom_qty + if sale_order_line.order_id.shipping_cost_covered == 'indoteknik': + sales_price -= sale_order_line.delivery_amt_line + if sale_order_line.order_id.fee_third_party > 0: + sales_price -= sale_order_line.fee_third_party_line + sum_sales_price += sales_price + purchase_price = line.price_subtotal if line.order_id.total_delivery_amt > 0 and line.order_id.total_cost_service > 0: if line.taxes_id.id == 22: -- cgit v1.2.3 From 780a7642c97518a3d7e6cdc5e2516b354f6e9cae Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 25 Feb 2025 12:00:25 +0700 Subject: fix bug --- indoteknik_custom/models/purchase_order.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 6d02038d..71ee61d3 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -946,7 +946,7 @@ class PurchaseOrder(models.Model): for line in self.order_line: sales_order_line = self.env['purchase.order.sales.match'].search([ ('product_id', '=', line.product_id.id), - ('order_id', '=', line.so_id.id) + ('sale_id', '=', line.so_id.id) ]) for so_line in sales_order_line: @@ -958,7 +958,7 @@ class PurchaseOrder(models.Model): if sale_order_line.order_id.fee_third_party > 0: sales_price -= sale_order_line.fee_third_party_line sum_sales_price += sales_price - + purchase_price = line.price_subtotal if line.order_id.total_delivery_amt > 0 and line.order_id.total_cost_service > 0: if line.taxes_id.id == 22: -- cgit v1.2.3 From c36d351e79fb2b3487e391e8075bbdefaf41fbab Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 25 Feb 2025 12:03:32 +0700 Subject: trying to fix bug margin po --- indoteknik_custom/models/purchase_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 71ee61d3..f2401dec 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -946,7 +946,7 @@ class PurchaseOrder(models.Model): for line in self.order_line: sales_order_line = self.env['purchase.order.sales.match'].search([ ('product_id', '=', line.product_id.id), - ('sale_id', '=', line.so_id.id) + ('purchase_order_id', '=', line.order_id.id) ]) for so_line in sales_order_line: -- cgit v1.2.3 From 141bfb3a32e73d5b8557a70867d957d5ed3d485b Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Tue, 25 Feb 2025 13:31:31 +0700 Subject: update code --- indoteknik_custom/models/commision.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/commision.py b/indoteknik_custom/models/commision.py index 03473b09..6920154a 100644 --- a/indoteknik_custom/models/commision.py +++ b/indoteknik_custom/models/commision.py @@ -233,6 +233,9 @@ class CustomerCommision(models.Model): return def action_confirm_customer_payment(self): + if self.status != 'approved': + raise UserError('Commision harus di approve terlebih dahulu sebelum di konfirmasi pembayarannya') + if self.payment_status == 'payment': raise UserError('Customer Commision sudah berstatus Payment') group_id = self.env.ref('indoteknik_custom.group_role_fat').id -- cgit v1.2.3 From a24d7b2a21ff24e31eef77e2032a861b7eb13e31 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 25 Feb 2025 13:51:45 +0700 Subject: fix bug --- indoteknik_custom/models/purchase_order.py | 71 ++++++++++++++-------- .../models/purchase_order_sales_match.py | 5 ++ 2 files changed, 51 insertions(+), 25 deletions(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index f2401dec..54d771ba 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -943,42 +943,63 @@ class PurchaseOrder(models.Model): def compute_total_margin_from_apo(self): sum_so_margin = sum_sales_price = sum_margin = 0 - for line in self.order_line: - sales_order_line = self.env['purchase.order.sales.match'].search([ + for line in self.order_sales_match_line: + po_line = self.env['purchase.order.line'].search([ ('product_id', '=', line.product_id.id), - ('purchase_order_id', '=', line.order_id.id) - ]) - - for so_line in sales_order_line: - sale_order_line = so_line.sale_line_id - sum_so_margin += sale_order_line.item_margin - sales_price = sale_order_line.price_reduce_taxexcl * sale_order_line.product_uom_qty + ('order_id', '=', line.purchase_order_id.id) + ], limit=1) + sale_order_line = line.sale_line_id + if not sale_order_line: + sale_order_line = self.env['sale.order.line'].search([ + ('product_id', '=', line.product_id.id), + ('order_id', '=', line.sale_id.id) + ], limit=1, order='price_reduce_taxexcl') + + if sale_order_line and po_line: + so_margin = (line.qty_po / line.qty_so) * sale_order_line.item_margin + sum_so_margin += so_margin + + sales_price = sale_order_line.price_reduce_taxexcl * line.qty_po if sale_order_line.order_id.shipping_cost_covered == 'indoteknik': - sales_price -= sale_order_line.delivery_amt_line + sales_price -= (sale_order_line.delivery_amt_line / sale_order_line.product_uom_qty) * line.qty_po if sale_order_line.order_id.fee_third_party > 0: - sales_price -= sale_order_line.fee_third_party_line + sales_price -= (sale_order_line.fee_third_party_line / sale_order_line.product_uom_qty) * line.qty_po sum_sales_price += sales_price - purchase_price = line.price_subtotal - if line.order_id.total_delivery_amt > 0 and line.order_id.total_cost_service > 0: - if line.taxes_id.id == 22: - ending_price = line.ending_price / 1.11 - purchase_price = ending_price - else: - purchase_price = line.ending_price - # purchase_price = line.price_subtotal - if line.order_id.delivery_amount > 0: - purchase_price += line.delivery_amt_line - if line.order_id.delivery_amt > 0: - purchase_price += line.order_id.delivery_amt - real_item_margin = sales_price - purchase_price - sum_margin += real_item_margin + + purchase_price = po_line.price_subtotal + if po_line.ending_price > 0: + if po_line.taxes_id.id == 22: + ending_price = po_line.ending_price / 1.11 + purchase_price = ending_price + else: + purchase_price = po_line.ending_price + if line.purchase_order_id.delivery_amount > 0: + purchase_price += (po_line.delivery_amt_line / po_line.product_qty) * line.qty_po + if line.purchase_order_id.delivery_amt > 0: + purchase_price += line.purchase_order_id.delivery_amt + real_item_margin = sales_price - purchase_price + sum_margin += real_item_margin + + if sum_so_margin != 0 and sum_sales_price != 0 and sum_margin != 0: + self.total_so_margin = sum_so_margin + self.total_so_percent_margin = round((sum_so_margin / sum_sales_price), 2) * 100 + self.total_margin = sum_margin + self.total_percent_margin = round((sum_margin / sum_sales_price), 2) * 100 + + else: + self.total_margin = 0 + self.total_percent_margin = 0 + self.total_so_margin = 0 + self.total_so_percent_margin = 0 + if sum_so_margin != 0 and sum_sales_price != 0 and sum_margin != 0: self.total_so_margin = sum_so_margin self.total_so_percent_margin = round((sum_so_margin / sum_sales_price), 2) * 100 self.total_margin = sum_margin self.total_percent_margin = round((sum_margin / sum_sales_price), 2) * 100 + else: self.total_margin = 0 self.total_percent_margin = 0 diff --git a/indoteknik_custom/models/purchase_order_sales_match.py b/indoteknik_custom/models/purchase_order_sales_match.py index 4ebe959b..ed013dd5 100644 --- a/indoteknik_custom/models/purchase_order_sales_match.py +++ b/indoteknik_custom/models/purchase_order_sales_match.py @@ -26,6 +26,11 @@ class PurchaseOrderSalesMatch(models.Model): margin_deduct = fields.Float(string='After Deduct', compute='_compute_delivery_amt') purchase_price_so = fields.Float(string='Purchase Price Sale Order', related='sale_line_id.purchase_price') purchase_price_po = fields.Float('Purchase Price PO', compute='_compute_purchase_price_po') + purchase_line_id = fields.Many2one('purchase.order.line', string='Purchase Line', compute='_compute_purchase_line_id') + + def _compute_purchase_line_id(self): + for line in self: + line.purchase_line_id = self.env['purchase.order.line'].search([('order_id', '=', line.purchase_order_id.id), ('product_id', '=', line.product_id.id)]) def _compute_purchase_price_po(self): for line in self: -- cgit v1.2.3 From c459ff9c8b326929e748bb35b3dffe1cc9248e8a Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Wed, 26 Feb 2025 13:46:53 +0700 Subject: margin per line on po --- indoteknik_custom/models/purchase_order_line.py | 60 ++++++++++++++++++------- 1 file changed, 44 insertions(+), 16 deletions(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/purchase_order_line.py b/indoteknik_custom/models/purchase_order_line.py index 587a09a1..033469b8 100755 --- a/indoteknik_custom/models/purchase_order_line.py +++ b/indoteknik_custom/models/purchase_order_line.py @@ -321,32 +321,60 @@ class PurchaseOrderLine(models.Model): def compute_item_margin(self): sum_so_margin = sum_sales_price = sum_margin = 0 + for line in self: - if not line.product_id or line.product_id.type == 'service' or not self.order_id.sale_order_id: + product = line.product_id + order = line.order_id + + # Skip jika tidak ada product_id, produk adalah service, atau tidak ada purchase order terkait + if not product or product.type == 'service' or not order: line.so_item_margin = 0 line.so_item_percent_margin = 0 line.item_margin = 0 line.item_percent_margin = 0 continue - sale_order_line = self.env['sale.order.line'].search( - [('product_id', '=', line.product_id.id), - ('order_id', '=', line.order_id.sale_order_id.id)], limit=1, order='price_reduce_taxexcl') - line.so_item_margin = sale_order_line.item_margin - line.so_item_percent_margin = sale_order_line.item_percent_margin - sum_so_margin += sale_order_line.item_margin - sales_price = sale_order_line.price_reduce_taxexcl * sale_order_line.product_uom_qty - if sale_order_line.order_id.shipping_cost_covered == 'indoteknik': - sales_price -= sale_order_line.delivery_amt_line - if sale_order_line.order_id.fee_third_party > 0: - sales_price -= sale_order_line.fee_third_party_line - sum_sales_price += sales_price + + # Cari semua sale.order.line terkait dengan purchase.order melalui tabel purchase.order.sales.match + sales_matches = self.env['purchase.order.sales.match'].search([ + ('purchase_order_id', '=', order.id), + ('product_id', '=', product.id) + ]) + + total_sales_price = total_margin = total_qty_so = 0 + for match in sales_matches: + sale_order_line = match.sale_line_id + + # Hitung harga jual setelah mempertimbangkan biaya tambahan + sales_price = sale_order_line.price_reduce_taxexcl * match.qty_so + if sale_order_line.order_id.shipping_cost_covered == 'indoteknik': + sales_price -= sale_order_line.delivery_amt_line + if sale_order_line.order_id.fee_third_party > 0: + sales_price -= sale_order_line.fee_third_party_line + + total_sales_price += sales_price + total_margin += sale_order_line.item_margin + total_qty_so += match.qty_so + + # Set margin berdasarkan total dari semua sales order yang terkait + line.so_item_margin = total_margin + line.so_item_percent_margin = (total_margin / total_sales_price) * 100 if total_sales_price else 0 + + sum_so_margin += total_margin + sum_sales_price += total_sales_price + + # Hitung harga pembelian dengan mempertimbangkan biaya pengiriman purchase_price = line.price_subtotal - if line.order_id.delivery_amount > 0: + if order.delivery_amount > 0: purchase_price += line.delivery_amt_line - real_item_margin = sales_price - purchase_price - real_item_percent_margin = round((real_item_margin/sales_price), 2) * 100 + + # Hitung margin dan persentase margin + real_item_margin = total_sales_price - purchase_price + real_item_percent_margin = (real_item_margin / total_sales_price) * 100 if total_sales_price else 0 + + # Set nilai margin ke dalam line line.item_margin = real_item_margin line.item_percent_margin = real_item_percent_margin + sum_margin += real_item_margin def compute_delivery_amt_line(self): -- cgit v1.2.3 From 860edce900b22241d5f75e1e4613945c577e1c14 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Thu, 27 Feb 2025 15:25:13 +0700 Subject: update code jaga jaga kalau so tidak ter-cancel --- indoteknik_custom/models/sale_order.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index f53041cb..d6b5e848 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -1162,6 +1162,8 @@ class SaleOrder(models.Model): def confirm_cancel_order(self): """Fungsi ini akan dipanggil oleh wizard setelah alasan pembatalan dipilih""" + if self.state != 'cancel': + self.state = 'cancel' return super(SaleOrder, self).action_cancel() def validate_partner_invoice_due(self): -- cgit v1.2.3 From 74950ab252b92c23b2b5dc754fa4d86a28052145 Mon Sep 17 00:00:00 2001 From: trisusilo48 Date: Fri, 28 Feb 2025 09:57:52 +0700 Subject: update xml coretax --- indoteknik_custom/models/coretax_fatur.py | 1 + 1 file changed, 1 insertion(+) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/coretax_fatur.py b/indoteknik_custom/models/coretax_fatur.py index 706a4f44..fec53779 100644 --- a/indoteknik_custom/models/coretax_fatur.py +++ b/indoteknik_custom/models/coretax_fatur.py @@ -59,6 +59,7 @@ class CoretaxFaktur(models.Model): ET.SubElement(tax_invoice, 'TrxCode').text = '04' ET.SubElement(tax_invoice, 'AddInfo') ET.SubElement(tax_invoice, 'CustomDoc') + ET.SubElement(tax_invoice, 'CustomDocMonthYearCustomDocMonthYear') ET.SubElement(tax_invoice, 'RefDesc').text = invoice.name ET.SubElement(tax_invoice, 'FacilityStamp') ET.SubElement(tax_invoice, 'SellerIDTKU').text = '0742260227086000000000' -- cgit v1.2.3 From d67c586c80d87e7e2f3da703cd04e6680fbd62b7 Mon Sep 17 00:00:00 2001 From: trisusilo48 Date: Fri, 28 Feb 2025 10:47:57 +0700 Subject: update bugs coretax xml --- indoteknik_custom/models/coretax_fatur.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/coretax_fatur.py b/indoteknik_custom/models/coretax_fatur.py index fec53779..b4bffbd2 100644 --- a/indoteknik_custom/models/coretax_fatur.py +++ b/indoteknik_custom/models/coretax_fatur.py @@ -59,7 +59,7 @@ class CoretaxFaktur(models.Model): ET.SubElement(tax_invoice, 'TrxCode').text = '04' ET.SubElement(tax_invoice, 'AddInfo') ET.SubElement(tax_invoice, 'CustomDoc') - ET.SubElement(tax_invoice, 'CustomDocMonthYearCustomDocMonthYear') + ET.SubElement(tax_invoice, 'CustomDocMonthYear') ET.SubElement(tax_invoice, 'RefDesc').text = invoice.name ET.SubElement(tax_invoice, 'FacilityStamp') ET.SubElement(tax_invoice, 'SellerIDTKU').text = '0742260227086000000000' -- cgit v1.2.3 From 7c675cd5bc9f45d2ebca33a63b7184cbb97f0f2f Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Mon, 3 Mar 2025 09:16:21 +0700 Subject: CR safa add log note when product detail change --- indoteknik_custom/models/requisition.py | 42 ++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/requisition.py b/indoteknik_custom/models/requisition.py index c972b485..1d350929 100644 --- a/indoteknik_custom/models/requisition.py +++ b/indoteknik_custom/models/requisition.py @@ -276,10 +276,11 @@ class RequisitionLine(models.Model): _name = 'requisition.line' _description = 'Requisition Line' _order = 'requisition_id, id' + _inherit = ['mail.thread'] requisition_id = fields.Many2one('requisition', string='Ref', required=True, ondelete='cascade', index=True, copy=False) brand_id = fields.Many2one('x_manufactures', string='Brand') - product_id = fields.Many2one('product.product', string='Product') + product_id = fields.Many2one('product.product', string='Product', tracking=3,) partner_id = fields.Many2one('res.partner', string='Vendor') qty_purchase = fields.Float(string='Qty Purchase') price_unit = fields.Float(string='Price') @@ -331,6 +332,45 @@ class RequisitionLine(models.Model): line.taxes_id = taxes line.partner_id = purchase_pricelist.vendor_id.id + @api.model + def create(self, vals): + record = super(RequisitionLine, self).create(vals) + record._track_changes('Tambah') + return record + + def write(self, vals): + for record in self: + old_values = {field: record[field] for field in vals if field in record} + + result = super(RequisitionLine, self).write(vals) + + for record in self: + record._track_changes('Updated', old_values) + + return result + + def unlink(self): + for record in self: + record._track_changes('Hapus') + return super(RequisitionLine, self).unlink() + + def _track_changes(self, action, old_values=None): + message = f"Produk telah di-{action} :
" + if action == 'Tambah': + # message += f"
Product: {self.product_id.name}" + message += f"Product: {self.product_id.name}
Vendor: {self.partner_id.name}
Qty: {self.qty_purchase}
Price: {self.price_unit}
Tax: {self.tax_id.name}
Subtotal: {self.subtotal}
Brand: {self.brand_id.x_name}" + elif action == 'Hapus': + # message += f"
Deleted Product: {self.product_id.name}" + message += f"
Deleted Product: {self.product_id.name}
Vendor: {self.partner_id.name} Qty: {self.qty_purchase}
Price: {self.price_unit}
Tax: {self.tax_id.name}
Subtotal: {self.subtotal}
Brand: {self.brand_id.x_name}" + else: # Updated + for field, old_value in old_values.items(): + new_value = self[field] + if old_value != new_value: + field_label = self._fields[field].string # Ambil nama label field + message += f"{field_label}: {old_value} -> {new_value}
" + + if self.requisition_id: + self.requisition_id.message_post(body=message) class RequisitionPurchaseMatch(models.Model): _name = 'requisition.purchase.match' -- cgit v1.2.3