From f9f4b55c57461fa7cb0a4d3fb6fc9e85f53fe9c2 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Mon, 26 Dec 2022 17:39:05 +0700 Subject: window sales target --- indoteknik_custom/models/__init__.py | 1 + indoteknik_custom/models/product_template.py | 16 +++++++++ indoteknik_custom/models/sales_target.py | 54 ++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 indoteknik_custom/models/sales_target.py (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index dc85ce96..c8cd85b5 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -35,3 +35,4 @@ from . import website_user_wishlist from . import website_brand_homepage from . import mail_mail from . import website_categories_homepage +from . import sales_target diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py index 9ddaf91c..dbbd4ad4 100755 --- a/indoteknik_custom/models/product_template.py +++ b/indoteknik_custom/models/product_template.py @@ -36,6 +36,14 @@ class ProductTemplate(models.Model): search_rank = fields.Integer(string='Search Rank', default=0) search_rank_weekly = fields.Integer(string='Search Rank Weekly', default=0) supplier_url = fields.Char(string='Vendor URL') + # custom field for support Trusco products + maker_code = fields.Char(string='Maker Code') + maker_name = fields.Char(string='Maker Name') + origin = fields.Char(string='Origin') + features = fields.Char(string='Features') + usage = fields.Char(string='Usage') + specification = fields.Char(string='Specification') + material = fields.Char(string='Material') # def write(self, vals): # if 'solr_flag' not in vals and self.solr_flag == 1: @@ -182,6 +190,14 @@ class ProductProduct(models.Model): 'Qty Stock Vendor', compute='_compute_stock_vendor', help="Stock Vendor") solr_flag = fields.Integer(string='Solr Flag', default=0) + # custom field for support Trusco products + maker_code = fields.Char(string='Maker Code') + maker_name = fields.Char(string='Maker Name') + origin = fields.Char(string='Origin') + features = fields.Char(string='Features') + usage = fields.Char(string='Usage') + specification = fields.Char(string='Specification') + material = fields.Char(string='Material') # def write(self, vals): # if 'solr_flag' not in vals: diff --git a/indoteknik_custom/models/sales_target.py b/indoteknik_custom/models/sales_target.py new file mode 100644 index 00000000..5d2d6310 --- /dev/null +++ b/indoteknik_custom/models/sales_target.py @@ -0,0 +1,54 @@ +from odoo import fields, models, api +from datetime import datetime, timedelta +import logging + +_logger = logging.getLogger(__name__) + + +class SalesTarget(models.Model): + _name = 'sales.target' + + partner_id = fields.Many2one('res.partner', string='Customer') + period = fields.Integer(string='Periode') + omset_last_year = fields.Float(string='Omset Tahun Lalu') + ongoing_omset_odoo = fields.Float(string='Omset Berjalan Odoo', compute='_compute_ongoing_omset') + ongoing_omset_accurate = fields.Float(string='Omset Berjalan Accurate') + ongoing_omset_adempiere = fields.Float(string='Omset Berjalan ADempiere') + ongoing_omset_total = fields.Float(string='Total Omset', compute='_compute_total_omset') + + def _compute_total_omset(self): + for target in self: + target.ongoing_omset_total = target.ongoing_omset_odoo + target.ongoing_omset_accurate + target.ongoing_omset_adempiere + + def _compute_ongoing_omset(self): + for target in self: + target.ongoing_omset_odoo = 0 + if not target.ids: + return True + + partners = [] + if target.partner_id.parent_id: + parent_id = target.partner_id.parent_id + else: + parent_id = target.partner_id + partners += parent_id.child_ids + partners.append(parent_id) + + datefrom = datetime(target.period, 1, 1, 00, 00) + # datefrom = datefrom.strftime('%Y-%m-%d %H:%M:%S') + dateto = datetime(target.period, 12, 31, 23, 59) + # dateto = dateto.strftime('%Y-%m-%d %H:%M:%S') + + total_omset = 0 + for partner in partners: + domain = [ + ('partner_id', '=', partner.id), + ('state', 'not in', ['draft', 'cancel']), + ('move_type', 'in', ('out_invoice', 'out_refund')), + ('invoice_date', '>=', datefrom), + ('invoice_date', '<=', dateto) + ] + invoices = target.env['account.move'].search(domain) + for invoice in invoices: + total_omset += invoice.amount_untaxed + target.ongoing_omset_odoo = total_omset -- cgit v1.2.3 From 0e8be12adad9943dd4a86a31fc0bdf64a74f5db0 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Mon, 26 Dec 2022 17:51:33 +0700 Subject: add missing field target in window sales target --- indoteknik_custom/models/sales_target.py | 1 + 1 file changed, 1 insertion(+) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/sales_target.py b/indoteknik_custom/models/sales_target.py index 5d2d6310..ac6405e5 100644 --- a/indoteknik_custom/models/sales_target.py +++ b/indoteknik_custom/models/sales_target.py @@ -15,6 +15,7 @@ class SalesTarget(models.Model): ongoing_omset_accurate = fields.Float(string='Omset Berjalan Accurate') ongoing_omset_adempiere = fields.Float(string='Omset Berjalan ADempiere') ongoing_omset_total = fields.Float(string='Total Omset', compute='_compute_total_omset') + target = fields.Float(string='Target') def _compute_total_omset(self): for target in self: -- cgit v1.2.3 From 9d4ec4d054858368d21a1efc9f58f1fbd080baaf Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Mon, 2 Jan 2023 11:28:12 +0700 Subject: change logic for po status and add table for product spec trusco --- indoteknik_custom/models/__init__.py | 1 + indoteknik_custom/models/product_spec.py | 19 +++++++++++++++++++ indoteknik_custom/models/purchase_order.py | 20 +++++++++++++++----- 3 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 indoteknik_custom/models/product_spec.py (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index c8cd85b5..356f69f0 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -36,3 +36,4 @@ from . import website_brand_homepage from . import mail_mail from . import website_categories_homepage from . import sales_target +from . import product_spec diff --git a/indoteknik_custom/models/product_spec.py b/indoteknik_custom/models/product_spec.py new file mode 100644 index 00000000..161438b6 --- /dev/null +++ b/indoteknik_custom/models/product_spec.py @@ -0,0 +1,19 @@ +from odoo import fields, models, api +from datetime import datetime, timedelta +import logging + +_logger = logging.getLogger(__name__) + + +class ProductTemplateSpec(models.Model): + _name = 'product.template.spec' + product_tmpl_id = fields.Many2one('product.template', string='Product Template') + attribute = fields.Char(string='Attribute', help='Attribute of Product') + value = fields.Char(string='Values', help='Value of Attribute') + + +class ProductVariantSpec(models.Model): + _name = 'product.variant.spec' + product_variant_id = fields.Many2one('product.product', string='Product Variant') + attribute = fields.Char(string='Attribute', help='Attribute of Product') + value = fields.Char(string='Values', help='Value of Attribute') diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index a816038e..b4d671b6 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -70,19 +70,29 @@ class PurchaseOrder(models.Model): def calculate_po_status(self): purchases = self.env['purchase.order'].search([ ('po_status', '!=', 'terproses'), + # ('id', '=', 213), ]) for order in purchases: sum_qty_received = sum_qty_po = 0 + + have_outstanding_pick = False + for pick in order.picking_ids: + if pick.state == 'draft' or pick.state == 'assigned' or pick.state == 'confirmed' or pick.state == 'waiting': + have_outstanding_pick = True + for po_line in order.order_line: sum_qty_po += po_line.product_uom_qty sum_qty_received += po_line.qty_received - if order.summary_qty_po == order.summary_qty_receipt: - order.po_status = 'terproses' - elif order.summary_qty_po > order.summary_qty_receipt > 0: - order.po_status = 'sebagian' + if have_outstanding_pick: + # if order.summary_qty_po == order.summary_qty_receipt: + # order.po_status = 'terproses' + if order.summary_qty_po > order.summary_qty_receipt > 0: + order.po_status = 'sebagian' + else: + order.po_status = 'menunggu' else: - order.po_status = 'menunggu' + order.po_status = 'terproses' _logger.info("Calculate PO Status %s" % order.id) def _compute_summary_qty(self): -- cgit v1.2.3 From 52016c0ba728b92c913b560d0302a07f12ddfb9c Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Mon, 2 Jan 2023 14:24:45 +0700 Subject: add window purchase outstanding for check incoming qty --- indoteknik_custom/models/__init__.py | 1 + indoteknik_custom/models/purchase_outstanding.py | 32 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 indoteknik_custom/models/purchase_outstanding.py (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index 356f69f0..f853b1ed 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -37,3 +37,4 @@ from . import mail_mail from . import website_categories_homepage from . import sales_target from . import product_spec +from . import purchase_outstanding diff --git a/indoteknik_custom/models/purchase_outstanding.py b/indoteknik_custom/models/purchase_outstanding.py new file mode 100644 index 00000000..0cdd9c39 --- /dev/null +++ b/indoteknik_custom/models/purchase_outstanding.py @@ -0,0 +1,32 @@ +from odoo import fields, models, api, tools + + +class PurchaseOutstanding(models.Model): + _name = 'purchase.outstanding' + _auto = False + _rec_name = 'product_id' + + id = fields.Integer() + order_id = fields.Many2one('purchase.order', string='Nomor PO') + partner_id = fields.Many2one('res.partner', String='Vendor') + date_order = fields.Datetime(string="Date Order") + po_state = fields.Char(string='State') + po_status = fields.Char(string='PO Status') + product_id = fields.Many2one('product.product', string='Product') + product_uom_qty = fields.Integer(string='Qty PO') + qty_received = fields.Integer(string='Qty Received') + + def init(self): + tools.drop_view_if_exists(self.env.cr, self._table) + self.env.cr.execute(""" + CREATE OR REPLACE VIEW %s AS( + select pol.id as id, po.id as order_id, po.partner_id, + po.date_order, po.state as po_state, po.po_status, + pol.product_id, pol.product_uom_qty, pol.qty_received + from purchase_order_line pol + join purchase_order po on po.id = pol.order_id + where 1=1 + and pol.product_uom_qty <> pol.qty_received + and po_status in ('sebagian','menunggu') + ) + """ % self._table) -- cgit v1.2.3 From 0d5114af051fed9575bc0d108a0fa14a13875f1b Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Mon, 2 Jan 2023 15:11:16 +0700 Subject: add so status for filter outstanding sales --- indoteknik_custom/models/sale_order.py | 63 +++++++++++++++++++++++++++++++++- 1 file changed, 62 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 f21a80fe..7f25f946 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -1,9 +1,11 @@ from odoo import fields, models, api, _ from odoo.exceptions import AccessError, UserError, ValidationError from odoo.tools.misc import formatLang, get_lang - +import logging import warnings +_logger = logging.getLogger(__name__) + class SaleOrder(models.Model): _inherit = "sale.order" @@ -42,6 +44,65 @@ class SaleOrder(models.Model): domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]", help="Dipakai untuk alamat tempel") fee_third_party = fields.Float('Fee Pihak Ketiga') + so_status = fields.Selection([ + ('terproses', 'Terproses'), + ('sebagian', 'Sebagian Diproses'), + ('menunggu', 'Menunggu Diproses'), + ]) + + def calculate_so_status_beginning(self): + so_state = ['sale'] + sales = self.env['sale.order'].search([ + ('state', 'in', so_state),# must add validation so_status + ]) + for sale in sales: + sum_qty_ship = sum_qty_so = 0 + have_outstanding_pick = False + + for pick in sale.picking_ids: + if pick.state == 'draft' or pick.state == 'assigned' or pick.state == 'confirmed' or pick.state == 'waiting': + have_outstanding_pick = True + + for so_line in sale.order_line: + sum_qty_so += so_line.product_uom_qty + sum_qty_ship += so_line.qty_delivered + + if have_outstanding_pick: + if sum_qty_so > sum_qty_ship > 0: + sale.so_status = 'sebagian' + else: + sale.so_status = 'menunggu' + else: + sale.so_status = 'terproses' + _logger.info('Calculate SO Status %s' % sale.id) + + def calculate_so_status(self): + so_state = ['sale'] + so_status = ['sebagian', 'menunggu'] + sales = self.env['sale.order'].search([ + ('state', 'in', so_state), + ('so_status', 'in', so_status), + ]) + for sale in sales: + sum_qty_ship = sum_qty_so = 0 + have_outstanding_pick = False + + for pick in sale.pciking_ids: + if pick.state == 'draft' or pick.state == 'assigned' or pick.state == 'confirmed' or pick.state == 'waiting': + have_outstanding_pick = True + + for so_line in sale.order_line: + sum_qty_so += so_line.product_uom_qty + sum_qty_ship += so_line.qty_delivered + + if have_outstanding_pick: + if sum_qty_so > sum_qty_ship > 0: + sale.so_status = 'sebagian' + else: + sale.so_status = 'menunggu' + else: + sale.so_status = 'terproses' + _logger.info('Calculate SO Status %s' % sale.id) @api.onchange('partner_shipping_id') def onchange_partner_shipping(self): -- cgit v1.2.3 From ddaef3895870403548d032a892a3365de38c016c Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Mon, 2 Jan 2023 15:31:46 +0700 Subject: add sales outstanding for monitoring outgoing qty, and add sales person, purchaser --- indoteknik_custom/models/__init__.py | 1 + indoteknik_custom/models/purchase_outstanding.py | 3 ++- indoteknik_custom/models/sales_outstanding.py | 33 ++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 indoteknik_custom/models/sales_outstanding.py (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index f853b1ed..193fd132 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -38,3 +38,4 @@ from . import website_categories_homepage from . import sales_target from . import product_spec from . import purchase_outstanding +from . import sales_outstanding diff --git a/indoteknik_custom/models/purchase_outstanding.py b/indoteknik_custom/models/purchase_outstanding.py index 0cdd9c39..018ab0ec 100644 --- a/indoteknik_custom/models/purchase_outstanding.py +++ b/indoteknik_custom/models/purchase_outstanding.py @@ -9,6 +9,7 @@ class PurchaseOutstanding(models.Model): id = fields.Integer() order_id = fields.Many2one('purchase.order', string='Nomor PO') partner_id = fields.Many2one('res.partner', String='Vendor') + user_id = fields.Many2one('res.users', string='Purchaser') date_order = fields.Datetime(string="Date Order") po_state = fields.Char(string='State') po_status = fields.Char(string='PO Status') @@ -20,7 +21,7 @@ class PurchaseOutstanding(models.Model): tools.drop_view_if_exists(self.env.cr, self._table) self.env.cr.execute(""" CREATE OR REPLACE VIEW %s AS( - select pol.id as id, po.id as order_id, po.partner_id, + select pol.id as id, po.id as order_id, po.partner_id, po.user_id, po.date_order, po.state as po_state, po.po_status, pol.product_id, pol.product_uom_qty, pol.qty_received from purchase_order_line pol diff --git a/indoteknik_custom/models/sales_outstanding.py b/indoteknik_custom/models/sales_outstanding.py new file mode 100644 index 00000000..645482ff --- /dev/null +++ b/indoteknik_custom/models/sales_outstanding.py @@ -0,0 +1,33 @@ +from odoo import fields, models, api, tools + + +class SalesOutstanding(models.Model): + _name = 'sales.outstanding' + _auto = False + _rec_name = 'product_id' + + id = fields.Integer() + order_id = fields.Many2one('sale.order', string='Nomor SO') + partner_id = fields.Many2one('res.partner', String='Customer') + user_id = fields.Many2one('res.users', string='Salesperson') + date_order = fields.Datetime(string="Date Order") + so_state = fields.Char(string='State') + so_status = fields.Char(string='SO Status') + product_id = fields.Many2one('product.product', string='Product') + product_uom_qty = fields.Integer(string='Qty SO') + qty_delivered = fields.Integer(string='Qty Delivered') + + def init(self): + tools.drop_view_if_exists(self.env.cr, self._table) + self.env.cr.execute(""" + CREATE OR REPLACE VIEW %s AS( + select sol.id as id, so.id as order_id, so.partner_id, so.user_id, + so.date_order, so.state as so_state, so.so_status, + sol.product_id, sol.product_uom_qty, sol.qty_delivered + from sale_order so + join sale_order_line sol on sol.order_id = so.id + where 1=1 + and sol.product_uom_qty <> sol.qty_delivered + and so_status in ('sebagian','menunggu') + ) + """ % self._table) -- cgit v1.2.3 From fbea3ab095059a101d32c2f5e4f5b0f309705d28 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 3 Jan 2023 09:35:07 +0700 Subject: fix typo calculate status 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 7f25f946..f0792114 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -87,7 +87,7 @@ class SaleOrder(models.Model): sum_qty_ship = sum_qty_so = 0 have_outstanding_pick = False - for pick in sale.pciking_ids: + for pick in sale.picking_ids: if pick.state == 'draft' or pick.state == 'assigned' or pick.state == 'confirmed' or pick.state == 'waiting': have_outstanding_pick = True -- cgit v1.2.3 From 083e4ab620edc20534992d6dd8b891796ecb35ce Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 3 Jan 2023 11:31:57 +0700 Subject: add window dynamic customer review --- indoteknik_custom/models/__init__.py | 1 + indoteknik_custom/models/customer_review.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 indoteknik_custom/models/customer_review.py (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index 193fd132..1190e7d0 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -39,3 +39,4 @@ from . import sales_target from . import product_spec from . import purchase_outstanding from . import sales_outstanding +from . import customer_review diff --git a/indoteknik_custom/models/customer_review.py b/indoteknik_custom/models/customer_review.py new file mode 100644 index 00000000..5fb93b2e --- /dev/null +++ b/indoteknik_custom/models/customer_review.py @@ -0,0 +1,16 @@ +from odoo import fields, models, api + + +class CustomerReview(models.Model): + _name = 'customer.review' + + sequence = fields.Integer(string='Sequence') + customer_name = fields.Char(string='Customer') + image = fields.Binary(string='Image') + ulasan = fields.Char(string='Ulasan') + name = fields.Char(string='Name') + jabatan = fields.Char(string='Jabatan') + status = fields.Selection([ + ('tayang', 'Tayang'), + ('tidak_tayang', 'Tidak Tayang') + ], string='Status') -- cgit v1.2.3 From 69c476bba84a7cb2b33e8b45bc1ea7d140333b2f Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 3 Jan 2023 17:40:36 +0700 Subject: add cache reset per brand --- indoteknik_custom/models/x_manufactures.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/x_manufactures.py b/indoteknik_custom/models/x_manufactures.py index 24b64c14..1d215cf8 100755 --- a/indoteknik_custom/models/x_manufactures.py +++ b/indoteknik_custom/models/x_manufactures.py @@ -1,5 +1,7 @@ from odoo import models, fields, api +import logging +_logger = logging.getLogger(__name__) class XManufactures(models.Model): _name = 'x_manufactures' @@ -36,6 +38,24 @@ class XManufactures(models.Model): ], string="Jenis Produk") x_short_desc = fields.Text(string="Short Description") product_tmpl_ids = fields.One2many('product.template', 'x_manufacture', string='Product Templates') + cache_reset_status = fields.Selection([ + ('reset', 'Reset'), + ('done', 'Done') + ], string="Cache Reset") + + def cache_reset(self): + manufactures = self.env['x_manufactures'].search([ + ('cache_reset_status', '=', 'reset'), + ]) + for manufacture in manufactures: + products = self.env['product.template'].search([ + ('x_manufacture', '=', manufacture.id), + ('solr_flag', '=', 1), + ]) + for product in products: + product.solr_flag = 2 + _logger.info("Reset Solr Flag to 2 %s" % product.id) + manufacture.cache_reset_status = 'done' @api.onchange('x_name','image_promotion_1','image_promotion_2') def update_solr_flag(self): -- cgit v1.2.3 From 2bc877dcbe21138451a65aa00f75f2ca240b0e4a Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Wed, 4 Jan 2023 11:04:01 +0700 Subject: add window website channel and website content --- indoteknik_custom/models/__init__.py | 1 + indoteknik_custom/models/website_content.py | 34 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 indoteknik_custom/models/website_content.py (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index 1190e7d0..d7d3e03c 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -40,3 +40,4 @@ from . import product_spec from . import purchase_outstanding from . import sales_outstanding from . import customer_review +from . import website_content diff --git a/indoteknik_custom/models/website_content.py b/indoteknik_custom/models/website_content.py new file mode 100644 index 00000000..e94076f8 --- /dev/null +++ b/indoteknik_custom/models/website_content.py @@ -0,0 +1,34 @@ +from odoo import fields, models, api +import logging + +_logger = logging.getLogger(__name__) + + +class WebsiteContent(models.Model): + _name = 'website.content' + + sequence = fields.Integer(string='Sequence') + slide_type = fields.Selection([ + ('document', 'Document'), + ('infographic', 'Infographic'), + ('presentation', 'Presentation'), + ('video', 'Video') + ]) + name = fields.Char(string='Name') + url = fields.Char(string='URL') + channel_id = fields.Many2one('website.content.channel', string='Channel') + status = fields.Selection([ + ('tayang', 'Tayang'), + ('tidak_tayang', 'Tidak Tayang') + ], string='Status') + + +class WebsiteContentChannel(models.Model): + _name = 'website.content.channel' + + name = fields.Char(string='Name') + description_html = fields.Html('Description', sanitize_attributes=False, sanitize_form=False) + visibility = fields.Selection([ + ('public', 'Public'), + ('internal', 'Internal') + ]) -- cgit v1.2.3 From 43b20f27ca04037139b1775e6db2bfcc2fe5b851 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 4 Jan 2023 14:16:38 +0700 Subject: Customer PO --- indoteknik_custom/models/sale_order.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index f0792114..3f6f5032 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -49,6 +49,9 @@ class SaleOrder(models.Model): ('sebagian', 'Sebagian Diproses'), ('menunggu', 'Menunggu Diproses'), ]) + partner_purchase_order_name = fields.Char(string='Nama PO Customer', copy=False, help="Nama purchase order customer, diisi oleh customer melalui website.", tracking=3) + partner_purchase_order_description = fields.Text(string='Keterangan PO Customer', copy=False, help="Keterangan purchase order customer, diisi oleh customer melalui website.", tracking=3) + partner_purchase_order_file = fields.Binary(string='File PO Customer', copy=False, help="File purchase order customer, diisi oleh customer melalui website.") def calculate_so_status_beginning(self): so_state = ['sale'] -- cgit v1.2.3