diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-01-24 11:43:52 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-01-24 11:43:52 +0700 |
| commit | 2a3a0a7e88ef24456eeda070a7d74f1457efdb18 (patch) | |
| tree | 2bb4cd374d46b5d5e4fb6e32fe239c5ccc83daf4 | |
| parent | 287cf8497b4b6bb825870ee2b3d1b49d4c29ab6a (diff) | |
| parent | 646b9e22fc11f6f1d1b556761a3df2df61f8f59b (diff) | |
Merge branch 'release' into staging
| -rw-r--r-- | indoteknik_api/controllers/api_v1/content.py | 31 | ||||
| -rw-r--r-- | indoteknik_api/controllers/api_v1/product.py | 8 | ||||
| -rw-r--r-- | indoteknik_api/models/product_product.py | 8 | ||||
| -rw-r--r-- | indoteknik_api/models/product_template.py | 13 | ||||
| -rw-r--r-- | indoteknik_api/models/x_manufactures.py | 7 | ||||
| -rwxr-xr-x | indoteknik_custom/models/crm_lead.py | 9 | ||||
| -rw-r--r-- | indoteknik_custom/models/ir_attachment.py | 15 | ||||
| -rwxr-xr-x | indoteknik_custom/models/sale_monitoring.py | 58 | ||||
| -rwxr-xr-x | indoteknik_custom/models/sale_monitoring_detail.py | 98 | ||||
| -rwxr-xr-x | indoteknik_custom/models/stock_vendor.py | 36 | ||||
| -rwxr-xr-x | indoteknik_custom/models/user_activity_log.py | 3 | ||||
| -rwxr-xr-x | indoteknik_custom/views/sale_monitoring.xml | 5 | ||||
| -rwxr-xr-x | indoteknik_custom/views/sale_monitoring_detail.xml | 5 | ||||
| -rwxr-xr-x | indoteknik_custom/views/stock_vendor.xml | 2 |
14 files changed, 205 insertions, 93 deletions
diff --git a/indoteknik_api/controllers/api_v1/content.py b/indoteknik_api/controllers/api_v1/content.py index 3d4e443a..32828244 100644 --- a/indoteknik_api/controllers/api_v1/content.py +++ b/indoteknik_api/controllers/api_v1/content.py @@ -6,6 +6,37 @@ from odoo.http import request class WebsiteContent(controller.Controller): prefix = '/api/v1/' + @http.route(prefix + 'banner', auth='public', methods=['GET', 'OPTIONS']) + def get_banner(self, **kw): + if not self.authenticate(): + return self.response(code=401, description='Unauthorized') + base_url = request.env['ir.config_parameter'].get_param('web.base.url') + + category_id = int(kw.get('category_id'), 0) + query = [ + ('x_status_banner', '=', 'tayang'), + ] + + if category_id > 0: + query = [ + ('x_status_banner', '=', 'tayang'), + ('x_banner_category', '=', category_id), + ] + + data = [] + banners = request.env['x_banner.banner'].search(query) + for banner in banners: + data.append({ + # 'image': base_url + 'api/image/x_banner.banner/image' + str(banner.id) if banner.x_banner_image else '', + 'banner_image': request.env['ir.attachment'].api_image('x_banner.banner', 'x_banner_image', banner.id), + 'category_id': banner.x_banner_category.id, + 'category_image': banner.x_banner_category.x_name, + 'name': banner.x_name, + 'url': banner.x_url_banner, + 'status': banner.x_status_banner, + }) + return self.response(data) + @http.route(prefix + 'product_ads', auth='public', methods=['GET', 'OPTIONS']) def get_product_ads(self, **kw): if not self.authenticate(): diff --git a/indoteknik_api/controllers/api_v1/product.py b/indoteknik_api/controllers/api_v1/product.py index 78b03203..23dcf48e 100644 --- a/indoteknik_api/controllers/api_v1/product.py +++ b/indoteknik_api/controllers/api_v1/product.py @@ -19,6 +19,8 @@ class Product(controller.Controller): is_brand_only = int(kw.get('is_brand_only', 0)) base_url = request.env['ir.config_parameter'].get_param('web.base.url') + limit_new_products = request.env['ir.config_parameter'].get_param('limit.new.product') + limit_new_products = int(limit_new_products) # current_time = datetime.now() # delta_time = current_time - timedelta(days=30) @@ -28,9 +30,11 @@ class Product(controller.Controller): ('active', '=', True), ('image_128', '!=', False), ('website_description', '!=', False), + # ('write_uid', '!=', 1), + ('x_manufacture', '!=', False), # ('create_date', '>=', delta_time), ] - new_products = request.env['product.template'].search(query_products, order='create_date desc', limit=250) + new_products = request.env['product.template'].search(query_products, order='create_date desc', limit=limit_new_products) brands = [] for product in new_products: brands.append(product.x_manufacture) @@ -57,6 +61,8 @@ class Product(controller.Controller): ('x_manufacture', '=', brand.id), ('image_128', '!=', False), ('website_description', '!=', False), + # ('write_uid', '!=', 1), + ('x_manufacture', '!=', False), # ('create_date', '>=', delta_time), ] count_products = request.env['product.template'].search_count(query) diff --git a/indoteknik_api/models/product_product.py b/indoteknik_api/models/product_product.py index 6b02d91e..2e84b9f4 100644 --- a/indoteknik_api/models/product_product.py +++ b/indoteknik_api/models/product_product.py @@ -5,7 +5,6 @@ class ProductProduct(models.Model): _inherit = 'product.product' def api_single_response(self, product_product): - base_url = self.env['ir.config_parameter'].get_param('web.base.url') product_pricelist_default_discount_id = self.env['ir.config_parameter'].get_param('product.pricelist.default_discount_id') product_pricelist_default_discount_id = int(product_pricelist_default_discount_id) product_template = product_product.product_tmpl_id @@ -14,7 +13,7 @@ class ProductProduct(models.Model): 'parent': { 'id': product_template.id, 'name': product_template.name, - 'image': base_url + 'api/image/product.template/image_256/' + str(product_template.id) if product_template.image_256 else '', + 'image': self.env['ir.attachment'].api_image('product.template', 'image_256', product_template.id), }, 'code': product_product.default_code or '', 'name': product_product.display_name, @@ -27,13 +26,12 @@ class ProductProduct(models.Model): return data def api_manufacture(self, product_template): - base_url = self.env['ir.config_parameter'].get_param('web.base.url') if product_template.x_manufacture: manufacture = product_template.x_manufacture return { 'id': manufacture.id, 'name': manufacture.x_name, - 'image_promotion_1': base_url + 'api/image/x_manufactures/image_promotion_1/' + str(manufacture.id) if manufacture.image_promotion_1 else '', - 'image_promotion_2': base_url + 'api/image/x_manufactures/image_promotion_2/' + str(manufacture.id) if manufacture.image_promotion_2 else '', + 'image_promotion_1': self.env['ir.attachment'].api_image('x_manufactures', 'image_promotion_1', manufacture.id), + 'image_promotion_2': self.env['ir.attachment'].api_image('x_manufactures', 'image_promotion_2', manufacture.id), } return {}
\ No newline at end of file diff --git a/indoteknik_api/models/product_template.py b/indoteknik_api/models/product_template.py index 9e8d04bc..72dda17f 100644 --- a/indoteknik_api/models/product_template.py +++ b/indoteknik_api/models/product_template.py @@ -5,12 +5,11 @@ class ProductTemplate(models.Model): _inherit = 'product.template' def api_single_response(self, product_template, with_detail=''): - base_url = self.env['ir.config_parameter'].get_param('web.base.url') product_pricelist_default_discount_id = self.env['ir.config_parameter'].get_param('product.pricelist.default_discount_id') product_pricelist_default_discount_id = int(product_pricelist_default_discount_id) data = { 'id': product_template.id, - 'image': base_url + 'api/image/product.template/image_128/' + str(product_template.id) if product_template.image_128 else '', + 'image': self.env['ir.attachment'].api_image('product.template', 'image_128', product_template.id), 'code': product_template.default_code or '', 'name': product_template.name, 'lowest_price': self.env['product.pricelist'].get_lowest_product_variant_price(product_template, product_pricelist_default_discount_id), @@ -23,7 +22,7 @@ class ProductTemplate(models.Model): if with_detail != '': data_with_detail = { - 'image': base_url + 'api/image/product.template/image_512/' + str(product_template.id) if product_template.image_512 else '', + 'image': self.env['ir.attachment'].api_image('product.template', 'image_512', product_template.id), 'display_name': product_template.display_name, 'variants': [self.env['product.product'].api_single_response(variant) for variant in product_template.product_variant_ids], 'description': product_template.website_description or '', @@ -31,12 +30,13 @@ class ProductTemplate(models.Model): data.update(data_with_detail) if with_detail == 'SOLR': + is_image_found = self.env['ir.attachment'].is_found('product.template', 'image_128', product_template.id) rate = 0 if data['lowest_price']['price'] > 0: rate += 1 if product_template.have_promotion_program: rate += 1 - if product_template.image_128: + if is_image_found: rate += 1 if product_template.website_description: rate += 1 @@ -52,14 +52,13 @@ class ProductTemplate(models.Model): return data def api_manufacture(self, product_template): - base_url = self.env['ir.config_parameter'].get_param('web.base.url') if product_template.x_manufacture: manufacture = product_template.x_manufacture return { 'id': manufacture.id, 'name': manufacture.x_name, - 'image_promotion_1': base_url + 'api/image/x_manufactures/image_promotion_1/' + str(manufacture.id) if manufacture.image_promotion_1 else '', - 'image_promotion_2': base_url + 'api/image/x_manufactures/image_promotion_2/' + str(manufacture.id) if manufacture.image_promotion_2 else '', + 'image_promotion_1': self.env['ir.attachment'].api_image('x_manufactures', 'image_promotion_1', manufacture.id), + 'image_promotion_2': self.env['ir.attachment'].api_image('x_manufactures', 'image_promotion_2', manufacture.id), } return {} diff --git a/indoteknik_api/models/x_manufactures.py b/indoteknik_api/models/x_manufactures.py index 19fdcb9c..b85f6d27 100644 --- a/indoteknik_api/models/x_manufactures.py +++ b/indoteknik_api/models/x_manufactures.py @@ -5,19 +5,18 @@ class Manufactures(models.Model): _inherit = 'x_manufactures' def api_single_response(self, manufacture, with_detail=False): - base_url = self.env['ir.config_parameter'].get_param('web.base.url') data = { 'id': manufacture.id, - 'logo': base_url + 'api/image/x_manufactures/x_logo_manufacture/' + str(manufacture.id) if manufacture.x_logo_manufacture else '', + 'logo': self.env['ir.attachment'].api_image('x_manufactures', 'x_logo_manufacture', manufacture.id), 'name': manufacture.x_name } if with_detail: data_with_detail = { 'description': manufacture.x_short_desc, 'banners': [ - base_url + 'api/image/x_banner.banner/x_banner_image/' + str(x.id) + self.env['ir.attachment'].api_image('x_banner.banner', 'x_banner_image', x.id) for x in manufacture.x_manufactures_banners - if x.x_status_banner == 'tayang' and x.x_banner_image + if x.x_status_banner == 'tayang' ] } data.update(data_with_detail) diff --git a/indoteknik_custom/models/crm_lead.py b/indoteknik_custom/models/crm_lead.py index e0a90d9c..3c8b842b 100755 --- a/indoteknik_custom/models/crm_lead.py +++ b/indoteknik_custom/models/crm_lead.py @@ -11,6 +11,15 @@ class CrmLead(models.Model): file_siup = fields.Binary(string="Surat Izin Usaha Perdagangan") body_html_lead = fields.Text('Body HTML', compute='compute_body_leads') + def revert_to_leads(self): + opportunities = self.env['crm.lead'].search([ + ('type', '=', 'opportunity'), + ('active', '=', True), + ('user_id', '=', False), + ]) + for opportunity in opportunities: + opportunity.type = 'lead' + @api.onchange('stage_id') def update_stars(self): for lead in self: diff --git a/indoteknik_custom/models/ir_attachment.py b/indoteknik_custom/models/ir_attachment.py index 278eb938..fd86ab1b 100644 --- a/indoteknik_custom/models/ir_attachment.py +++ b/indoteknik_custom/models/ir_attachment.py @@ -9,4 +9,17 @@ class Attachment(models.Model): @api.autovacuum def _gc_file_store(self): - _logger.info("filestore gc checked, removed - override")
\ No newline at end of file + _logger.info("filestore gc checked, removed - override") + + def is_found(self, model, field, id): + attachment = self.search([ + ('res_model', '=', model), + ('res_field', '=', field), + ('res_id', '=', int(id)) + ]) + return True if attachment else False + + def api_image(self, model, field, id): + base_url = self.env['ir.config_parameter'].get_param('web.base.url') + is_found = self.is_found(model, field, id) + return base_url + 'api/image/' + model + '/' + field + '/' + str(id) if is_found else ''
\ No newline at end of file diff --git a/indoteknik_custom/models/sale_monitoring.py b/indoteknik_custom/models/sale_monitoring.py index a837a6bc..a3265a8b 100755 --- a/indoteknik_custom/models/sale_monitoring.py +++ b/indoteknik_custom/models/sale_monitoring.py @@ -1,5 +1,7 @@ from odoo import fields, models, api, tools +import logging +_logger = logging.getLogger(__name__) class SaleMonitoring(models.Model): _name = 'sale.monitoring' @@ -22,29 +24,35 @@ class SaleMonitoring(models.Model): def init(self): tools.drop_view_if_exists(self.env.cr, self._table) self.env.cr.execute(""" - CREATE OR REPLACE VIEW %s AS ( - SELECT - smd.sale_order_id AS id, - smd.date_order, - smd.sale_order_id, - smd.partner_id, - smd.user_id, - SUM(smd.qty_so) AS qty_so, - SUM(smd.qty_po) AS qty_po, - SUM(smd.qty_po_received) AS qty_po_received, - SUM(smd.qty_so_delivered) AS qty_so_delivered, - SUM(smd.qty_so_invoiced) AS qty_so_invoiced, - CASE - WHEN SUM(qty_po) < SUM(qty_so) AND SUM(qty_po) <= 0 THEN 'Belum PO sama sekali' - WHEN SUM(qty_po) < SUM(qty_so) THEN 'Belum PO full' - WHEN SUM(qty_po_received) < SUM(qty_so) AND SUM(qty_po_received) <= 0 THEN 'Belum Received sama sekali' - WHEN SUM(qty_po_received) < SUM(qty_so) THEN 'Belum Received full' - WHEN SUM(qty_to_delivered) = SUM(qty_so) THEN 'SIAP KIRIM' - WHEN SUM(qty_to_delivered) < SUM(qty_so) and SUM(qty_to_delivered) > 0 THEN 'KIRIM SISANYA' - ELSE 'Belum Invoiced' - END AS status, - get_po_number(smd.sale_order_id) as po_number - FROM sale_monitoring_detail smd - GROUP BY smd.date_order, smd.sale_order_id, smd.partner_id, smd.user_id - ) + CREATE OR REPLACE VIEW %s AS ( + SELECT + smd.sale_order_id AS id, + smd.date_order, + smd.sale_order_id, + smd.partner_id, + smd.user_id, + SUM(smd.qty_so) AS qty_so, + SUM(smd.qty_po) AS qty_po, + SUM(smd.qty_po_received) AS qty_po_received, + SUM(smd.qty_so_delivered) AS qty_so_delivered, + SUM(smd.qty_so_invoiced) AS qty_so_invoiced, + CASE + WHEN SUM(qty_po) < SUM(qty_so) AND SUM(qty_po) <= 0 THEN 'Belum PO sama sekali' + WHEN SUM(qty_po) < SUM(qty_so) THEN 'Belum PO full' + WHEN SUM(qty_po_received) < SUM(qty_so) AND SUM(qty_po_received) <= 0 THEN 'Belum Received sama sekali' + WHEN SUM(qty_po_received) < SUM(qty_so) THEN 'Belum Received full' + WHEN SUM(qty_to_delivered) = SUM(qty_so) THEN 'SIAP KIRIM' + WHEN SUM(qty_to_delivered) < SUM(qty_so) and SUM(qty_to_delivered) > 0 THEN 'KIRIM SISANYA' + ELSE 'Belum Invoiced' + END AS status, + get_po_number(smd.sale_order_id) as po_number + FROM sale_monitoring_detail smd + GROUP BY smd.date_order, smd.sale_order_id, smd.partner_id, smd.user_id + ) """ % self._table) + + def action_refresh(self): + _logger.info("Refresh %s View Starting..." % self._table) + self.env.cr.execute("REFRESH MATERIALIZED VIEW sale_monitoring_detail") + _logger.info("Refresh %s View Success" % self._table) +
\ No newline at end of file diff --git a/indoteknik_custom/models/sale_monitoring_detail.py b/indoteknik_custom/models/sale_monitoring_detail.py index d766cecd..553ec21f 100755 --- a/indoteknik_custom/models/sale_monitoring_detail.py +++ b/indoteknik_custom/models/sale_monitoring_detail.py @@ -1,4 +1,7 @@ from odoo import fields, models, api, tools +import logging + +_logger = logging.getLogger(__name__) class SaleMonitoringDetail(models.Model): @@ -20,45 +23,62 @@ class SaleMonitoringDetail(models.Model): status = fields.Char(string="Status") def init(self): - tools.drop_view_if_exists(self.env.cr, self._table) + self._drop_view() + self.env.cr.execute("SELECT matviewname from pg_matviews where schemaname = 'public' and matviewname = '%s'" % self._table) + materialized_view = self.env.cr.fetchone() + if materialized_view is None: + self._init_materialized_view() + + def action_refresh(self): + _logger.info("Refresh %s View Starting..." % self._table) + self.env.cr.execute("REFRESH MATERIALIZED VIEW %s" % self._table) + _logger.info("Refresh %s View Success" % self._table) + + def _drop_view(self): + self.env.cr.execute("SELECT viewname from pg_views where schemaname = 'public' and viewname = '%s'" % self._table) + standard_view = self.env.cr.fetchone() + if standard_view is not None: + self.env.cr.execute("DROP VIEW %s CASCADE" % self._table) + + def _init_materialized_view(self): self.env.cr.execute(""" - CREATE OR REPLACE VIEW %s AS ( - SELECT - *, - CASE - WHEN qty_po < qty_so AND qty_po <= 0 THEN 'Belum PO sama sekali' - WHEN qty_po < qty_so THEN 'Belum PO full' - WHEN qty_po_received < qty_so and qty_po_received <= 0 THEN 'Belum Received sama sekali' - WHEN qty_po_received < qty_so THEN 'Belum Received full' - WHEN qty_to_delivered = qty_so THEN 'SIAP KIRIM' - WHEN qty_to_delivered < qty_so and qty_to_delivered > 0 THEN 'KIRIM SISANYA' - ELSE 'Belum Invoiced' - END AS status - FROM - ( + CREATE MATERIALIZED VIEW %s AS ( SELECT - sol.id AS id, - so.id AS sale_order_id, - so.partner_id as partner_id, - so.user_id, - p.id AS product_id, - sol.product_uom_qty AS qty_so, - sol.qty_delivered AS qty_so_delivered, - get_qty_to_delivered(sol.id) as qty_to_delivered, - sol.qty_invoiced AS qty_so_invoiced, - so.date_order AS date_order, - get_qty_po(so.id, sol.product_id) AS qty_po, - get_qty_received(so.id, sol.product_id) AS qty_po_received - FROM sale_order so - JOIN sale_order_line sol ON sol.order_id = so.id - JOIN product_product p ON p.id = sol.product_id - JOIN product_template pt ON pt.id = p.product_tmpl_id - WHERE pt.type IN ('consu','product') - AND so.state IN ('sale','done') - AND so.create_date >= '2022-08-10' - ) a - WHERE - a.qty_so_delivered > a.qty_so_invoiced - or a.qty_to_delivered > 0 - ) + *, + CASE + WHEN qty_po < qty_so AND qty_po <= 0 THEN 'Belum PO sama sekali' + WHEN qty_po < qty_so THEN 'Belum PO full' + WHEN qty_po_received < qty_so and qty_po_received <= 0 THEN 'Belum Received sama sekali' + WHEN qty_po_received < qty_so THEN 'Belum Received full' + WHEN qty_to_delivered = qty_so THEN 'SIAP KIRIM' + WHEN qty_to_delivered < qty_so and qty_to_delivered > 0 THEN 'KIRIM SISANYA' + ELSE 'Belum Invoiced' + END AS status + FROM + ( + SELECT + sol.id AS id, + so.id AS sale_order_id, + so.partner_id as partner_id, + so.user_id, + p.id AS product_id, + sol.product_uom_qty AS qty_so, + sol.qty_delivered AS qty_so_delivered, + get_qty_to_delivered(sol.id) as qty_to_delivered, + sol.qty_invoiced AS qty_so_invoiced, + so.date_order AS date_order, + get_qty_po(so.id, sol.product_id) AS qty_po, + get_qty_received(so.id, sol.product_id) AS qty_po_received + FROM sale_order so + JOIN sale_order_line sol ON sol.order_id = so.id + JOIN product_product p ON p.id = sol.product_id + JOIN product_template pt ON pt.id = p.product_tmpl_id + WHERE pt.type IN ('consu','product') + AND so.state IN ('sale','done') + AND so.create_date >= '2022-08-10' + ) a + WHERE + a.qty_so_delivered > a.qty_so_invoiced + or a.qty_to_delivered > 0 + ) """ % self._table) diff --git a/indoteknik_custom/models/stock_vendor.py b/indoteknik_custom/models/stock_vendor.py index 1a6b4a64..1e5bce16 100755 --- a/indoteknik_custom/models/stock_vendor.py +++ b/indoteknik_custom/models/stock_vendor.py @@ -11,27 +11,47 @@ class StockVendor(models.Model): product_variant_id = fields.Many2one("product.product", string="Product Variant") quantity = fields.Integer(string="Quantity") + cache_reset_status = fields.Selection([ + ('reset', 'Reset'), + ('done', 'Done') + ], string="Cache Reset") + + def cache_reset(self): + stocks = self.env['stock.vendor'].search([ + ('cache_reset_status', '=', 'reset'), + ]) + + templates = [] + for stock in stocks: + templates.append(stock.product_variant_id.product_tmpl_id) + # stock.cache_reset_status = 'done' + templates = list(dict.fromkeys(templates)) + + for template in templates: + if template.solr_flag == 1: + template.solr_flag = 2 + _logger.info('Update Solr Flag to 2 %s' % template.name) def update_product_template(self): updated_virtual_qty_product_template = self.env['ir.config_parameter'].search([('key', '=', 'updated_virtual_qty_product_template')], limit=1) updated_virtual_qty_product_template_value = int(updated_virtual_qty_product_template.value) - + limit = 10000 query = [('active', '=', True), ('type', '=', 'product')] templates = self.env['product.template'].search(query, limit=limit, offset=updated_virtual_qty_product_template_value) template_count = self.env['product.template'].search_count(query) - + if (updated_virtual_qty_product_template_value + limit) > template_count: updated_virtual_qty_product_template.value = '0' else: updated_virtual_qty_product_template.value = str(limit + updated_virtual_qty_product_template_value) - + for template in templates: template.virtual_qty = template.qty_stock_vendor or 0 _logger.info("Update Stock Product Template %s : %s" % (template.id, template.virtual_qty)) - @api.onchange('quantity') - def update_solr_flag(self): - for stock in self: - if stock.product_variant_id.product_tmpl_id.solr_flag == 1: - stock.product_variant_id.product_tmpl_id.solr_flag = 2 + # @api.onchange('quantity') + # def update_solr_flag(self): + # for stock in self: + # if stock.product_variant_id.product_tmpl_id.solr_flag == 1: + # stock.product_variant_id.product_tmpl_id.solr_flag = 2 diff --git a/indoteknik_custom/models/user_activity_log.py b/indoteknik_custom/models/user_activity_log.py index 3cf7bd58..32b389a1 100755 --- a/indoteknik_custom/models/user_activity_log.py +++ b/indoteknik_custom/models/user_activity_log.py @@ -70,7 +70,8 @@ class UserActivityLog(models.Model): activity_logs = self.env['user.activity.log'].search([ ('url', 'ilike', 'https://indoteknik.co%/shop/product/%'), ('create_date', '>', delta_time), - ], limit=4000) + ('url', 'not ilike', 'shopping'), + ], limit=1000) for activity_log in activity_logs: _logger.info(activity_log.url) strip_index = i = 0 diff --git a/indoteknik_custom/views/sale_monitoring.xml b/indoteknik_custom/views/sale_monitoring.xml index 025e5d26..b3b186e9 100755 --- a/indoteknik_custom/views/sale_monitoring.xml +++ b/indoteknik_custom/views/sale_monitoring.xml @@ -4,7 +4,10 @@ <field name="name">sale.monitoring.tree</field> <field name="model">sale.monitoring</field> <field name="arch" type="xml"> - <tree create="false"> + <tree create="false" multi_edit="1"> + <header> + <button name="action_refresh" string="Refresh" class="oe_highlight" type="object" /> + </header> <field name="date_order"/> <field name="sale_order_id"/> <field name="partner_id"/> diff --git a/indoteknik_custom/views/sale_monitoring_detail.xml b/indoteknik_custom/views/sale_monitoring_detail.xml index 9e4734d3..d22f0a13 100755 --- a/indoteknik_custom/views/sale_monitoring_detail.xml +++ b/indoteknik_custom/views/sale_monitoring_detail.xml @@ -4,7 +4,10 @@ <field name="name">sale.monitoring.detail.tree</field> <field name="model">sale.monitoring.detail</field> <field name="arch" type="xml"> - <tree create="false"> + <tree create="false" multi_edit="1"> + <header> + <button name="action_refresh" string="Refresh" class="oe_highlight" type="object" /> + </header> <field name="date_order"/> <field name="sale_order_id"/> <field name="partner_id"/> diff --git a/indoteknik_custom/views/stock_vendor.xml b/indoteknik_custom/views/stock_vendor.xml index ebf63a6a..35931750 100755 --- a/indoteknik_custom/views/stock_vendor.xml +++ b/indoteknik_custom/views/stock_vendor.xml @@ -18,6 +18,7 @@ <tree> <field name="quantity" widget="badge" decoration-primary="True"/> <field name="product_variant_id"/> + <field name="cache_reset_status"/> <field name="__last_update"/> </tree> </field> @@ -33,6 +34,7 @@ <group> <field name="product_variant_id"/> <field name="quantity" widget="badge" decoration-primary="True"/> + <field name="cache_reset_status"/> <field name="__last_update"/> </group> <group></group> |
