Merge branch '13.0' of https://github.com/guohuadeng/app-odoo into 13.0
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': "App base chinese,中国化基本模块增强",
|
'name': "App base chinese,中国化基本模块增强",
|
||||||
'version': '13.19.12.24',
|
'version': '13.20.01.18',
|
||||||
'author': 'Sunpop.cn',
|
'author': 'Sunpop.cn',
|
||||||
'category': 'Base',
|
'category': 'Base',
|
||||||
'website': 'https://www.sunpop.cn',
|
'website': 'https://www.sunpop.cn',
|
||||||
@@ -43,20 +43,26 @@
|
|||||||
7. 修正仓库位置的列表及m2o字段中不显示中文目录名的Bug
|
7. 修正仓库位置的列表及m2o字段中不显示中文目录名的Bug
|
||||||
8. 超级用户改时区为 中国
|
8. 超级用户改时区为 中国
|
||||||
9. 时间格式年月日为 2019-12-30,时间为 22:10
|
9. 时间格式年月日为 2019-12-30,时间为 22:10
|
||||||
11. todo:中文演示数据(只有demo模式才加载)
|
10. 国家增加排序,中国排第一
|
||||||
|
11. 收款相关显示中国习惯
|
||||||
|
21. todo:中文演示数据(只有demo模式才加载)
|
||||||
""",
|
""",
|
||||||
'pre_init_hook': 'pre_init_hook',
|
'pre_init_hook': 'pre_init_hook',
|
||||||
'post_init_hook': 'post_init_hook',
|
'post_init_hook': 'post_init_hook',
|
||||||
'depends': [
|
'depends': [
|
||||||
'app_base',
|
'app_base',
|
||||||
|
'account',
|
||||||
'stock',
|
'stock',
|
||||||
],
|
],
|
||||||
'images': ['static/description/banner.jpg'],
|
'images': ['static/description/banner.jpg'],
|
||||||
'data': [
|
'data': [
|
||||||
'views/res_partner_views.xml',
|
'views/res_partner_views.xml',
|
||||||
'views/res_currency_views.xml',
|
'views/res_currency_views.xml',
|
||||||
|
'views/sale_order_views.xml',
|
||||||
|
'views/account_move_views.xml',
|
||||||
'views/ir_default_views.xml',
|
'views/ir_default_views.xml',
|
||||||
|
'views/templates.xml',
|
||||||
|
'wizard/sale_make_invoice_advance_views.xml',
|
||||||
'data/ir_default_data.xml',
|
'data/ir_default_data.xml',
|
||||||
'data/ir_sequence_data.xml',
|
'data/ir_sequence_data.xml',
|
||||||
'data/base_data.xml',
|
'data/base_data.xml',
|
||||||
|
|||||||
@@ -44,6 +44,9 @@ def post_init_hook(cr, registry):
|
|||||||
('id', '=', 2)
|
('id', '=', 2)
|
||||||
])
|
])
|
||||||
ids.write({'tz': "Asia/Shanghai"})
|
ids.write({'tz': "Asia/Shanghai"})
|
||||||
|
# 中国排序第一
|
||||||
|
ids = env.ref('base.cn')
|
||||||
|
ids.write({'sequence': 1})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise Warning(e)
|
raise Warning(e)
|
||||||
|
|
||||||
|
|||||||
@@ -1,49 +1,94 @@
|
|||||||
# Translation of Odoo Server.
|
# Translation of Odoo Server.
|
||||||
# This file contains the translation of the following modules:
|
# This file contains the translation of the following modules:
|
||||||
# * app_base
|
# * app_base_chinese
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Odoo Server 13.0+e-20191027\n"
|
"Project-Id-Version: Odoo Server 13.0+e\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2019-10-27 20:43+0000\n"
|
"POT-Creation-Date: 2020-01-18 15:21+0000\n"
|
||||||
"PO-Revision-Date: 2019-10-27 20:43+0000\n"
|
"PO-Revision-Date: 2020-01-18 23:22+0800\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: \n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: \n"
|
"Plural-Forms: \n"
|
||||||
|
"X-Generator: Poedit 1.7.7\n"
|
||||||
|
|
||||||
#. module: app_base
|
#. module: app_base_chinese
|
||||||
#: model:ir.model.fields,help:app_base.field_res_partner__customer
|
#: model:ir.model.fields,field_description:app_base_chinese.field_product_category__complete_name
|
||||||
#: model:ir.model.fields,help:app_base.field_res_users__customer
|
msgid "Complete Name"
|
||||||
msgid ""
|
msgstr "完整名称"
|
||||||
"Check this box if this contact is a customer. It can be selected in sales "
|
|
||||||
"orders."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: app_base
|
#. module: app_base_chinese
|
||||||
#: model:ir.model.fields,help:app_base.field_res_partner__supplier
|
#: model:ir.model,name:app_base_chinese.model_res_partner
|
||||||
#: model:ir.model.fields,help:app_base.field_res_users__supplier
|
|
||||||
msgid ""
|
|
||||||
"Check this box if this contact is a vendor. It can be selected in purchase "
|
|
||||||
"orders."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: app_base
|
|
||||||
#: model:ir.model,name:app_base.model_res_partner
|
|
||||||
msgid "Contact"
|
msgid "Contact"
|
||||||
msgstr "联系人"
|
msgstr "联系人"
|
||||||
|
|
||||||
#. module: app_base
|
#. module: app_base_chinese
|
||||||
#: model:ir.model.fields,field_description:app_base.field_res_partner__customer
|
#: model_terms:ir.ui.view,arch_db:app_base_chinese.app_res_partner_kanban_view
|
||||||
#: model:ir.model.fields,field_description:app_base.field_res_users__customer
|
msgid "Credit:"
|
||||||
msgid "Is a Customer"
|
msgstr "信用额:"
|
||||||
msgstr "客户"
|
|
||||||
|
|
||||||
#. module: app_base
|
#. module: app_base_chinese
|
||||||
#: model:ir.model.fields,field_description:app_base.field_res_partner__supplier
|
#: model:ir.model,name:app_base_chinese.model_res_currency
|
||||||
#: model:ir.model.fields,field_description:app_base.field_res_users__supplier
|
msgid "Currency"
|
||||||
msgid "Is a Vendor"
|
msgstr "币种"
|
||||||
msgstr "供应商"
|
|
||||||
|
#. module: app_base_chinese
|
||||||
|
#: model:ir.model.fields,help:app_base_chinese.field_res_currency__sequence
|
||||||
|
msgid "Determine the display order. Sort ascending."
|
||||||
|
msgstr "决定显示顺序,数字越小排序越前"
|
||||||
|
|
||||||
|
#. module: app_base_chinese
|
||||||
|
#: model_terms:ir.ui.view,arch_db:app_base_chinese.app_view_sale_advance_payment_inv
|
||||||
|
msgid "FaPiao / Invoice Orders"
|
||||||
|
msgstr "创建收据/发票"
|
||||||
|
|
||||||
|
#. module: app_base_chinese
|
||||||
|
#: model:ir.model.fields,field_description:app_base_chinese.field_stock_location__complete_name
|
||||||
|
msgid "Full Location Name"
|
||||||
|
msgstr "完整的位置名称"
|
||||||
|
|
||||||
|
#. module: app_base_chinese
|
||||||
|
#: model:ir.model,name:app_base_chinese.model_stock_location
|
||||||
|
msgid "Inventory Locations"
|
||||||
|
msgstr "库存位置"
|
||||||
|
|
||||||
|
#. module: app_base_chinese
|
||||||
|
#: model_terms:ir.ui.view,arch_db:app_base_chinese.app_view_order_form
|
||||||
|
msgid "Invoices/FaPiao"
|
||||||
|
msgstr "收据/发票"
|
||||||
|
|
||||||
|
#. module: app_base_chinese
|
||||||
|
#: model_terms:ir.ui.view,arch_db:app_base_chinese.app_view_order_form
|
||||||
|
msgid "Make Collections"
|
||||||
|
msgstr "收款"
|
||||||
|
|
||||||
|
#. module: app_base_chinese
|
||||||
|
#: model:ir.model.fields,field_description:app_base_chinese.field_res_partner__name
|
||||||
|
#: model:ir.model.fields,field_description:app_base_chinese.field_res_users__name
|
||||||
|
msgid "Name"
|
||||||
|
msgstr "名称"
|
||||||
|
|
||||||
|
#. module: app_base_chinese
|
||||||
|
#: model_terms:ir.ui.view,arch_db:app_base_chinese.app_view_move_form
|
||||||
|
msgid "Post Entry"
|
||||||
|
msgstr "过帐"
|
||||||
|
|
||||||
|
#. module: app_base_chinese
|
||||||
|
#: model:ir.model,name:app_base_chinese.model_product_category
|
||||||
|
msgid "Product Category"
|
||||||
|
msgstr "产品类别"
|
||||||
|
|
||||||
|
#. module: app_base_chinese
|
||||||
|
#: model:ir.model.fields,field_description:app_base_chinese.field_res_currency__sequence
|
||||||
|
msgid "Sequence"
|
||||||
|
msgstr "单号规则"
|
||||||
|
|
||||||
|
#. module: app_base_chinese
|
||||||
|
#: model:ir.model.fields,field_description:app_base_chinese.field_res_partner__short_name
|
||||||
|
#: model:ir.model.fields,field_description:app_base_chinese.field_res_users__short_name
|
||||||
|
msgid "Short Name"
|
||||||
|
msgstr "缩写"
|
||||||
|
|||||||
11
app_base_chinese/models/res_country.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class Country(models.Model):
|
||||||
|
_inherit = 'res.country'
|
||||||
|
_order = 'sequence,name'
|
||||||
|
|
||||||
|
sequence = fields.Integer('Sequence', help="Determine the display order", default=99)
|
||||||
26
app_base_chinese/static/src/scss/app_style.scss
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
.o_form_view .o_address_format {
|
||||||
|
.o_address_country {
|
||||||
|
display: -webkit-inline-flex;
|
||||||
|
display: inline-flex;
|
||||||
|
width: 48%;
|
||||||
|
margin-right: 2%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.o_form_view.o_form_editable .o_address_format {
|
||||||
|
div.o_address_state {
|
||||||
|
width: 50%;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
.o_address_city{
|
||||||
|
width: 48%;
|
||||||
|
margin-right: 2%;
|
||||||
|
}
|
||||||
|
.o_address_city_id{
|
||||||
|
width: 48%;
|
||||||
|
margin-right: 2%;
|
||||||
|
}
|
||||||
|
input.o_address_zip{
|
||||||
|
width: 50%;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
19
app_base_chinese/views/account_move_views.xml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
<!-- VIEWS -->
|
||||||
|
|
||||||
|
<record id="app_view_move_form" model="ir.ui.view">
|
||||||
|
<field name="name">app.account.move.form</field>
|
||||||
|
<field name="model">account.move</field>
|
||||||
|
<field name="inherit_id" ref="account.view_move_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<!-- 过帐操作-->
|
||||||
|
<xpath expr="//header//button[@name='action_post']" position="attributes">
|
||||||
|
<attribute name="string">Post Entry</attribute>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
@@ -132,9 +132,6 @@
|
|||||||
<field name="model">res.partner</field>
|
<field name="model">res.partner</field>
|
||||||
<field name="inherit_id" ref="base.view_partner_tree"/>
|
<field name="inherit_id" ref="base.view_partner_tree"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//field[@name='phone']" position="before">
|
|
||||||
<field name="mobile"/>
|
|
||||||
</xpath>
|
|
||||||
<xpath expr="//field[@name='email']" position="after">
|
<xpath expr="//field[@name='email']" position="after">
|
||||||
<field name="category_id"/>
|
<field name="category_id"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
@@ -151,9 +148,6 @@
|
|||||||
<field name="credit_limit"/>
|
<field name="credit_limit"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//div[@class='oe_kanban_details']/ul" position="inside">
|
<xpath expr="//div[@class='oe_kanban_details']/ul" position="inside">
|
||||||
<li t-if="record.mobile and record.mobile.raw_value" class="o_text_overflow">
|
|
||||||
, <field name="mobile"/>
|
|
||||||
</li>
|
|
||||||
<li t-if="record.credit_limit and record.credit_limit.raw_value">
|
<li t-if="record.credit_limit and record.credit_limit.raw_value">
|
||||||
Credit:<field name="credit_limit"/>
|
Credit:<field name="credit_limit"/>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
24
app_base_chinese/views/sale_order_views.xml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
<!-- 改收款相关操作显示 -->
|
||||||
|
<record id="app_view_order_form" model="ir.ui.view">
|
||||||
|
<field name="name">app.sale.order.form</field>
|
||||||
|
<field name="model">sale.order</field>
|
||||||
|
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<!-- 全款操作-->
|
||||||
|
<xpath expr="//header//button[@name='%(sale.action_view_sale_advance_payment_inv)d'][1]" position="attributes">
|
||||||
|
<attribute name="string">Make Collections</attribute>
|
||||||
|
</xpath>
|
||||||
|
<!-- 尾款操作-->
|
||||||
|
<xpath expr="//header//button[@name='%(sale.action_view_sale_advance_payment_inv)d'][1]" position="attributes">
|
||||||
|
<attribute name="string">Make Collections</attribute>
|
||||||
|
</xpath>
|
||||||
|
<!-- 查看收据列表-->
|
||||||
|
<xpath expr="//div[hasclass('oe_button_box')]//field[@name='invoice_count']" position="attributes">
|
||||||
|
<attribute name="string">Invoices/FaPiao</attribute>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
8
app_base_chinese/views/templates.xml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<template id="_assets_backend" name="app_base_chinese assets backend" inherit_id="web.assets_backend">
|
||||||
|
<xpath expr="//link[last()]" position="after">
|
||||||
|
<link rel="stylesheet" type="text/scss" href="/app_base_chinese/static/src/scss/app_style.scss"/>
|
||||||
|
</xpath>
|
||||||
|
</template>
|
||||||
|
</odoo>
|
||||||
21
app_base_chinese/wizard/sale_make_invoice_advance_views.xml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<record id="sale.view_sale_advance_payment_inv" model="ir.ui.view">
|
||||||
|
<field name="name">FaPiao / Invoice Orders</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="app_view_sale_advance_payment_inv" model="ir.ui.view">
|
||||||
|
<field name="name">app.account.move.form</field>
|
||||||
|
<field name="model">sale.advance.payment.inv</field>
|
||||||
|
<field name="inherit_id" ref="sale.view_sale_advance_payment_inv"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//form" position="attributes">
|
||||||
|
<attribute name="string">FaPiao / Invoice Orders</attribute>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="sale.action_view_sale_advance_payment_inv" model="ir.actions.act_window">
|
||||||
|
<field name="name">Create FaPiao / Invoice</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
<xpath expr="//field[@name='parent_id']" position="attributes">
|
<xpath expr="//field[@name='parent_id']" position="attributes">
|
||||||
<!-- Add your fields or attributes here -->
|
<!-- Add your fields or attributes here -->
|
||||||
<attribute name="widget">ztree_select</attribute>
|
<attribute name="widget">ztree_select</attribute>
|
||||||
<attribute name="options">{'ztree_parent_key': 'parent_id','ztree_expend_level': '2', 'ztree_name_field': 'name'}</attribute>
|
<attribute name="options">{'ztree_parent_key': 'parent_id','ztree_expend_level': '1', 'ztree_name_field': 'name'}</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<xpath expr="//field[@name='department_id']" position="attributes">
|
<xpath expr="//field[@name='department_id']" position="attributes">
|
||||||
<!-- Add your fields or attributes here -->
|
<!-- Add your fields or attributes here -->
|
||||||
<attribute name="widget">ztree_select</attribute>
|
<attribute name="widget">ztree_select</attribute>
|
||||||
<attribute name="options">{'ztree_parent_key': 'parent_id','ztree_expend_level': '2', 'ztree_name_field': 'name'}</attribute>
|
<attribute name="options">{'ztree_parent_key': 'parent_id','ztree_expend_level': '1', 'ztree_name_field': 'name'}</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
6
app_mrp_workcenter_chart/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from . import models
|
||||||
|
from .hooks import pre_init_hook
|
||||||
|
from .hooks import post_init_hook
|
||||||
|
from .hooks import uninstall_hook
|
||||||
84
app_mrp_workcenter_chart/__manifest__.py
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Created on 2019-05-26
|
||||||
|
# author: 广州尚鹏,https://www.sunpop.cn
|
||||||
|
# email: 300883@qq.com
|
||||||
|
# resource of Sunpop
|
||||||
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
|
||||||
|
|
||||||
|
# Odoo12在线用户手册(长期更新)
|
||||||
|
# https://www.sunpop.cn/documentation/user/12.0/zh_CN/index.html
|
||||||
|
|
||||||
|
# Odoo12在线开发者手册(长期更新)
|
||||||
|
# https://www.sunpop.cn/documentation/12.0/index.html
|
||||||
|
|
||||||
|
# Odoo10在线中文用户手册(长期更新)
|
||||||
|
# https://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
|
||||||
|
|
||||||
|
# Odoo10离线中文用户手册下载
|
||||||
|
# https://www.sunpop.cn/odoo10_user_manual_document_offline/
|
||||||
|
# Odoo10离线开发手册下载-含python教程,jquery参考,Jinja2模板,PostgresSQL参考(odoo开发必备)
|
||||||
|
# https://www.sunpop.cn/odoo10_developer_document_offline/
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Copyright (C) 2009-TODAY Sunpop.cn Ltd. https://www.sunpop.cn
|
||||||
|
# Author: Ivan Deng,300883@qq.com
|
||||||
|
# You can modify it under the terms of the GNU LESSER
|
||||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
|
||||||
|
# See <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# It is forbidden to publish, distribute, sublicense, or sell copies
|
||||||
|
# of the Software or modified copies of the Software.
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
{
|
||||||
|
'name': "MRP Workcenter Parent Child Hierarchy,工作中心分级",
|
||||||
|
'version': '13.20.01.06',
|
||||||
|
'author': 'Sunpop.cn',
|
||||||
|
'category': 'Base',
|
||||||
|
'website': 'https://www.sunpop.cn',
|
||||||
|
'license': 'LGPL-3',
|
||||||
|
'sequence': 2,
|
||||||
|
'price': 0.00,
|
||||||
|
'currency': 'EUR',
|
||||||
|
'images': ['static/description/banner.png'],
|
||||||
|
'depends': [
|
||||||
|
'mrp_workorder',
|
||||||
|
'app_mrp_superbar',
|
||||||
|
],
|
||||||
|
'summary': """
|
||||||
|
Odoo App of Sunpop.cn
|
||||||
|
""",
|
||||||
|
'description': """
|
||||||
|
Support Odoo 12, 11, Enterprise and Community Edition
|
||||||
|
1. D
|
||||||
|
2.
|
||||||
|
11. Multi-language Support.
|
||||||
|
12. Multi-Company Support.
|
||||||
|
==========
|
||||||
|
1.
|
||||||
|
2.
|
||||||
|
11. 多语言支持
|
||||||
|
12. 多公司支持
|
||||||
|
""",
|
||||||
|
'data': [
|
||||||
|
# 'security/*.xml',
|
||||||
|
# 'security/ir.model.access.csv.csv',
|
||||||
|
# 'data/*.xml',
|
||||||
|
'views/mrp_workcenter_views.xml',
|
||||||
|
'views/mrp_workorder_views.xml',
|
||||||
|
],
|
||||||
|
'qweb': [
|
||||||
|
'static/src/xml/*.xml',
|
||||||
|
],
|
||||||
|
'demo': [],
|
||||||
|
'test': [],
|
||||||
|
'css': [],
|
||||||
|
'js': [],
|
||||||
|
# 'pre_init_hook': 'pre_init_hook',
|
||||||
|
# 'post_init_hook': 'post_init_hook',
|
||||||
|
# 'uninstall_hook': 'uninstall_hook',
|
||||||
|
'installable': True,
|
||||||
|
'application': True,
|
||||||
|
'auto_install': False,
|
||||||
|
}
|
||||||
32
app_mrp_workcenter_chart/hooks.py
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Created on 2018-10-12
|
||||||
|
# author: 广州尚鹏,https://www.sunpop.cn
|
||||||
|
# email: 300883@qq.com
|
||||||
|
# resource of Sunpop
|
||||||
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
|
||||||
|
|
||||||
|
# Odoo在线中文用户手册(长期更新)
|
||||||
|
# https://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
|
||||||
|
|
||||||
|
# Odoo10离线中文用户手册下载
|
||||||
|
# https://www.sunpop.cn/odoo10_user_manual_document_offline/
|
||||||
|
# Odoo10离线开发手册下载-含python教程,jquery参考,Jinja2模板,PostgresSQL参考(odoo开发必备)
|
||||||
|
# https://www.sunpop.cn/odoo10_developer_document_offline/
|
||||||
|
# description:
|
||||||
|
|
||||||
|
from odoo import api, SUPERUSER_ID, _
|
||||||
|
|
||||||
|
|
||||||
|
def pre_init_hook(cr):
|
||||||
|
pass
|
||||||
|
# cr.execute("")
|
||||||
|
|
||||||
|
def post_init_hook(cr, registry):
|
||||||
|
pass
|
||||||
|
# cr.execute("")
|
||||||
|
|
||||||
|
def uninstall_hook(cr, registry):
|
||||||
|
pass
|
||||||
|
# cr.execute("")
|
||||||
|
|
||||||
88
app_mrp_workcenter_chart/i18n/zh_CN.po
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * app_mrp_workcenter_chart
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 12.0+e-20190512\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2019-07-28 18:19+0000\n"
|
||||||
|
"PO-Revision-Date: 2019-07-28 18:19+0000\n"
|
||||||
|
"Last-Translator: <>\n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
|
#. module: app_mrp_workcenter_chart
|
||||||
|
#: model:ir.model.fields,field_description:app_mrp_workcenter_chart.field_mrp_workcenter__child_ids
|
||||||
|
msgid "Child WCs"
|
||||||
|
msgstr "下级工作中心"
|
||||||
|
|
||||||
|
#. module: app_mrp_workcenter_chart
|
||||||
|
#: model_terms:ir.ui.view,arch_db:app_mrp_workcenter_chart.app_mrp_workcenter_view
|
||||||
|
msgid "Hierarchy Chart"
|
||||||
|
msgstr "工作中心层级"
|
||||||
|
|
||||||
|
#. module: app_mrp_workcenter_chart
|
||||||
|
#: model:ir.model.fields,field_description:app_mrp_workcenter_chart.field_mrp_workcenter__image
|
||||||
|
msgid "Image"
|
||||||
|
msgstr "图像"
|
||||||
|
|
||||||
|
#. module: app_mrp_workcenter_chart
|
||||||
|
#: model:ir.model.fields,field_description:app_mrp_workcenter_chart.field_mrp_workcenter__child_all_count
|
||||||
|
msgid "Indirect Surbordinates Count"
|
||||||
|
msgstr "非直属下级数量"
|
||||||
|
|
||||||
|
#. module: app_mrp_workcenter_chart
|
||||||
|
#: model:ir.model.fields,field_description:app_mrp_workcenter_chart.field_mrp_workcenter__image_medium
|
||||||
|
msgid "Medium-sized image"
|
||||||
|
msgstr "中等尺寸图像"
|
||||||
|
|
||||||
|
#. module: app_mrp_workcenter_chart
|
||||||
|
#: model:ir.model.fields,help:app_mrp_workcenter_chart.field_mrp_workcenter__image_medium
|
||||||
|
msgid "Medium-sized image of this Category. It is automatically resized as a 128x128px image, with aspect ratio preserved. Use this field in form views or some kanban views."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: app_mrp_workcenter_chart
|
||||||
|
#: model:ir.model.fields,field_description:app_mrp_workcenter_chart.field_mrp_workcenter__parent_path
|
||||||
|
msgid "Parent Path"
|
||||||
|
msgstr "父级路径"
|
||||||
|
|
||||||
|
#. module: app_mrp_workcenter_chart
|
||||||
|
#: model:ir.model.fields,field_description:app_mrp_workcenter_chart.field_mrp_workcenter__parent_id
|
||||||
|
#: model_terms:ir.ui.view,arch_db:app_mrp_workcenter_chart.app_view_mrp_workcenter_search
|
||||||
|
msgid "Parent WC"
|
||||||
|
msgstr "上级工作中心"
|
||||||
|
|
||||||
|
#. module: app_mrp_workcenter_chart
|
||||||
|
#: model_terms:ir.ui.view,arch_db:app_mrp_workcenter_chart.app_mrp_workcenter_view
|
||||||
|
msgid "Please get widget from https://apps.odoo.com/apps/modules/12.0/app_web_chart_hierarchy/"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: app_mrp_workcenter_chart
|
||||||
|
#: model:ir.model.fields,field_description:app_mrp_workcenter_chart.field_mrp_workcenter__image_small
|
||||||
|
msgid "Small-sized image"
|
||||||
|
msgstr "小尺寸图像"
|
||||||
|
|
||||||
|
#. module: app_mrp_workcenter_chart
|
||||||
|
#: model:ir.model.fields,help:app_mrp_workcenter_chart.field_mrp_workcenter__image_small
|
||||||
|
msgid "Small-sized image of this Category. It is automatically resized as a 64x64px image, with aspect ratio preserved. Use this field anywhere a small image is required."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: app_mrp_workcenter_chart
|
||||||
|
#: model:ir.model.fields,help:app_mrp_workcenter_chart.field_mrp_workcenter__image
|
||||||
|
msgid "This field holds the image used as avatar for this category, limited to 1024x1024px"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: app_mrp_workcenter_chart
|
||||||
|
#: model:ir.model,name:app_mrp_workcenter_chart.model_mrp_workcenter
|
||||||
|
msgid "Work Center"
|
||||||
|
msgstr "工作中心"
|
||||||
|
|
||||||
|
#. module: app_mrp_workcenter_chart
|
||||||
|
#: model_terms:ir.ui.view,arch_db:app_mrp_workcenter_chart.app_mrp_workcenter_view
|
||||||
|
msgid "Work Center Name"
|
||||||
|
msgstr "工作中心名称"
|
||||||
|
|
||||||
3
app_mrp_workcenter_chart/models/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from . import mrp_workcenter
|
||||||
31
app_mrp_workcenter_chart/models/mrp_workcenter.py
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from odoo import api, fields, models, tools, _
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
class MrpWorkCenter(models.Model):
|
||||||
|
_name = 'mrp.workcenter'
|
||||||
|
_inherit = ['mrp.workcenter', 'image.mixin']
|
||||||
|
|
||||||
|
# 建立层级关系
|
||||||
|
_parent_name = "parent_id"
|
||||||
|
_parent_store = True
|
||||||
|
_parent_order = 'code'
|
||||||
|
|
||||||
|
parent_id = fields.Many2one('mrp.workcenter', 'Parent WC', index=True, ondelete='cascade')
|
||||||
|
parent_path = fields.Char(index=True)
|
||||||
|
child_ids = fields.One2many('mrp.workcenter', 'parent_id', 'Child WCs')
|
||||||
|
child_all_count = fields.Integer(
|
||||||
|
'Indirect Surbordinates Count',
|
||||||
|
compute='_compute_child_all_count', store=False)
|
||||||
|
parent_path = fields.Char(index=True)
|
||||||
|
|
||||||
|
@api.depends('child_ids.child_all_count')
|
||||||
|
def _compute_child_all_count(self):
|
||||||
|
for rec in self:
|
||||||
|
rec.child_all_count = len(rec.child_ids) + sum(child.child_all_count for child in rec.child_ids)
|
||||||
|
|
||||||
2
app_mrp_workcenter_chart/report/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
51
app_mrp_workcenter_chart/security/app_security.xml
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data noupdate="1">
|
||||||
|
<!-- model权限 -->
|
||||||
|
<record id="acc_module" model="ir.model.access">
|
||||||
|
<field name="name">acc_module_user</field>
|
||||||
|
<field name="model_id" ref="model_app_order"/>
|
||||||
|
<field name="group_id" ref="base.group_user"/>
|
||||||
|
<field name="perm_read" eval="1"/>
|
||||||
|
<field name="perm_write" eval="1"/>
|
||||||
|
<field name="perm_create" eval="1"/>
|
||||||
|
<field name="perm_unlink" eval="1"/>
|
||||||
|
</record>
|
||||||
|
<!-- 应用权限目录 -->
|
||||||
|
<record model="ir.module.category" id="app_module_category_1">
|
||||||
|
<field name="name">App...</field>
|
||||||
|
<field name="description">Helps you manage your ...</field>
|
||||||
|
<field name="sequence">8</field>
|
||||||
|
</record>
|
||||||
|
<!-- 权限用户 -->
|
||||||
|
<!-- 普通 -->
|
||||||
|
<record id="group_app_user" model="res.groups">
|
||||||
|
<field name="name">App User</field>
|
||||||
|
<field name="category_id" ref="app_module_category_1"/>
|
||||||
|
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
|
||||||
|
<field name="comment">The user will be able to ...</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- 管理员,可以配置 -->
|
||||||
|
<record id="group_app_admin" model="res.groups">
|
||||||
|
<field name="name">App Admin</field>
|
||||||
|
<field name="category_id" ref="app_module_category_1"/>
|
||||||
|
<field name="implied_ids" eval="[(4, ref('group_app_user'))]"/>
|
||||||
|
<field name="comment">The user will be able to config ...</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- group_erp_manager自动有完整权限 -->
|
||||||
|
<record id="base.group_erp_manager" model="res.groups">
|
||||||
|
<field name="implied_ids" eval="[(4, ref('group_app_admin'))]"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Rules -->
|
||||||
|
<record id="rule_user" model="ir.rule">
|
||||||
|
<field name="name">Users are allowed to access their own m///</field>
|
||||||
|
<field name="model_id" ref="model_app_order"/>
|
||||||
|
<field name="domain_force">['|', ('partner_id', 'in', [user.partner_id.id]), ('user_id.id', '=', user.id)]</field>
|
||||||
|
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
|
||||||
|
</record>
|
||||||
|
<!--End -->
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
1
app_mrp_workcenter_chart/security/ir.model.access.csv
Normal file
@@ -0,0 +1 @@
|
|||||||
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
|
BIN
app_mrp_workcenter_chart/static/description/banner.png
Normal file
|
After Width: | Height: | Size: 241 KiB |
BIN
app_mrp_workcenter_chart/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
73
app_mrp_workcenter_chart/static/description/index.html
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
<section class="oe_container">
|
||||||
|
<div class="oe_row oe_spaced" >
|
||||||
|
<div class="oe_span12">
|
||||||
|
<h2 class="oe_slogan"> </h2>
|
||||||
|
<h3 class="oe_slogan"> </h3>
|
||||||
|
<div class="oe_row">
|
||||||
|
<h3>Lastest update: v12.19.04.28</h3>
|
||||||
|
<div class="oe_span12">
|
||||||
|
<img class="oe_demo oe_screenshot" style="max-height: 100%;" src="banner.png">
|
||||||
|
</div>
|
||||||
|
<div class="oe_span12 oe_spaced">
|
||||||
|
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
|
||||||
|
<i class="fa fa-hand-o-right"></i><b> Key features: </b>
|
||||||
|
<ul class="list-unstyled">
|
||||||
|
<li>
|
||||||
|
<i class="fa fa-check-square-o text-primary"></i>
|
||||||
|
Put key function here.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="oe_container">
|
||||||
|
<div class="oe_row oe_spaced">
|
||||||
|
<h1 class="text-danger text-center">So Easy to navigator and search any data.</h1>
|
||||||
|
<h4 class="oe_slogan"> </h4>
|
||||||
|
<div class="oe_demo oe_screenshot">
|
||||||
|
<img src=".jpg"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="oe_container oe_dark">
|
||||||
|
<div class="oe_row oe_spaced text-center">
|
||||||
|
<div class="oe_span12">
|
||||||
|
<h2 class="oe_slogan">Technical Help & Support</h2>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12 pad0">
|
||||||
|
<div class="oe_mt16">
|
||||||
|
<p><h4>
|
||||||
|
For any type of technical help & support requests, Feel free to contact us</h4></p>
|
||||||
|
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
|
||||||
|
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:guohuadeng@hotmail.com"><span
|
||||||
|
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
|
||||||
|
<i class="fa fa-envelope"></i> guohuadeng@hotmail.com</a>
|
||||||
|
<p><h4>
|
||||||
|
Via QQ: 300883 (App user would not get QQ or any other IM support. Only for odoo project customize.)</h4></p>
|
||||||
|
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
|
||||||
|
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:300883@qq.com"><span
|
||||||
|
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
|
||||||
|
<i class="fa fa-envelope"></i> 300883@qq.com</a>
|
||||||
|
</div>
|
||||||
|
<div class="oe_mt16">
|
||||||
|
<p><h4>
|
||||||
|
Visit our website for more support.</h4></p>
|
||||||
|
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
|
||||||
|
class="btn btn-warning btn-lg" rel="nofollow" href="https://www.sunpop.cn" target="_blank"><span
|
||||||
|
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
|
||||||
|
<i class="fa fa-web"></i>https://www.sunpop.cn</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="oe_row oe_spaced text-center">
|
||||||
|
<h1>More Powerful addons, Make your odoo very easy to use, easy customize:
|
||||||
|
<a class="btn btn-primary mb16" href="http://www.odoo.com/apps/modules/browse?author=Sunpop.cn">Supop.cn Odoo Addons</a>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
BIN
app_mrp_workcenter_chart/static/img/icon_sunpop.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
app_mrp_workcenter_chart/static/img/logo_sunpop.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
116
app_mrp_workcenter_chart/views/mrp_workcenter_views.xml
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
<record id="app_mrp_workcenter_view" model="ir.ui.view">
|
||||||
|
<field name="name">mrp.workcenter.form</field>
|
||||||
|
<field name="model">mrp.workcenter</field>
|
||||||
|
<field name="inherit_id" ref="mrp.mrp_workcenter_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='name']" position="after">
|
||||||
|
<field name="parent_id" widget="ztree_select"/>
|
||||||
|
</xpath>
|
||||||
|
<!-- <xpath expr="//field[@name='code']" position="after">-->
|
||||||
|
<!-- <field name="sequence"/>-->
|
||||||
|
<!-- </xpath>-->
|
||||||
|
<xpath expr="//field[@name='name']" position="replace"/>
|
||||||
|
<xpath expr="//field[@name='costs_hour']" position="after">
|
||||||
|
<xpath expr="//field[@name='resource_calendar_id']" position="move"/>
|
||||||
|
</xpath>
|
||||||
|
<!-- 引入树结构图 -->
|
||||||
|
<xpath expr="//group[1]" position="before">
|
||||||
|
<div id="o_node_container">
|
||||||
|
<div id="o_node_main">
|
||||||
|
<field name="image_128" widget="image" class="oe_avatar"
|
||||||
|
options="{'preview_image': 'image_128', 'size': [90, 90]}"/>
|
||||||
|
<div class="oe_title">
|
||||||
|
<label for="name" class="oe_edit_only"/>
|
||||||
|
<h1>
|
||||||
|
<field name="name" placeholder="Work Center Name " required="True"/>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<span id="add_group"/>
|
||||||
|
<span id="add_notebook"/>
|
||||||
|
</div>
|
||||||
|
<div id="o_node_right">
|
||||||
|
<h4 class="o_chart_hierarchy_title mb16 mt0">Hierarchy Chart</h4>
|
||||||
|
<field name="child_ids" widget="web_chart_hierarchy"
|
||||||
|
string="Please get widget from https://apps.odoo.com/apps/modules/13.0/app_web_chart_hierarchy/"
|
||||||
|
options="{
|
||||||
|
'image': 'image_128',
|
||||||
|
'desc': 'code',
|
||||||
|
'direct_sub': 'child_ids',
|
||||||
|
'child_all_count':'child_all_count'}"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//span[@id='add_group']" position="after">
|
||||||
|
<xpath expr="//group[1]" position="move"/>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//span[@id='add_notebook']" position="after">
|
||||||
|
<xpath expr="//notebook" position="move"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="app_mrp_workcenter_tree_view" model="ir.ui.view">
|
||||||
|
<field name="name">mrp.workcenter.tree</field>
|
||||||
|
<field name="model">mrp.workcenter</field>
|
||||||
|
<field name="inherit_id" ref="mrp.mrp_workcenter_tree_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='name']" position="after">
|
||||||
|
<field name="parent_id"/>
|
||||||
|
<field name="note"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
<!--常规kanban-->
|
||||||
|
<record id="app_mrp_workcenter_view_kanban" model="ir.ui.view">
|
||||||
|
<field name="name">app.mrp.workcenter.kanban1</field>
|
||||||
|
<field name="model">mrp.workcenter</field>
|
||||||
|
<field name="inherit_id" ref="mrp.mrp_workcenter_view_kanban"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//kanban" position="attributes">
|
||||||
|
<attribute name="default_group_by">parent_id</attribute>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
<!-- 工单kanban-->
|
||||||
|
<record id="app_mrp_workcenter_kanban" model="ir.ui.view">
|
||||||
|
<field name="name">app.mrp.workcenter.kanban2</field>
|
||||||
|
<field name="model">mrp.workcenter</field>
|
||||||
|
<field name="inherit_id" ref="mrp.mrp_workcenter_kanban"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//kanban/field[1]" position="after">
|
||||||
|
<field name="code"/>
|
||||||
|
<field name="note"/>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//templates//field[@name='name']" position="before">
|
||||||
|
<span t-if="record.code.raw_value">[<field name="code"/>]</span>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- 增加字段,superbar -->
|
||||||
|
<record id="app_view_mrp_workcenter_search" model="ir.ui.view">
|
||||||
|
<field name="name">mrp.workcenter.search</field>
|
||||||
|
<field name="model">mrp.workcenter</field>
|
||||||
|
<field name="inherit_id" ref="mrp.view_mrp_workcenter_search"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='name']" position="after">
|
||||||
|
<field name="code" string="code"/>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//group" position="inside">
|
||||||
|
<filter string="Parent WC" name="group_by_parent_id" context="{'group_by':'parent_id'}"/>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//search" position="inside">
|
||||||
|
<superbar view_types="kanban,tree">
|
||||||
|
<field name="parent_id" domain="[('child_ids', '!=', False)]"/>
|
||||||
|
</superbar>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="mrp.mrp_workcenter_kanban_action" model="ir.actions.act_window">
|
||||||
|
<field name="context">{'search_default_group_by_parent_id':1}</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
14
app_mrp_workcenter_chart/views/mrp_workorder_views.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<!--搜索加 superbar-->
|
||||||
|
<record model="ir.ui.view" id="app_view_mrp_production_workorder_form_view_filter">
|
||||||
|
<field name="name">app.mrp.production.work.order.select</field>
|
||||||
|
<field name="model">mrp.workorder</field>
|
||||||
|
<field name="inherit_id" ref="app_mrp_superbar.app_view_mrp_production_workorder_form_view_filter"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//superbar//field[@name='workcenter_id']" position="replace">
|
||||||
|
<field name="workcenter_id" options="{'ztree_parent_key': 'parent_id','ztree_expend_level': '1', 'ztree_name_field': 'name'}"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Odoo Customize(Boost,Debranding, My Odoo)',
|
'name': 'Odoo Customize(Boost,Debranding, My Odoo)',
|
||||||
'version': '13.19.12.09',
|
'version': '13.20.01.06',
|
||||||
'author': 'Sunpop.cn',
|
'author': 'Sunpop.cn',
|
||||||
'category': 'Productivity',
|
'category': 'Productivity',
|
||||||
'website': 'https://www.sunpop.cn',
|
'website': 'https://www.sunpop.cn',
|
||||||
@@ -68,6 +68,7 @@
|
|||||||
25. Add remove expense data
|
25. Add remove expense data
|
||||||
26. Add multi uninstall modules
|
26. Add multi uninstall modules
|
||||||
27. Add odoo boost modules link.
|
27. Add odoo boost modules link.
|
||||||
|
28. Easy Menu manager.
|
||||||
|
|
||||||
This module can help to white label the Odoo.
|
This module can help to white label the Odoo.
|
||||||
Also helpful for training and support for your odoo end-user.
|
Also helpful for training and support for your odoo end-user.
|
||||||
@@ -89,6 +90,7 @@
|
|||||||
'views/res_config_settings_views.xml',
|
'views/res_config_settings_views.xml',
|
||||||
'views/ir_model_views.xml',
|
'views/ir_model_views.xml',
|
||||||
'views/ir_views.xml',
|
'views/ir_views.xml',
|
||||||
|
'views/ir_ui_menu_views.xml',
|
||||||
# data
|
# data
|
||||||
'data/ir_config_parameter.xml',
|
'data/ir_config_parameter.xml',
|
||||||
'data/ir_module_module.xml',
|
'data/ir_module_module.xml',
|
||||||
@@ -108,5 +110,5 @@
|
|||||||
# 'post_init_hook': 'post_init_hook',
|
# 'post_init_hook': 'post_init_hook',
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'application': True,
|
'application': True,
|
||||||
'auto_install': False,
|
'auto_install': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -367,6 +367,7 @@ class ResConfigSettings(models.TransientModel):
|
|||||||
def remove_account(self):
|
def remove_account(self):
|
||||||
to_removes = [
|
to_removes = [
|
||||||
# 清除财务会计单据
|
# 清除财务会计单据
|
||||||
|
['payment.transaction', ],
|
||||||
['account.voucher.line', ],
|
['account.voucher.line', ],
|
||||||
['account.voucher', ],
|
['account.voucher', ],
|
||||||
['account.bank.statement.line', ],
|
['account.bank.statement.line', ],
|
||||||
@@ -517,6 +518,7 @@ class ResConfigSettings(models.TransientModel):
|
|||||||
['blog.tag', ],
|
['blog.tag', ],
|
||||||
['blog.post', ],
|
['blog.post', ],
|
||||||
['blog.blog', ],
|
['blog.blog', ],
|
||||||
|
['product.wishlist', ],
|
||||||
['website.published.multi.mixin', ],
|
['website.published.multi.mixin', ],
|
||||||
['website.published.mixin', ],
|
['website.published.mixin', ],
|
||||||
['website.multi.mixin', ],
|
['website.multi.mixin', ],
|
||||||
@@ -524,6 +526,7 @@ class ResConfigSettings(models.TransientModel):
|
|||||||
['website.seo.metadata', ],
|
['website.seo.metadata', ],
|
||||||
['website.page', ],
|
['website.page', ],
|
||||||
['website.menu', ],
|
['website.menu', ],
|
||||||
|
['website.visitor', ],
|
||||||
['website', ],
|
['website', ],
|
||||||
]
|
]
|
||||||
try:
|
try:
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 159 KiB |
BIN
app_odoo_customize/static/description/banner1.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
22
app_odoo_customize/views/ir_ui_menu_views.xml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data noupdate="0">
|
||||||
|
<!-- 将菜单管理在设置中提前-->
|
||||||
|
<record id="base.menu_grant_menu_access" model="ir.ui.menu">
|
||||||
|
<field name="parent_id" ref="base.menu_administration"/>
|
||||||
|
</record>
|
||||||
|
<record id="app_edit_menu_access_search" model="ir.ui.view">
|
||||||
|
<field name="name">app.ir.ui.menu.search</field>
|
||||||
|
<field name="model">ir.ui.menu</field>
|
||||||
|
<field name="inherit_id" ref="base.edit_menu_access_search"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<filter name="inactive" position="before">
|
||||||
|
<filter string="Top Menu" name="top_menu" domain="[('parent_id','=', False)]"/>
|
||||||
|
</filter>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
<record id="base.grant_menu_access" model="ir.actions.act_window">
|
||||||
|
<field name="context">{'ir.ui.menu.full_list': True, 'search_default_top_menu': 1}</field>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': "App product browse by category navigator",
|
'name': "App product browse by category navigator",
|
||||||
'version': '13.19.09.27',
|
'version': '13.19.12.31',
|
||||||
'author': 'Sunpop.cn',
|
'author': 'Sunpop.cn',
|
||||||
'category': 'Base',
|
'category': 'Base',
|
||||||
'website': 'https://www.sunpop.cn',
|
'website': 'https://www.sunpop.cn',
|
||||||
|
|||||||
@@ -8,9 +8,7 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//search">
|
<xpath expr="//search">
|
||||||
<superbar>
|
<superbar>
|
||||||
<!--text表示主显示字段是哪个-->
|
|
||||||
<field name="categ_id" widget="ztree_select" text="name"/>
|
<field name="categ_id" widget="ztree_select" text="name"/>
|
||||||
<!-- <field name="categ_id" select="multi" groupby="parent_id"/>-->
|
|
||||||
<field name="type"/>
|
<field name="type"/>
|
||||||
</superbar>
|
</superbar>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<xpath expr="//field[@name='categ_id']" position="attributes">
|
<xpath expr="//field[@name='categ_id']" position="attributes">
|
||||||
<!-- Add your fields or attributes here -->
|
<!-- Add your fields or attributes here -->
|
||||||
<attribute name="widget">ztree_select</attribute>
|
<attribute name="widget">ztree_select</attribute>
|
||||||
<attribute name="options">{'ztree_parent_key': 'parent_id','ztree_expend_level': '2', 'ztree_name_field': 'name', 'order': 'name' }</attribute>
|
<attribute name="options">{'ztree_parent_key': 'parent_id','ztree_expend_level': '1', 'ztree_name_field': 'name', 'order': 'name' }</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<xpath expr="//field[@name='parent_id']" position="attributes">
|
<xpath expr="//field[@name='parent_id']" position="attributes">
|
||||||
<!-- Add your fields or attributes here -->
|
<!-- Add your fields or attributes here -->
|
||||||
<attribute name="widget">ztree_select</attribute>
|
<attribute name="widget">ztree_select</attribute>
|
||||||
<attribute name="options">{'ztree_parent_key': 'parent_id','ztree_expend_level': '2', 'order': 'name' }</attribute>
|
<attribute name="options">{'ztree_parent_key': 'parent_id','ztree_expend_level': '1', 'order': 'name' }</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<xpath expr="//field[@name='location_id']" position="attributes">
|
<xpath expr="//field[@name='location_id']" position="attributes">
|
||||||
<!-- Add your fields or attributes here -->
|
<!-- Add your fields or attributes here -->
|
||||||
<attribute name="widget">ztree_select</attribute>
|
<attribute name="widget">ztree_select</attribute>
|
||||||
<attribute name="options">{'ztree_parent_key': 'location_id','ztree_expend_level': '2', 'ztree_name_field': 'name'}</attribute>
|
<attribute name="options">{'ztree_parent_key': 'location_id','ztree_expend_level': '1', 'ztree_name_field': 'name'}</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -60,5 +60,10 @@
|
|||||||
.o_content > .o_list_view > .table-responsive > .table .o_optional_columns_dropdown_toggle {
|
.o_content > .o_list_view > .table-responsive > .table .o_optional_columns_dropdown_toggle {
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Kanban
|
||||||
|
|
||||||
|
.o_kanban_view.o_kanban_grouped .o_kanban_record {
|
||||||
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
<data>
|
||||||
<template id="assets_backend" name="app_web_fullwidth asset" inherit_id="web.assets_backend">
|
<template id="assets_backend" name="app_web_fullwidth asset" inherit_id="web.assets_backend">
|
||||||
<xpath expr="." position="inside">
|
<xpath expr="//link[last()]" position="after">
|
||||||
<link rel="stylesheet" type="text/scss" href="/app_web_fullwidth/static/src/scss/style.scss"/>
|
<link rel="stylesheet" type="text/scss" href="/app_web_fullwidth/static/src/scss/style.scss"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
</data>
|
</data>
|
||||||
</odoo>
|
</odoo>
|
||||||
@@ -42,5 +42,5 @@
|
|||||||
'templates/assets.xml',
|
'templates/assets.xml',
|
||||||
],
|
],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'auto_install': True,
|
'auto_install': False,
|
||||||
}
|
}
|
||||||
|
|||||||