diff --git a/login_bg_img_knk/COPYRIGHT b/login_bg_img_knk/COPYRIGHT new file mode 100644 index 00000000..58ce57a4 --- /dev/null +++ b/login_bg_img_knk/COPYRIGHT @@ -0,0 +1,15 @@ + +Most of the files are + + Copyright (c) 2012-TODAY Kanak Infosystems LLP. + +Many files also contain contributions from third +parties. In this case the original copyright of +the contributions can be traced through the +history of the source version control system. + +When that is not the case, the files contain a prominent +notice stating the original copyright and applicable +license, or come with their own dedicated COPYRIGHT +and/or LICENSE file. + diff --git a/login_bg_img_knk/LICENSE b/login_bg_img_knk/LICENSE new file mode 100644 index 00000000..c283e316 --- /dev/null +++ b/login_bg_img_knk/LICENSE @@ -0,0 +1,11 @@ +Kanak Infosystems LLP. Proprietary License v1.0 + +This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Kanak Infosystems LLP Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). + +You may develop Kanak Infosystems LLP modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Kanak Infosystems LLP Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). + +It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. + +The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/login_bg_img_knk/__init__.py b/login_bg_img_knk/__init__.py new file mode 100644 index 00000000..83216f5d --- /dev/null +++ b/login_bg_img_knk/__init__.py @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# Powered by Kanak Infosystems LLP. +# © 2020 Kanak Infosystems LLP. (). + +from . import controller +from . import models diff --git a/login_bg_img_knk/__manifest__.py b/login_bg_img_knk/__manifest__.py new file mode 100644 index 00000000..82d76019 --- /dev/null +++ b/login_bg_img_knk/__manifest__.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Powered by Kanak Infosystems LLP. +# © 2020 Kanak Infosystems LLP. (). + +{ + 'name': "Background image in Login page", + 'version': '16.0.1.0', + 'summary': """Module helps to set background image in Login page.| Background image | image|Login | Login page|website|""", + 'description': """Module helps to set background image in Login page.""", + 'license': 'OPL-1', + 'website': "https://www.kanakinfosystems.com", + 'author': 'Kanak Infosystems LLP.', + 'category': 'Tools', + 'depends': ['base', 'portal'], + 'data': [ + 'views/res_company.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'login_bg_img_knk/static/src/css/bg_image.scss', + ], + }, + 'images': ['static/description/banner.gif'], + 'sequence': 1, + "application": True, + "installable": True +} diff --git a/login_bg_img_knk/controller/__init__.py b/login_bg_img_knk/controller/__init__.py new file mode 100644 index 00000000..41c4fedd --- /dev/null +++ b/login_bg_img_knk/controller/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# Powered by Kanak Infosystems LLP. +# © 2020 Kanak Infosystems LLP. (). + +from . import main diff --git a/login_bg_img_knk/controller/main.py b/login_bg_img_knk/controller/main.py new file mode 100644 index 00000000..0e4113f0 --- /dev/null +++ b/login_bg_img_knk/controller/main.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# Powered by Kanak Infosystems LLP. +# © 2020 Kanak Infosystems LLP. (). + +import base64 +from odoo.http import Controller, request, route +from werkzeug.utils import redirect + +DEFAULT_IMAGE = 'login_bg_img_knk/static/src/img/bg.jpg' + + +class DasboardBackground(Controller): + + @route(['/dashboard'], type='http', auth="public") + def dashboard(self, **post): + user = request.env.user + company = user.company_id + if company.bg_image: + image = base64.b64decode(company.bg_image) + else: + return redirect(DEFAULT_IMAGE) + + return request.make_response( + image, [('Content-Type', 'image')]) diff --git a/login_bg_img_knk/models/__init__.py b/login_bg_img_knk/models/__init__.py new file mode 100644 index 00000000..dc14dc60 --- /dev/null +++ b/login_bg_img_knk/models/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# Powered by Kanak Infosystems LLP. +# © 2020 Kanak Infosystems LLP. (). + +from . import res_company diff --git a/login_bg_img_knk/models/res_company.py b/login_bg_img_knk/models/res_company.py new file mode 100644 index 00000000..a5f77d20 --- /dev/null +++ b/login_bg_img_knk/models/res_company.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# Powered by Kanak Infosystems LLP. +# © 2020 Kanak Infosystems LLP. (). + + +from odoo import models, fields + + +class ResCompany(models.Model): + _inherit = 'res.company' + + bg_image = fields.Binary(string="Image") diff --git a/login_bg_img_knk/static/description/App-Link.png b/login_bg_img_knk/static/description/App-Link.png new file mode 100644 index 00000000..106b0af7 Binary files /dev/null and b/login_bg_img_knk/static/description/App-Link.png differ diff --git a/login_bg_img_knk/static/description/Configuration _ Setup.png b/login_bg_img_knk/static/description/Configuration _ Setup.png new file mode 100644 index 00000000..9abdf890 Binary files /dev/null and b/login_bg_img_knk/static/description/Configuration _ Setup.png differ diff --git a/login_bg_img_knk/static/description/Demo.png b/login_bg_img_knk/static/description/Demo.png new file mode 100644 index 00000000..39cd46ec Binary files /dev/null and b/login_bg_img_knk/static/description/Demo.png differ diff --git a/login_bg_img_knk/static/description/FAQ_S.png b/login_bg_img_knk/static/description/FAQ_S.png new file mode 100644 index 00000000..6616bbb8 Binary files /dev/null and b/login_bg_img_knk/static/description/FAQ_S.png differ diff --git a/login_bg_img_knk/static/description/Hire-Odoo-Developer.png b/login_bg_img_knk/static/description/Hire-Odoo-Developer.png new file mode 100644 index 00000000..3f7aecfe Binary files /dev/null and b/login_bg_img_knk/static/description/Hire-Odoo-Developer.png differ diff --git a/login_bg_img_knk/static/description/Key-feature-icon.png b/login_bg_img_knk/static/description/Key-feature-icon.png new file mode 100644 index 00000000..685edc97 Binary files /dev/null and b/login_bg_img_knk/static/description/Key-feature-icon.png differ diff --git a/login_bg_img_knk/static/description/Odoo-Customization.png b/login_bg_img_knk/static/description/Odoo-Customization.png new file mode 100644 index 00000000..b6fc7fa7 Binary files /dev/null and b/login_bg_img_knk/static/description/Odoo-Customization.png differ diff --git a/login_bg_img_knk/static/description/Odoo-Development.png b/login_bg_img_knk/static/description/Odoo-Development.png new file mode 100644 index 00000000..c3c5aca0 Binary files /dev/null and b/login_bg_img_knk/static/description/Odoo-Development.png differ diff --git a/login_bg_img_knk/static/description/Odoo-Installation.png b/login_bg_img_knk/static/description/Odoo-Installation.png new file mode 100644 index 00000000..6f741031 Binary files /dev/null and b/login_bg_img_knk/static/description/Odoo-Installation.png differ diff --git a/login_bg_img_knk/static/description/Odoo-Integration.png b/login_bg_img_knk/static/description/Odoo-Integration.png new file mode 100644 index 00000000..8187244b Binary files /dev/null and b/login_bg_img_knk/static/description/Odoo-Integration.png differ diff --git a/login_bg_img_knk/static/description/Odoo-Resources.png b/login_bg_img_knk/static/description/Odoo-Resources.png new file mode 100644 index 00000000..ac38e452 Binary files /dev/null and b/login_bg_img_knk/static/description/Odoo-Resources.png differ diff --git a/login_bg_img_knk/static/description/Odoo-Themes.png b/login_bg_img_knk/static/description/Odoo-Themes.png new file mode 100644 index 00000000..fbec74cf Binary files /dev/null and b/login_bg_img_knk/static/description/Odoo-Themes.png differ diff --git a/login_bg_img_knk/static/description/Odoo-Training.png b/login_bg_img_knk/static/description/Odoo-Training.png new file mode 100644 index 00000000..af795fed Binary files /dev/null and b/login_bg_img_knk/static/description/Odoo-Training.png differ diff --git a/login_bg_img_knk/static/description/Release Notes.png b/login_bg_img_knk/static/description/Release Notes.png new file mode 100644 index 00000000..500d6e8f Binary files /dev/null and b/login_bg_img_knk/static/description/Release Notes.png differ diff --git a/login_bg_img_knk/static/description/Support.png b/login_bg_img_knk/static/description/Support.png new file mode 100644 index 00000000..8fd57089 Binary files /dev/null and b/login_bg_img_knk/static/description/Support.png differ diff --git a/login_bg_img_knk/static/description/banner.gif b/login_bg_img_knk/static/description/banner.gif new file mode 100644 index 00000000..9164bc32 Binary files /dev/null and b/login_bg_img_knk/static/description/banner.gif differ diff --git a/login_bg_img_knk/static/description/bg1.png b/login_bg_img_knk/static/description/bg1.png new file mode 100644 index 00000000..d3af7dc1 Binary files /dev/null and b/login_bg_img_knk/static/description/bg1.png differ diff --git a/login_bg_img_knk/static/description/bg2.png b/login_bg_img_knk/static/description/bg2.png new file mode 100644 index 00000000..9ed3dc64 Binary files /dev/null and b/login_bg_img_knk/static/description/bg2.png differ diff --git a/login_bg_img_knk/static/description/bg3.png b/login_bg_img_knk/static/description/bg3.png new file mode 100644 index 00000000..fadc99f3 Binary files /dev/null and b/login_bg_img_knk/static/description/bg3.png differ diff --git a/login_bg_img_knk/static/description/congi_1.png b/login_bg_img_knk/static/description/congi_1.png new file mode 100644 index 00000000..71ff733e Binary files /dev/null and b/login_bg_img_knk/static/description/congi_1.png differ diff --git a/login_bg_img_knk/static/description/email.png b/login_bg_img_knk/static/description/email.png new file mode 100644 index 00000000..c7519d2c Binary files /dev/null and b/login_bg_img_knk/static/description/email.png differ diff --git a/login_bg_img_knk/static/description/icon.png b/login_bg_img_knk/static/description/icon.png new file mode 100644 index 00000000..b35f574b Binary files /dev/null and b/login_bg_img_knk/static/description/icon.png differ diff --git a/login_bg_img_knk/static/description/index.html b/login_bg_img_knk/static/description/index.html new file mode 100644 index 00000000..9b98219f --- /dev/null +++ b/login_bg_img_knk/static/description/index.html @@ -0,0 +1,409 @@ +
+
+
+
+ + kanakinfosystems-logo + +
+
+ Supported Editions +
+
Community
+
Enterprise
+
Odoo.sh
+
+
+
+ + odoo-logo + +
+
+
+
+
+
+
+
+

+ Background image in Login page +

+
+
+
+
+

Background image in Login page module helps to set background image in Login page. +

+
+
+
+

Key Features of Background image in Login page

+
    +
  • set background image in Login page. +
  • +
  • Support Multi Company. +
  • +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + Allows you to set login background image. +
+
+ +
+
+
+ +
+
+
+ +
+
+
+

+
+
+
+
+
+
+
+ +
+
+
+
    +
  1. +

    Background image in Login page

    +
  2. +
  3. +

    Optimized code.

    +
  4. +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Q Is this app compatible with Odoo Enterprise? +
+ +
+
+
+
+ Yes, our app works with Odoo Enterprise. +
+
+
+
+
+
+
Q Is this app compatible with Windows or Ubuntu? +
+ +
+
+
+
+ Yes, our app works with Windows or Ubuntu operating system. +
+
+
+
+
+
+
+
+
+
+
+ +
+
+

+
+ FREE 3 MONTHS SUPPORT +
+

+

Kanak Infosystems LLP. will provide free 3 months support for bug fixes, any doubts or queries, installation, configuration support or any types of issues related related to this module.

+
+ NOTE: + This module do not required extra configuration. +
+
+
+
+
+
+
+
+
+ + + +
+
+
+
+ Suggested Apps +
+ + +
+
+
+
+
+ Our Services +
+ + +
+ \ No newline at end of file diff --git a/login_bg_img_knk/static/description/knk_sale_return.jpg b/login_bg_img_knk/static/description/knk_sale_return.jpg new file mode 100644 index 00000000..cca98c5a Binary files /dev/null and b/login_bg_img_knk/static/description/knk_sale_return.jpg differ diff --git a/login_bg_img_knk/static/description/logo.png b/login_bg_img_knk/static/description/logo.png new file mode 100644 index 00000000..78fdb08b Binary files /dev/null and b/login_bg_img_knk/static/description/logo.png differ diff --git a/login_bg_img_knk/static/description/odoo-logo.png b/login_bg_img_knk/static/description/odoo-logo.png new file mode 100644 index 00000000..28be83cf Binary files /dev/null and b/login_bg_img_knk/static/description/odoo-logo.png differ diff --git a/login_bg_img_knk/static/description/order_history.jpg b/login_bg_img_knk/static/description/order_history.jpg new file mode 100644 index 00000000..ebf60f2b Binary files /dev/null and b/login_bg_img_knk/static/description/order_history.jpg differ diff --git a/login_bg_img_knk/static/description/sale_approval_kanak.jpg b/login_bg_img_knk/static/description/sale_approval_kanak.jpg new file mode 100644 index 00000000..44da796e Binary files /dev/null and b/login_bg_img_knk/static/description/sale_approval_kanak.jpg differ diff --git a/login_bg_img_knk/static/description/sale_estimate.jpg b/login_bg_img_knk/static/description/sale_estimate.jpg new file mode 100644 index 00000000..eb201f2b Binary files /dev/null and b/login_bg_img_knk/static/description/sale_estimate.jpg differ diff --git a/login_bg_img_knk/static/description/sale_loyalty.jpg b/login_bg_img_knk/static/description/sale_loyalty.jpg new file mode 100644 index 00000000..f522104b Binary files /dev/null and b/login_bg_img_knk/static/description/sale_loyalty.jpg differ diff --git a/login_bg_img_knk/static/description/schedule_delivery_knk.jpg b/login_bg_img_knk/static/description/schedule_delivery_knk.jpg new file mode 100644 index 00000000..7a096db4 Binary files /dev/null and b/login_bg_img_knk/static/description/schedule_delivery_knk.jpg differ diff --git a/login_bg_img_knk/static/description/skype.png b/login_bg_img_knk/static/description/skype.png new file mode 100644 index 00000000..2826b373 Binary files /dev/null and b/login_bg_img_knk/static/description/skype.png differ diff --git a/login_bg_img_knk/static/description/support-ticket.png b/login_bg_img_knk/static/description/support-ticket.png new file mode 100644 index 00000000..385638db Binary files /dev/null and b/login_bg_img_knk/static/description/support-ticket.png differ diff --git a/login_bg_img_knk/static/description/whatsapp.png b/login_bg_img_knk/static/description/whatsapp.png new file mode 100644 index 00000000..6961455b Binary files /dev/null and b/login_bg_img_knk/static/description/whatsapp.png differ diff --git a/login_bg_img_knk/static/src/css/bg_image.scss b/login_bg_img_knk/static/src/css/bg_image.scss new file mode 100644 index 00000000..de8268c9 --- /dev/null +++ b/login_bg_img_knk/static/src/css/bg_image.scss @@ -0,0 +1,4 @@ +// +// .right_align_x { +// text-align: center; +// } \ No newline at end of file diff --git a/login_bg_img_knk/static/src/img/bg.jpg b/login_bg_img_knk/static/src/img/bg.jpg new file mode 100644 index 00000000..9508c3d1 Binary files /dev/null and b/login_bg_img_knk/static/src/img/bg.jpg differ diff --git a/login_bg_img_knk/views/res_company.xml b/login_bg_img_knk/views/res_company.xml new file mode 100644 index 00000000..3fefbd28 --- /dev/null +++ b/login_bg_img_knk/views/res_company.xml @@ -0,0 +1,19 @@ + + + + res.company.form.inherit.account + res.company + + + + + + + + + + \ No newline at end of file diff --git a/sf_bf_connect/models/models.py b/sf_bf_connect/models/models.py index 3eeac229..9c9d59a1 100644 --- a/sf_bf_connect/models/models.py +++ b/sf_bf_connect/models/models.py @@ -25,4 +25,5 @@ class ResPartner(models.Model): return ran_str sf_token = fields.Char(u'Token', default=get_token) - sf_secret_key = fields.Char(u'密钥', default=get_secret) \ No newline at end of file + sf_secret_key = fields.Char(u'密钥', default=get_secret) + diff --git a/sf_dlm/data/product_data.xml b/sf_dlm/data/product_data.xml index f4b9b717..aad3714c 100644 --- a/sf_dlm/data/product_data.xml +++ b/sf_dlm/data/product_data.xml @@ -45,6 +45,7 @@ true serial + @@ -60,6 +61,7 @@ serial + 胚料采购模板 @@ -74,6 +76,7 @@ serial + \ No newline at end of file diff --git a/sf_dlm/data/tt.xml b/sf_dlm/data/tt.xml new file mode 100644 index 00000000..847e6a80 --- /dev/null +++ b/sf_dlm/data/tt.xml @@ -0,0 +1,57 @@ + + + + + CNC加工产品模板 + + delivery + product + false + + + + False + + + + 胚料 + 胚料 + + + + 自加工 + + delivery + product + false + + + + False + + + + 外协 + + delivery + product + false + + + + False + + + + 采购 + + delivery + product + false + + + + False + + + \ No newline at end of file diff --git a/sf_dlm/models/__init__.py b/sf_dlm/models/__init__.py index 7d40ff65..86d505b8 100644 --- a/sf_dlm/models/__init__.py +++ b/sf_dlm/models/__init__.py @@ -1,5 +1,3 @@ from. import product_template -from. import product_supplierinfo - diff --git a/sf_dlm/models/product_supplierinfo.py b/sf_dlm/models/product_supplierinfo.py deleted file mode 100644 index ae850401..00000000 --- a/sf_dlm/models/product_supplierinfo.py +++ /dev/null @@ -1,11 +0,0 @@ -from odoo import models, fields, api - - -class ResSupplierInfo(models.Model): - _inherit = 'product.supplierinfo' - - def _compute_is_subcontractor(self): - for supplier in self: - boms = supplier.product_id.variant_bom_ids - boms |= supplier.product_tmpl_id.bom_ids.filtered(lambda b: not b.product_id or b.product_id in (supplier.product_id or supplier.product_tmpl_id.product_variant_ids)) - supplier.is_subcontractor = supplier.partner_id in boms.subcontractor_id \ No newline at end of file diff --git a/sf_dlm/models/product_template.py b/sf_dlm/models/product_template.py index 725cbeb6..40fcac15 100644 --- a/sf_dlm/models/product_template.py +++ b/sf_dlm/models/product_template.py @@ -82,7 +82,7 @@ class ResProductTemplate(models.Model): item['model_height'] + model_type.embryo_tolerance), 'model_type_id': model_type.id, 'model_processing_panel': 'R', - 'model_machining_precision': item['model_machining_precision'], + 'model_machining_precision': item['model_machining_precision'], 'model_code': item['barcode'], 'length': item['model_long'], 'width': item['model_width'], @@ -92,7 +92,7 @@ class ResProductTemplate(models.Model): 'model_name': attachment.name, 'upload_model_file': [(6, 0, [attachment.id])], # 'single_manufacturing': True, - # 'tracking': 'serial', + 'tracking': 'serial', 'list_price': item['price'], # 'categ_id': self.env.ref('sf_dlm.product_category_finished_sf').id, 'materials_id': self.env['sf.production.materials'].search( @@ -158,13 +158,14 @@ class ResProductTemplate(models.Model): 'active': True } # 外协和采购生成的胚料需要根据材料型号绑定供应商 - if route_type == 'subcontract' or route_type == 'purchase': + if route_type == 'subcontract': + no_bom_copy_product_id.purchase_ok = True + no_bom_copy_product_id.seller_ids = [ + (0, 0, {'partner_id': supplier.partner_id.id, 'delay': 1.0, 'is_subcontractor': True})] + elif route_type == 'purchase': no_bom_copy_product_id.purchase_ok = True no_bom_copy_product_id.seller_ids = [ (0, 0, {'partner_id': supplier.partner_id.id, 'delay': 1.0})] - if route_type == 'subcontract': - partner = self.env['res.partner'].search([('id', '=', supplier.partner_id.id)]) - partner.is_subcontractor = True no_bom_copy_product_id.write(vals) logging.info('no_bom_copy_product_id-vals:%s' % vals) # product_id.product_tmpl_id.active = False @@ -248,6 +249,7 @@ class ResMrpBom(models.Model): [('materials_model_id', '=', materials_type.id)], limit=1, order='sequence asc') + logging.info('get_supplier-vals:%s' % seller_id) return seller_id # 匹配bom diff --git a/sf_dlm/views/product_template_view.xml b/sf_dlm/views/product_template_view.xml index ab89ec5b..c563f728 100644 --- a/sf_dlm/views/product_template_view.xml +++ b/sf_dlm/views/product_template_view.xml @@ -6,13 +6,13 @@ product.template - - - - + + + + - + @@ -36,31 +36,18 @@ - - - + + + + + + + + + + + diff --git a/sf_manufacturing/models/mrp_workcenter.py b/sf_manufacturing/models/mrp_workcenter.py index f9f518c1..e853ab3f 100644 --- a/sf_manufacturing/models/mrp_workcenter.py +++ b/sf_manufacturing/models/mrp_workcenter.py @@ -13,24 +13,6 @@ class ResWorkcenter(models.Model): 'maintenance.equipment', 'workcenter_id', string="Maintenance Equipment", check_company=True) - @api.onchange('machine_tool_id') - def update_machine_tool_is_binding(self): - machine_tool = self.env["sf.machine_tool"].search([('is_binding', '=', True)]) - if machine_tool: - for item in machine_tool: - workcenter_machine_tool = self.env["mrp.workcenter"].search([('machine_tool_id', '=', item.id)]) - if workcenter_machine_tool: - if self.machine_tool_id.id: - if workcenter_machine_tool.id != self.machine_tool_id.id: - self.machine_tool_id.is_binding = True - else: - self.machine_tool_id.is_binding = True - else: - self.machine_tool_id.is_binding = True - item.is_binding = False - else: - self.machine_tool_id.is_binding = True - def action_work_order(self): if not self.env.context.get('desktop_list_view', False): action = self.env["ir.actions.actions"]._for_xml_id("sf_manufacturing.mrp_workorder_action_tablet") diff --git a/sf_manufacturing/views/mrp_workcenter_views.xml b/sf_manufacturing/views/mrp_workcenter_views.xml index 9c040938..0e25f5fa 100644 --- a/sf_manufacturing/views/mrp_workcenter_views.xml +++ b/sf_manufacturing/views/mrp_workcenter_views.xml @@ -24,19 +24,19 @@ - - mrp.workcenter.view.kanban.inherit.mrp.workorder - mrp.workcenter - - - - -