init app_odoo v12

This commit is contained in:
ivan deng
2018-09-17 13:13:28 +08:00
parent b9ff0c210b
commit 17963fab85
223 changed files with 447 additions and 10032 deletions

View File

@@ -1,3 +0,0 @@
# -*- coding: utf-8 -*-

View File

@@ -1,34 +0,0 @@
{
'name': 'App Customize Columns of List (Tree) View Dynamic',
'version': '10.0.1.6',
'author': 'Sunpop.cn',
'category': 'Productivity',
'website': 'http://www.odooapp.cn',
'sequence': 2,
'summary': 'App Customize columns of List (Tree) View. Dynamic list.',
'description': """
App Customize Columns of List (Tree) View
============
App Customize Columns of List (Tree) View module is made to show/hide the columns on the list/tree view of Odoo. After installing the module, a "Set Columns" button will be show to the list view.
You can customize every odoo list/tree view easily.
This module is ready for Community and Enterprise Edition.
""",
'images': ['static/description/sales_coms.jpg'
],
'depends': ['web'],
'data': [
'views/listview_button.xml',
],
'demo': [],
'test': [
],
'installable': True,
'application': True,
'auto_install': False,
'qweb': ['static/src/xml/listview_button_view.xml'],
}

View File

@@ -1,24 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * apps_material_backend_theme
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-07 08:57+0000\n"
"PO-Revision-Date: 2016-09-07 08:57+0000\n"
"Last-Translator: Ivan Deng <300883@qq.com>, 2017\n"
"Language-Team: Chinese (China) (https://www.transifex.com/odoo/teams/41243/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#. module: app_dynamic_list
#. openerp-web
#: code:addons/apps_material_backend_theme/static/src/xml/listview_button_view.xml:121
#, python-format
msgid "Set Columns"
msgstr "显示列"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

View File

@@ -1,62 +0,0 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<h2 class="oe_slogan">Customize hide/show the columns on the list (tree) view dynamically</h2>
<div class="oe_demo" style=" margin: 30px auto 0; padding: 0 15px 0 0; border:none; width: 96%;">
<p>This moduld allows user to customize columns dynamically in list (tree) view of any object of any
installed module. </p>
<br>
<p>"Set Columns" button contains all field(s) in dropdown with checkbox which will exist in
list view of current object. So if user wants to show/hide any field, then he/she has to just do
check/uncheck that respective checkbox besides field name in dropdown list and then just click on
"Apply" button.</p>
</div>
</div>
</div>
<div class="oe_row oe_spaced">
<div class="oe_demo"
style=" margin: 60px auto 0; padding: 0 15px 0 0; border:none; border-top:solid 1px #dedede; width: 96%;">
<ul>
<li><p class='oe_mt32'>Sales leads in Enterprise Edition</p></li>
</ul>
</div>
<div class="oe_demo oe_picture oe_screenshot">
<img src="sales_ent.png" style="border:1px solid black"/>
<br/>
</div>
<div class="oe_demo"
style=" margin: 60px auto 0; padding: 0 15px 0 0; border:none; border-top:solid 1px #dedede; width: 96%;">
<ul>
<li><p class='oe_mt32'>Sales leads in Community Edition</p></li>
</ul>
</div>
<div class="oe_demo oe_picture oe_screenshot">
<img src="sales_com.png" style="border:1px solid black"/>
<br/>
</div>
</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>
</div>
</div>
</div>
</section>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

View File

@@ -1,97 +0,0 @@
odoo.define('app_dynamic_list.shcolumns', function (require) {
"use strict";
var core = require('web.core');
var ListView = require('web.ListView');
var QWeb = core.qweb;
ListView.include({
reload: function () {
this.setup_columns(this.fields_view.fields, this.grouped);
this.$el.html(QWeb.render(this._template, this));
return this.reload_content();
},
render_buttons: function($node) {
var self = this;
this._super($node);
this.$buttons.find('.oe_select_columns').click(this.proxy('my_setup_columns'));
this.$buttons.find('.oe_dropdown_btn').click(this.proxy('hide_show_columns'));
this.$buttons.find('.dropdown-menu').click(this.proxy('stop_event'));
},
my_setup_columns: function (fields, grouped) {
$("#showcb").toggle();
var getcb = document.getElementById('showcb');
this.visible_columns = _.filter(this.columns, function (column) {
var firstcheck = document.getElementById(column.id);
if(firstcheck == null)
{
var li= document.createElement("li");
var description = document.createTextNode(column.string);
var checkbox = document.createElement("input");
checkbox.id = column.id;
checkbox.type = "checkbox";
checkbox.name = "cb";
if(column.invisible !== '1')
{
checkbox.checked = true;
}
li.appendChild(checkbox);
li.appendChild(description);
getcb.appendChild(li);
}
else
{
if(column.invisible !== '1')
{
firstcheck.checked = true;
}
else
{
firstcheck.checked = false;
}
}
});
},
stop_event : function(e)
{
e.stopPropagation();
},
hide_show_columns : function()
{
$("#showcb").hide();
this.setup_columns(this.fields_view.fields, this.grouped);
this.$el.html(QWeb.render(this._template, this));
return this.reload_content();
},
setup_columns: function (fields, grouped) {
this._super(fields, grouped);
this.visible_columns = _.filter(this.columns, function (column) {
var cbid = document.getElementById(column.id);
if(cbid !== null)
{
var cbid = cbid.checked;
if(cbid !== false)
{
column.invisible = '2';
}
else
{
column.invisible = '1';
}
}
return column.invisible !== '1';
});
this.aggregate_columns = _(this.visible_columns).invoke('to_aggregate');
},
});
$(document).click(function(){
$("#showcb").hide();
});
});

View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<templates t-name="selectcolumns">
<t t-extend="ListView.buttons">
<t t-jquery="button.o_list_button_add" t-operation="after">
<div class="btn-group o_dropdown">
<button name="select_columns" id="select_columns"
class="oe_select_columns btn btn-default btn-sm dropdown-toggle"
data-toggle="dropdown">
Set Columns
<span class="caret"></span>
</button>
<ul id="showcb" class="dropdown-menu" style="padding:10px">
<li>
<button name="apply" id="apply" class="oe_dropdown_btn btn btn-primary btn-block">
Apply
</button>
</li>
</ul>
</div>
</t>
</t>
</templates>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="assets_backend" name="listview" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/app_dynamic_list/static/src/css/my.css"/>
<script type="text/javascript" src="/app_dynamic_list/static/src/js/dynamic_list.js"></script>
</xpath>
</template>
</data>
</openerp>

View File

@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
import models
from . import models

View File

@@ -15,19 +15,23 @@
# http://www.sunpop.cn/odoo10_developer_document_offline/
# description:
{
'name': 'App Odoo Customize(Backend Debranding Title,Language,Documentation,Quick Debug,Delete clear)',
'version': '10.0.2.4',
'name': 'App Odoo Customize(Backend Debranding Title,Language,Documentation,Quick Debug,Clear Data)',
'version': '11.0.9.12',
'author': 'Sunpop.cn',
'category': 'Productivity',
'website': 'http://www.sunpop.cn',
'license': 'AGPL-3',
'sequence': 2,
'summary': 'Quick customize and debranding your own Odoo. Quick debug, Language Switcher, Online Documentation Access,Delete test data.',
'summary': """
Keyword: odoo debrand, odoo debranding, customize my odoo.
Quick customize and debranding your own Odoo. Quick debug, Language Switcher, Online Documentation Access,Delete test data.
""",
'description': """
App Odoo Customize(Debranding Title,Language,Documentation,Quick Debug)
============
White label odoo.
Support Odoo 11, 10, 9.
You can config odoo, make it look like your own platform.
1. Deletes Odoo label in footer
2. Replaces "Odoo" in Windows title
@@ -42,10 +46,12 @@ You can config odoo, make it look like your own platform.
11. Provide 236 country flags.
12. Multi-language Support.
13. Change Powered by Odoo in login screen.(Please change '../views/app_odoo_customize_view.xml' #15)
14. Quick delete test data in Apps: Sales/POS/Purchase/MRP/Inventory/Accounting/Message/Workflow etc.
14. Quick delete test data in Apps: Sales/POS/Purchase/MRP/Inventory/Accounting/Project/Message/Workflow etc.
15. Reset All the Sequence to beginning of 1: SO/PO/MO/Invoice...
16. Fix odoo reload module translation bug while enable english language
17. Stop Odoo Auto Subscribe(Performance Improve)
18. Show/Hide Author and Website in Apps Dashboard
19. One Click to clear all data (Sometime pls click twice)
This module can help to white label the Odoo.
Also helpful for training and support for your odoo end-user.
@@ -53,12 +59,16 @@ The user can get the help document just by one click.
""",
'images': ['static/description/banner.png'],
'depends': ['web','mail'],
'depends': ['base', 'web', 'mail'],
'data': [
'views/app_odoo_customize_view.xml',
'views/app_theme_config_settings_view.xml',
'views/ir_model_view.xml',
# data
'data/ir_config_parameter.xml',
'data/res_company_data.xml',
'data/res_groups.xml',
'security/ir.model.access.csv',
],
'demo': [],
'test': [
@@ -70,4 +80,3 @@ The user can get the help document just by one click.
'static/src/xml/customize_user_menu.xml',
],
}

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="0">
<!-- 创建数据库时首个公司信息 -->
<record id="base.main_company" model="res.company">
<field name="website">http://www.sunpop.cn</field>
<field name="logo" type="base64" file="app_odoo_customize/static/src/img/logo_sunpop.png"/>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="0">
<record id="group_show_author_in_apps" model="res.groups">
<field name="name">Show Author and Website in Apps Dashboard</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
</data>
</openerp>

View File

@@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0+e-20171107\n"
"Project-Id-Version: Odoo Server 11.0+e-20180313\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-10 11:41+0000\n"
"PO-Revision-Date: 2018-01-10 11:41+0000\n"
"POT-Creation-Date: 2018-03-22 17:49+0000\n"
"PO-Revision-Date: 2018-03-22 17:49+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -34,6 +34,11 @@ msgstr "激活开发者模式"
msgid "Activate the developer mode (with assets)"
msgstr "激活开发者模式 (assets)"
#. module: app_odoo_customize
#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
msgid "All Business"
msgstr "所有业务"
#. module: app_odoo_customize
#: model:ir.model,name:app_odoo_customize.model_app_theme_config_settings
msgid "App Odoo Customize settings"
@@ -57,7 +62,7 @@ msgstr "取消"
#. module: app_odoo_customize
#: model:ir.model.fields,help:app_odoo_customize.field_app_theme_config_settings_app_stop_subscribe
msgid "Check to stop Odoo Subscribe function"
msgstr "Check to stop Odoo Subscribe function"
msgstr "选中可停止odoo内置的用户消息订阅"
#. module: app_odoo_customize
#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_create_uid
@@ -86,6 +91,11 @@ msgstr "取消激活开发者模式"
msgid "Delete All BOM"
msgstr "删除所有物料清单"
#. module: app_odoo_customize
#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
msgid "Delete All MRP/Sale/Purchase/Account/MRP/Inventory/Project/Message/Workflow"
msgstr "清除所有业务数据 MRP/Sale/Purchase/Account/MRP/Inventory/Project/Message/Workflow"
#. module: app_odoo_customize
#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
msgid "Delete All Manufacturing Order"
@@ -116,6 +126,11 @@ msgstr "删除所有产品及变体"
msgid "Delete All Product Attribute"
msgstr "删除所有产品属性"
#. module: app_odoo_customize
#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
msgid "Delete All Project/Task/Forecast"
msgstr "删除所有项目/任务/预测"
#. module: app_odoo_customize
#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
msgid "Delete All Purchase Order and Requisition"
@@ -186,12 +201,12 @@ msgstr "显示/隐藏菜单项"
#. module: app_odoo_customize
#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings___last_update
msgid "Last Modified on"
msgstr "最后修改"
msgstr "最后修改时间"
#. module: app_odoo_customize
#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_write_uid
msgid "Last Updated by"
msgstr "最后更新"
msgstr "最后更新"
#. module: app_odoo_customize
#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_write_date
@@ -229,9 +244,9 @@ msgid "Please confirm to delete the select data?"
msgstr "确认删除指定数据?"
#. module: app_odoo_customize
#: model:ir.ui.view,arch_db:app_odoo_customize.replace_login
msgid "Powered by <span>odooApp</span>"
msgstr "技术支持 <span>odooApp</span>"
#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
msgid "Project"
msgstr "项目"
#. module: app_odoo_customize
#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
@@ -248,6 +263,12 @@ msgstr "销售"
msgid "Setup System Name,which replace Odoo"
msgstr "设置系统名称取代Odoo"
#. module: app_odoo_customize
#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_group_show_author_in_apps
#: model:res.groups,name:app_odoo_customize.group_show_author_in_apps
msgid "Show Author and Website in Apps Dashboard"
msgstr "显示应用的作者和网站-在应用安装面板中"
#. module: app_odoo_customize
#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_app_show_documentation_dev
msgid "Show Developer Documentation"
@@ -309,6 +330,11 @@ msgstr "支持链接"
msgid "System Name"
msgstr "系统名称"
#. module: app_odoo_customize
#: model:ir.model.fields,help:app_odoo_customize.field_app_theme_config_settings_group_show_author_in_apps
msgid "Uncheck to Hide Author and Website in Apps Dashboard"
msgstr "Uncheck to Hide Author and Website in Apps Dashboard"
#. module: app_odoo_customize
#: model:ir.model.fields,help:app_odoo_customize.field_app_theme_config_settings_app_show_enterprise
msgid "Uncheck to hide the Enterprise tag"
@@ -379,17 +405,17 @@ msgstr "个性化odoo设置"
msgid "ir.ui.view"
msgstr "ir.ui.view"
#. module: app_odoo_customize
#: model:ir.ui.menu,name:base.menu_app_group
msgid "odooApp"
msgstr "odooApp"
#. module: app_odoo_customize
#: model:ir.actions.act_window,name:app_odoo_customize.action_app_theme_config
#: model:ir.ui.menu,name:app_odoo_customize.menu_app_theme_config
msgid "odooApp Customize"
msgstr "odooApp 定制"
#. module: app_odoo_customize
#: model:ir.ui.menu,name:app_odoo_customize.menu_app_group
msgid "odooApp"
msgstr "odooApp"
#. module: app_odoo_customize
#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
msgid "odooApp Customize Settings"

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import ir_ui_view
import app_theme_config_settings
import base_language_install
import mail_thread
from . import app_theme_config_settings
from . import ir_ui_view
from . import base_language_install
# from . import mail_thread

View File

@@ -25,6 +25,8 @@ class AppThemeConfigSettings(models.TransientModel):
app_show_share = fields.Boolean('Show Share Dashboard', help=u"Uncheck to hide the Odoo Share Dashboard")
app_show_poweredby = fields.Boolean('Show Powered by Odoo', help=u"Uncheck to hide the Powered by text")
app_stop_subscribe = fields.Boolean('Stop Odoo Subscribe(Performance Improve)', help=u"Check to stop Odoo Subscribe function")
group_show_author_in_apps = fields.Boolean(string="Show Author and Website in Apps Dashboard", implied_group='app_odoo_customize.group_show_author_in_apps',
help=u"Uncheck to Hide Author and Website in Apps Dashboard")
app_documentation_url = fields.Char('Documentation Url')
app_documentation_dev_url = fields.Char('Developer Documentation Url')
@@ -33,28 +35,28 @@ class AppThemeConfigSettings(models.TransientModel):
app_account_url = fields.Char('My Odoo.com Account Url')
@api.model
def get_default_all(self, fields):
def get_values(self):
ir_config = self.env['ir.config_parameter']
app_system_name = ir_config.get_param('app_system_name', default='odooApp')
app_system_name = ir_config.sudo().get_param('app_system_name', default='odooApp')
app_show_lang = True if ir_config.get_param('app_show_lang') == "True" else False
app_show_debug = True if ir_config.get_param('app_show_debug') == "True" else False
app_show_documentation = True if ir_config.get_param('app_show_documentation') == "True" else False
app_show_documentation_dev = True if ir_config.get_param('app_show_documentation_dev') == "True" else False
app_show_support = True if ir_config.get_param('app_show_support') == "True" else False
app_show_account = True if ir_config.get_param('app_show_account') == "True" else False
app_show_enterprise = True if ir_config.get_param('app_show_enterprise') == "True" else False
app_show_share = True if ir_config.get_param('app_show_share') == "True" else False
app_show_poweredby = True if ir_config.get_param('app_show_poweredby') == "True" else False
app_stop_subscribe = True if ir_config.get_param('app_stop_subscribe') == "True" else False
app_show_lang = True if ir_config.sudo().get_param('app_show_lang') == "True" else False
app_show_debug = True if ir_config.sudo().get_param('app_show_debug') == "True" else False
app_show_documentation = True if ir_config.sudo().get_param('app_show_documentation') == "True" else False
app_show_documentation_dev = True if ir_config.sudo().get_param('app_show_documentation_dev') == "True" else False
app_show_support = True if ir_config.sudo().get_param('app_show_support') == "True" else False
app_show_account = True if ir_config.sudo().get_param('app_show_account') == "True" else False
app_show_enterprise = True if ir_config.sudo().get_param('app_show_enterprise') == "True" else False
app_show_share = True if ir_config.sudo().get_param('app_show_share') == "True" else False
app_show_poweredby = True if ir_config.sudo().get_param('app_show_poweredby') == "True" else False
app_stop_subscribe = True if ir_config.sudo().get_param('app_stop_subscribe') == "True" else False
app_documentation_url = ir_config.get_param('app_documentation_url',
app_documentation_url = ir_config.sudo().get_param('app_documentation_url',
default='http://www.sunpop.cn/documentation/user/10.0/en/index.html')
app_documentation_dev_url = ir_config.get_param('app_documentation_dev_url',
app_documentation_dev_url = ir_config.sudo().get_param('app_documentation_dev_url',
default='http://www.sunpop.cn/documentation/10.0/index.html')
app_support_url = ir_config.get_param('app_support_url', default='http://www.sunpop.cn/trial/')
app_account_title = ir_config.get_param('app_account_title', default='My Online Account')
app_account_url = ir_config.get_param('app_account_url', default='http://www.sunpop.cn/my-account/')
app_support_url = ir_config.sudo().get_param('app_support_url', default='http://www.sunpop.cn/trial/')
app_account_title = ir_config.sudo().get_param('app_account_title', default='My Online Account')
app_account_url = ir_config.sudo().get_param('app_account_url', default='http://www.sunpop.cn/my-account/')
return dict(
app_system_name=app_system_name,
app_show_lang=app_show_lang,
@@ -76,7 +78,7 @@ class AppThemeConfigSettings(models.TransientModel):
)
@api.multi
def set_default_all(self):
def set_values(self):
self.ensure_one()
ir_config = self.env['ir.config_parameter']
ir_config.set_param("app_system_name", self.app_system_name or "")
@@ -90,6 +92,7 @@ class AppThemeConfigSettings(models.TransientModel):
ir_config.set_param("app_show_share", self.app_show_share or "False")
ir_config.set_param("app_show_poweredby", self.app_show_poweredby or "False")
ir_config.set_param("app_stop_subscribe", self.app_stop_subscribe or "False")
# ir_config.set_param("group_show_author_in_apps", self.group_show_author_in_apps or "False")
ir_config.set_param("app_documentation_url",
self.app_documentation_url or "http://www.sunpop.cn/documentation/user/10.0/en/index.html")
@@ -112,7 +115,7 @@ class AppThemeConfigSettings(models.TransientModel):
for line in to_removes:
obj_name = line[0]
obj = self.pool.get(obj_name)
if obj and obj._table_exist:
if obj:
sql = "delete from %s" % obj._table
self._cr.execute(sql)
# 更新序号
@@ -123,7 +126,7 @@ class AppThemeConfigSettings(models.TransientModel):
})
sql = "update ir_sequence set number_next=1 where code ='sale.order';"
self._cr.execute(sql)
except Exception, e:
except Exception as e:
raise Warning(e)
return True
@@ -137,7 +140,7 @@ class AppThemeConfigSettings(models.TransientModel):
for line in to_removes:
obj_name = line[0]
obj = self.pool.get(obj_name)
if obj and obj._table_exist:
if obj:
sql = "delete from %s" % obj._table
self._cr.execute(sql)
# 更新序号,针对自动产品编号
@@ -148,8 +151,8 @@ class AppThemeConfigSettings(models.TransientModel):
})
sql = "update ir_sequence set number_next=1 where code ='product.product';"
self._cr.execute(sql)
except Exception, e:
raise Warning(e)
except Exception as e:
pass # raise Warning(e)
return True
def remove_product_attribute(self):
@@ -162,11 +165,11 @@ class AppThemeConfigSettings(models.TransientModel):
for line in to_removes:
obj_name = line[0]
obj = self.pool.get(obj_name)
if obj and obj._table_exist:
if obj:
sql = "delete from %s" % obj._table
self._cr.execute(sql)
except Exception, e:
raise Warning(e)
except Exception as e:
pass # raise Warning(e)
return True
@api.multi
@@ -180,7 +183,7 @@ class AppThemeConfigSettings(models.TransientModel):
for line in to_removes:
obj_name = line[0]
obj = self.pool.get(obj_name)
if obj and obj._table_exist:
if obj:
sql = "delete from %s" % obj._table
self._cr.execute(sql)
# 更新序号
@@ -191,8 +194,8 @@ class AppThemeConfigSettings(models.TransientModel):
})
sql = "update ir_sequence set number_next=1 where code ='pos.order';"
self._cr.execute(sql)
except Exception, e:
raise Warning(e)
except Exception as e:
pass # raise Warning(e)
return True
@api.multi
@@ -208,7 +211,7 @@ class AppThemeConfigSettings(models.TransientModel):
for line in to_removes:
obj_name = line[0]
obj = self.pool.get(obj_name)
if obj and obj._table_exist:
if obj:
sql = "delete from %s" % obj._table
self._cr.execute(sql)
# 更新序号
@@ -219,8 +222,8 @@ class AppThemeConfigSettings(models.TransientModel):
})
sql = "update ir_sequence set number_next=1 where code ='purchase.order';"
self._cr.execute(sql)
except Exception, e:
raise Warning(e)
except Exception as e:
pass # raise Warning(e)
return True
@api.multi
@@ -230,16 +233,19 @@ class AppThemeConfigSettings(models.TransientModel):
['mrp.workcenter.productivity', ],
['mrp.workorder', ],
['mrp.production.workcenter.line', ],
['change.production.qty', ],
['mrp.production', ],
['mrp.production.product.line', ],
['mrp.unbuild', ],
['change.production.qty', ],
['sale.forecast.indirect', ],
['sale.forecast', ],
]
try:
for line in to_removes:
obj_name = line[0]
obj = self.pool.get(obj_name)
if obj and obj._table_exist:
if obj:
sql = "delete from %s" % obj._table
self._cr.execute(sql)
# 更新序号
@@ -250,8 +256,8 @@ class AppThemeConfigSettings(models.TransientModel):
})
sql = "update ir_sequence set number_next=1 where (code ='mrp.production' or code ='mrp.unbuild');"
self._cr.execute(sql)
except Exception, e:
raise Warning(e)
except Exception as e:
pass # raise Warning(e)
return True
@api.multi
@@ -265,11 +271,11 @@ class AppThemeConfigSettings(models.TransientModel):
for line in to_removes:
obj_name = line[0]
obj = self.pool.get(obj_name)
if obj and obj._table_exist:
if obj:
sql = "delete from %s" % obj._table
self._cr.execute(sql)
except Exception, e:
raise Warning(e)
except Exception as e:
pass # raise Warning(e)
return True
@api.multi
@@ -279,6 +285,7 @@ class AppThemeConfigSettings(models.TransientModel):
['stock.quant', ],
['stock.quant.package', ],
['stock.quant.move.rel', ],
['stock.move.line', ],
['stock.move', ],
['stock.pack.operation', ],
['stock.picking', ],
@@ -295,7 +302,7 @@ class AppThemeConfigSettings(models.TransientModel):
for line in to_removes:
obj_name = line[0]
obj = self.pool.get(obj_name)
if obj and obj._table_exist:
if obj:
sql = "delete from %s" % obj._table
self._cr.execute(sql)
# 更新序号
@@ -333,8 +340,8 @@ class AppThemeConfigSettings(models.TransientModel):
"or prefix ='WH/PICK/'" \
");"
self._cr.execute(sql)
except Exception, e:
raise Warning(e)
except Exception as e:
pass # raise Warning(e)
return True
@api.multi
@@ -357,7 +364,7 @@ class AppThemeConfigSettings(models.TransientModel):
for line in to_removes:
obj_name = line[0]
obj = self.pool.get(obj_name)
if obj and obj._table_exist:
if obj:
sql = "delete from %s" % obj._table
self._cr.execute(sql)
@@ -398,8 +405,29 @@ class AppThemeConfigSettings(models.TransientModel):
"or prefix like '杂项/%'" \
");"
self._cr.execute(sql)
except Exception, e:
raise Warning(e)
except Exception as e:
pass # raise Warning(e)
return True
@api.multi
def remove_project(self):
to_removes = [
# 清除项目
['account.analytic.line', ],
['project.task', ],
['project.forecast', ],
['project.project', ],
]
try:
for line in to_removes:
obj_name = line[0]
obj = self.pool.get(obj_name)
if obj:
sql = "delete from %s" % obj._table
self._cr.execute(sql)
# 更新序号
except Exception as e:
pass # raise Warning(e)
return True
@api.multi
@@ -413,11 +441,11 @@ class AppThemeConfigSettings(models.TransientModel):
for line in to_removes:
obj_name = line[0]
obj = self.pool.get(obj_name)
if obj and obj._table_exist:
if obj and obj._table:
sql = "delete from %s" % obj._table
self._cr.execute(sql)
except Exception, e:
raise Warning(e)
except Exception as e:
pass # raise Warning(e)
return True
@api.multi
@@ -431,10 +459,24 @@ class AppThemeConfigSettings(models.TransientModel):
for line in to_removes:
obj_name = line[0]
obj = self.pool.get(obj_name)
if obj and obj._table_exist:
if obj and obj._table:
sql = "delete from %s" % obj._table
self._cr.execute(sql)
except Exception, e:
raise Warning(e)
except Exception as e:
pass # raise Warning(e)
return True
@api.multi
def remove_all_biz(self):
try:
self.remove_sales()
self.remove_purchase()
self.remove_account()
self.remove_mrp()
self.remove_inventory()
self.remove_project()
self.remove_message()
except Exception as e:
pass # raise Warning(e)
return True

View File

@@ -14,5 +14,5 @@ class View(models.Model):
if template in ['web.login', 'web.webclient_bootstrap']:
if not values:
values = {}
values["title"] = self.env['ir.config_parameter'].get_param("app_system_name", "odooApp")
values["title"] = self.env['ir.config_parameter'].sudo().get_param("app_system_name", "odooApp")
return super(View, self).render_template(template, values=values, engine=engine)

View File

@@ -12,7 +12,7 @@ class MailThread(models.AbstractModel):
def message_subscribe(self, partner_ids=None, channel_ids=None, subtype_ids=None, force=True):
""" 停用订阅功能. """
ir_config = self.env['ir.config_parameter']
app_stop_subscribe = True if ir_config.get_param('app_stop_subscribe') == "True" else False
app_stop_subscribe = False if ir_config.get_param('app_stop_subscribe') == "True" else False
if app_stop_subscribe:
return
else:
@@ -22,7 +22,7 @@ class MailThread(models.AbstractModel):
def message_auto_subscribe(self, updated_fields, values=None):
""" 停用订阅功能. """
ir_config = self.env['ir.config_parameter']
app_stop_subscribe = True if ir_config.get_param('app_stop_subscribe') == "True" else False
app_stop_subscribe = False if ir_config.get_param('app_stop_subscribe') == "True" else False
if app_stop_subscribe:
return
else:
@@ -32,7 +32,7 @@ class MailThread(models.AbstractModel):
def _message_auto_subscribe_notify(self, partner_ids):
""" 停用订阅功能. """
ir_config = self.env['ir.config_parameter']
app_stop_subscribe = True if ir_config.get_param('app_stop_subscribe') == "True" else False
app_stop_subscribe = False if ir_config.get_param('app_stop_subscribe') == "True" else False
if app_stop_subscribe:
return
else:

View File

@@ -1,6 +1,7 @@
##App Odoo Customize(Debranding Title,Language,Documentation,Quick Debug,Quick Data Clear)
============
White label odoo.
Support Odoo 11, 10, 9.
You can config odoo, make it look like your own platform.
1. Deletes Odoo label in footer
2. Replaces "Odoo" in Windows title
@@ -19,6 +20,8 @@ You can config odoo, make it look like your own platform.
15. Reset All the Sequence to beginning of 1: SO/PO/MO/Invoice...
16. Fix odoo reload module translation bug while enable english language
17. Stop Odoo Auto Subscribe(Performance Improve)
18. Show/Hide Author and Website in Apps Dashboard (odoo 11 only)
19. Set System Icon (odoo 10 only)
This module can help to white label the Odoo.
Also helpful for training and support for your odoo end-user.
The user can get the help document just by one click.
@@ -41,10 +44,12 @@ http://www.sunpop.cn
11. 提供236个国家的国旗文件部份需要自行设置文件名
12. 多语言版本
13. 自定义登陆界面中的 Powered by Odoo
14. 快速删除测试数据,支持模块包括:销售/POS门店/采购/生产/库存/会计/消息与工作流等.
14. 快速删除测试数据,支持模块包括:销售/POS门店/采购/生产/库存/会计/项目/消息与工作流等.
15. 将各类单据的序号重置从1开始包括SO/PO/MO/Invoice 等
16. 修复odoo启用英文后模块不显示中文的Bug
17. 可停用odoo自动订阅功能避免“同样对象关注2次”bug同时提升性能
18. 显示/隐藏应用的作者和网站-在应用安装面板中
19. 一键清除所有数据视当前数据情况有时需点击2次
使用方法:将解压后的 app_odoo_customize 放到 odoo的 addons目录下激活开发者模式应用-->更新应用列表,
找到 "App odoo Customize"模块,安装即可。

View File

@@ -0,0 +1,2 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_ir_config_parameter_system","ir_config_parameter_system","base.model_ir_config_parameter","base.group_user",1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_ir_config_parameter_system ir_config_parameter_system base.model_ir_config_parameter base.group_user 1 0 0 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 138 KiB

View File

@@ -1,15 +1,19 @@
<section class="oe_container">
<div class="oe_row oe_spaced" style="max-width: 800px;">
<div class="oe_row oe_spaced" style="max-width: 95%;">
<div class="oe_span12">
<h2 class="oe_slogan">App Odoo Customize</h2>
<div class="oe_demo" style=" margin: 30px auto 0; padding: 0 15px 0 0; border:none; width: 96%;">
<p>This moduld allows user to quickly customize and debranding Odoo. Quick debug, Language Switcher,
Online Documentation Access,Quick Data Clear. </p>
<h1>More Powerful UI addons:
<a class="btn btn-primary mb16" href="https://www.odoo.com/apps/modules/10.0/app_ui_enhance/">App UI enhance</a>
<h3>Lastest update: v11.0.7.23</h3>
<p>Fix Login bug when install website.</p>
<p>Add 19. One Click to clear all data (Sometime pls click twice)</p>
<p>Add 18. Show/Hide Author and Website in Apps Dashboard</p>
<h1>More Powerful addons:
<a class="btn btn-primary mb16" href="http://www.odoo.com/apps/modules/browse?author=Sunpop.cn">Sunpop.cn Addons</a>
</h1>
<br>
<h3>Lastest update: v10.0.2.4, 2018-02-04</h3>
<h3>Add Odoo 11 Support</h3>
<ul>
<li>1. Deletes Odoo label in footer</li>
<li>2. Replaces "Odoo" in Windows title</li>
@@ -24,10 +28,13 @@
<li>11. Provide 236 country flags.</li>
<li>12. Multi-language Support.</li>
<li>13. Change Powered by Odoo in login screen.(Please change '../views/app_odoo_customize_view.xml' #15)</li>
<li>14. Quick delete test data in Apps: Sales/POS/Purchase/MRP/Inventory/Accounting/Base Models.</li>
<li>14. Quick delete test data in Apps: Sales/POS/Purchase/MRP/Inventory/Accounting/Project/Base Models.</li>
<li>15. Reset All the Sequence to beginning of 1: SO/PO/MO/Invoice...</li>
<li>16. Fix odoo reload module translation bug while enable english language</li>
<li>17. Stop Odoo Auto Subscribe(Performance Improve)</li>
<li>18. Show/Hide Author and Website in Apps Dashboard (odoo 11 only)</li>
<li>19. One Click to clear all data (Sometime pls click twice)</li>
<li>20. Set System Icon (odoo 10 only)</li>
</ul>
<p>
This module can help to white label the Odoo.
@@ -44,7 +51,7 @@
</div>
<div class="oe_row oe_spaced" style="max-width: 800px;">
<div class="oe_row oe_spaced" style="max-width: 95%;">
<div class="oe_demo"
style="margin: 20px auto; padding: 0 15px 0 0; border:none; border-top:solid 1px #dedede; width: 96%;">
<h2 class='oe_mt32'>Odoo Customize(Debranding Title,Language,Documentation,Quick Debug)</h2>
@@ -67,7 +74,7 @@
</div>
</div>
<div class="oe_row oe_spaced" style="max-width: 800px;">
<div class="oe_row oe_spaced" style="max-width: 95%;">
<div class="oe_demo"
style=" argin: 20px auto; padding: 0 15px 0 0; border:none; border-top:solid 1px #dedede; width: 96%; ">
<h2 class='oe_mt32'>How to use: Go to Settings -> odooApp Settings</h2>
@@ -78,7 +85,35 @@
</div>
</div>
<div class="oe_row oe_spaced" style="max-width: 800px;">
<div class="oe_row oe_spaced" style="max-width: 95%;">
<div class="oe_demo"
style="margin: 20px auto; padding: 0 15px 0 0; border:none; border-top:solid 1px #dedede; width: 96%; ">
<h2 class='oe_mt32'>Set System Icon (odoo 10 only)</h2>
</div>
<div class="oe_demo oe_screenshot">
<img src="set19.jpg" style="border:1px solid black"/>
<br/>
</div>
</div>
<div class="oe_row oe_spaced" style="max-width: 95%;">
<div class="oe_demo"
style="margin: 20px auto; padding: 0 15px 0 0; border:none; border-top:solid 1px #dedede; width: 96%;">
<h2 class='oe_mt32'>Show/Hide Author and Website in Apps Dashboard</h2>
</div>
<p>Before</p>
<div class="oe_demo oe_screenshot">
<img src="set18-1.jpg" style="border:1px solid black"/>
<br/>
</div>
<p>After uncheck "Show Author and Website in Apps Dashboard"</p>
<div class="oe_demo oe_screenshot">
<img src="set18-2.jpg" style="border:1px solid black"/>
<br/>
</div>
</div>
<div class="oe_row oe_spaced" style="max-width: 95%;">
<div class="oe_demo"
style="margin: 20px auto; padding: 0 15px 0 0; border:none; border-top:solid 1px #dedede; width: 96%;">
<h2 class='oe_mt32'>Setup more flags: just rename the flag pic to locale code of the country</h2>
@@ -90,7 +125,7 @@
</div>
</div>
<div class="oe_row oe_spaced" style="max-width: 800px;">
<div class="oe_row oe_spaced" style="max-width: 95%;">
<div class="oe_demo"
style="margin: 20px auto; padding: 0 15px 0 0; border:none; border-top:solid 1px #dedede; width: 96%;">
<h2 class='oe_mt32'>Quick Delete test Data.</h2>

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -1,4 +1,4 @@
odoo.define('app_system_name', function (require) {
odoo.define('app_odoo_customize.app_system_name', function (require) {
"use strict";
var WebClient = require('web.WebClient');

View File

@@ -1,117 +1,164 @@
odoo.define('app_odoo_customize.customize_user_menu', function (require) {
odoo.define('app_odoo_customize.UserMenu', function (require) {
"use strict";
var Model = require('web.Model');
var session = require('web.session');
/**
* This widget is appended by the webclient to the right of the navbar.
* It displays the avatar and the name of the logged user (and optionally the
* db name, in debug mode).
* If clicked, it opens a dropdown allowing the user to perform actions like
* editing its preferences, accessing the documentation, logging out...
*/
var UserMenu = require('web.UserMenu');
var documentation_url;
//避免错误,要再定义
var documentation_url = 'http://www.sunpop.cn';
var documentation_dev_url;
var support_url;
var account_title;
var account_url;
UserMenu.include({
on_menu_debug: function () {
window.location = $.param.querystring(window.location.href, 'debug');
},
on_menu_debugassets: function () {
window.location = $.param.querystring(window.location.href, 'debug=assets');
},
on_menu_quitdebug: function () {
window.location.search = "?";
},
on_menu_documentation: function () {
window.open(documentation_url, '_blank');
},
on_menu_documentation_dev: function () {
window.open(documentation_dev_url, '_blank');
},
on_menu_support: function () {
window.open(support_url, '_blank');
},
on_menu_account: function () {
window.open(account_url, '_blank');
},
});
$(document).ready(function () {
UserMenu.include({
init: function () {
this._super.apply(this, arguments);
var self = this;
documentation_url = 'http://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html';
documentation_dev_url = 'http://www.sunpop.cn/documentation/10.0/index.html';
support_url = 'http://www.sunpop.cn/trial';
account_title = 'My Online Account';
account_url = 'http://www.sunpop.cn/my-account';
setTimeout(function () {
new Model('ir.config_parameter').call('search_read', [[['key', '=', 'app_show_debug']], ['value']]).then(function (show) {
if (show.length >= 1 && (show[0]['value'] == "False")) {
var session = this.getSession();
var lang_list = '';
self._rpc({
model: 'res.lang',
method: 'search_read',
domain: [],
fields: ['name', 'code'],
lazy: false,
}).then(function (res) {
_.each(res, function (lang) {
var a = '';
if (lang['code'] === session.user_context.lang) {
a = '<i class="fa fa-check"></i>';
} else {
a = '';
}
lang_list += '<li><a href="#" data-lang-menu="lang" data-lang-id="' + lang['code'] + '"><img class="flag" src="app_odoo_customize/static/src/img/flags/' + lang['code'] + '.png"/>' + lang['name'] + a + '</a></li>';
});
lang_list += '<li class="divider"></li>';
$('switch-lang').replaceWith(lang_list);
})
//取参数
self._rpc({
model: 'ir.config_parameter',
method: 'search_read',
domain: [['key', '=like', 'app_%']],
fields: ['key', 'value'],
lazy: false,
}).then(function (res) {
$.each(res, function (key, val) {
if (val.key == 'app_documentation_url')
documentation_url = val.value;
if (val.key == 'app_documentation_dev_url')
documentation_dev_url = val.value;
if (val.key == 'app_support_url')
support_url = val.value;
if (val.key == 'app_account_title')
account_title = val.value;
if (val.key == 'app_account_url')
account_url = val.value;
// 控制显示
if (val.key == 'app_show_lang' && val.value == "False") {
$('switch-lang').hide();
}
if (session.user_context.uid!=1 || (val.key == 'app_show_debug' && val.value == "False")) {
$('[data-menu="debug"]').parent().hide();
$('[data-menu="debugassets"]').parent().hide();
$('[data-menu="quitdebug"]').parent().hide();
}
});
new Model('ir.config_parameter').call('search_read', [[['key', '=', 'app_show_documentation']], ['value']]).then(function (show) {
if (show.length >= 1 && (show[0]['value'] == "False"))
if (val.key == 'app_show_documentation' && val.value == "False") {
$('[data-menu="documentation"]').parent().hide();
else {
new Model('ir.config_parameter').call('search_read', [[['key', '=', 'app_documentation_url']], ['value']]).then(function (res) {
if (res.length >= 1) {
_.each(res, function (item) {
documentation_url = item['value'];
});
}
});
}
});
new Model('ir.config_parameter').call('search_read', [[['key', '=', 'app_show_documentation_dev']], ['value']]).then(function (show) {
if (show.length >= 1 && (show[0]['value'] == "False"))
if (val.key == 'app_show_documentation_dev' && val.value == "False") {
$('[data-menu="documentation_dev"]').parent().hide();
else {
new Model('ir.config_parameter').call('search_read', [[['key', '=', 'app_documentation_dev_url']], ['value']]).then(function (res) {
if (res.length >= 1) {
_.each(res, function (item) {
documentation_dev_url = item['value'];
});
}
});
}
});
new Model('ir.config_parameter').call('search_read', [[['key', '=', 'app_show_support']], ['value']]).then(function (show) {
if (show.length >= 1 && (show[0]['value'] == "False"))
if (val.key == 'app_show_support' && val.value == "False") {
$('[data-menu="support"]').parent().hide();
else {
new Model('ir.config_parameter').call('search_read', [[['key', '=', 'app_support_url']], ['value']]).then(function (res) {
if (res.length >= 1) {
_.each(res, function (item) {
support_url = item['value'];
});
}
});
}
});
new Model('ir.config_parameter').call('search_read', [[['key', '=', 'app_show_account']], ['value']]).then(function (show) {
if (show.length >= 1 && (show[0]['value'] == "False"))
if (val.key == 'app_show_account' && val.value == "False") {
$('[data-menu="account"]').parent().hide();
else {
new Model('ir.config_parameter').call('search_read', [[['key', '=', 'app_account_title']], ['value']]).then(function (res) {
if (res.length >= 1) {
_.each(res, function (item) {
account_title = item['value'];
});
}
if (val.key == 'app_account_title' && val.value) {
$('[data-menu="account"]').html(account_title);
});
}
});
new Model('ir.config_parameter').call('search_read', [[['key', '=', 'app_account_url']], ['value']]).then(function (res) {
if (res.length >= 1) {
_.each(res, function (item) {
account_url = item['value'];
});
}
});
new Model('ir.config_parameter').call('search_read', [[['key', '=', 'app_show_poweredby']], ['value']]).then(function (show) {
if (show.length >= 1 && (show[0]['value'] == "False"))
if (val.key == 'app_show_poweredby' && val.value == "False") {
$('.o_sub_menu_footer').hide();
});
}, 2500);
}
});
})
},
/**
* @override
* 由于odoo11 没传ev到事件所以要重载
*/
start: function () {
var self = this;
return this._super.apply(this, arguments).then(function () {
//语言切换特殊处理
self.$el.on('click', 'li a[data-lang-menu]', function (ev) {
ev.preventDefault();
var f = self['_onMenuLang']
f.call(self, $(this));
});
//控制debug显示
var mMode = 'normal';
if (window.location.href.indexOf('debug') != -1)
mMode = 'debug';
if (window.location.href.indexOf('debug=assets') != -1)
mMode = 'assets';
if (mMode == 'normal')
$('[data-menu="quitdebug"]').parent().hide();
if (mMode == 'debug')
$('[data-menu="debug"]').parent().hide();
if (mMode == 'assets')
$('[data-menu="debugassets"]').parent().hide();
});
},
_onMenuAccount: function () {
window.open(account_url, '_blank');
},
_onMenuDocumentation: function () {
window.open(documentation_url, '_blank');
},
_onMenuSupport: function () {
window.open(support_url, '_blank');
},
//增加的方法
_onMenuDebug: function () {
window.location = $.param.querystring(window.location.href, 'debug');
},
_onMenuDebugassets: function () {
window.location = $.param.querystring(window.location.href, 'debug=assets');
},
_onMenuQuitdebug: function () {
window.location.search = "?";
},
_onMenuDocumentation_dev: function () {
window.open(documentation_dev_url, '_blank');
},
_onMenuLang: function (ev) {
var self = this;
var lang = ($(ev).data("lang-id"));
var session = this.getSession();
return this._rpc({
model: 'res.users',
method: 'write',
args: [session.uid, {'lang': lang}],
}).then(function (result) {
self.do_action({
type: 'ir.actions.client',
res_model: 'res.users',
tag: 'reload_context',
target: 'current',
});
});
},
})
});

View File

@@ -1,49 +0,0 @@
odoo.define('app_odoo_customize.switch_language', function (require) {
"use strict";
var Model = require('web.Model');
var session = require('web.session');
var UserMenu = require('web.UserMenu');
UserMenu.include({
on_menu_lang: function (ev) {
var self = this;
var lang = ($(ev).data("lang-id"));
new Model('res.users').call('write', [[session.uid], {'lang': lang}]).then(function () {
self.do_action({
type: 'ir.actions.client',
res_model: 'res.users',
tag: 'reload_context',
target: 'current'
});
});
return false;
},
});
//
$(document).ready(function () {
var self = this;
var lang_list = '';
setTimeout(function () {
new Model('ir.config_parameter').call('search_read', [[['key', '=', 'app_show_lang']], ['value']]).then(function (show) {
if (show.length >= 1 && (show[0]['value'] == "False"))
$('switch-lang').hide();
else {
new Model('res.lang').call('search_read', [[], ['name', 'code']]).then(function (res) {
_.each(res, function (lang) {
var a = '';
if (lang['code'] === session.user_context.lang) {
a = '<i class="fa fa-check"></i>';
} else {
a = '';
}
lang_list += '<li><a href="#" data-menu="lang" data-lang-id="' + lang['code'] + '"><img class="flag" src="app_odoo_customize/static/src/img/flags/' + lang['code'] + '.png"/>' + lang['name'] + a + '</a></li>';
});
lang_list += '<li class="divider"></li>';
$('switch-lang').replaceWith(lang_list);
});
}
});
}, 2500);
});
});

View File

@@ -3,13 +3,13 @@
<t t-extend="UserMenu">
<t t-jquery=".dropdown-menu" t-operation="prepend">
<switch-lang/>
<li t-if="widget.session.debug != true">
<li>
<a href="#" data-menu="debug">Activate the developer mode</a>
</li>
<li t-if="widget.session.debug != 'assets'">
<li>
<a href="#" data-menu="debugassets">Activate the developer mode (with assets)</a>
</li>
<li t-if="widget.session.debug != false">
<li>
<a href="#" data-menu="quitdebug">Deactivate the developer mode</a>
</li>
<li>

View File

@@ -4,16 +4,15 @@
<template id="switch_language" name="switch_language assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/app_odoo_customize/static/src/css/app.css"/>
<script type="text/javascript" src="/app_odoo_customize/static/src/js/switch_language.js"></script>
<script type="text/javascript" src="/app_odoo_customize/static/src/js/customize_user_menu.js"></script>
<script type="text/javascript" src="/app_odoo_customize/static/src/js/app_window_title.js"/>
<script type="text/javascript" src="/app_odoo_customize/static/src/js/customize_user_menu.js"></script>
</xpath>
</template>
<!-- some odoo version not support, please remove this if you are using odoo9 -->
<template id="replace_login" name="replace_login" inherit_id="web.login_layout">
<xpath expr="//a[@href='https://www.odoo.com']" position="replace">
<a href="https://www.sunpop.cn" target="_blank">Powered by <span>odooApp</span></a>
</xpath>
</template>
<!--<template id="replace_login" name="Login Layout" inherit_id="web.login_layout">-->
<!--<xpath expr="//a[@target='_blank']" position="replace">-->
<!--<a href="https://www.sunpop.cn" target="_blank">Powered by <span>odooApp</span></a>-->
<!--</xpath>-->
<!--</template>-->
</data>
</odoo>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<odoo>
<data>
<record id="view_app_theme_config_settings" model="ir.ui.view">
<field name="name">App Odoo Customize Settings</field>
@@ -60,10 +60,14 @@
<field name="app_show_poweredby"/>
<label for="app_show_poweredby"/>
</div>
<div>
<div invisible="1">
<field name="app_stop_subscribe"/>
<label for="app_stop_subscribe"/>
</div>
<div>
<field name="group_show_author_in_apps"/>
<label for="group_show_author_in_apps"/>
</div>
</div>
</group>
<group string="User Menu Content">
@@ -90,21 +94,21 @@
</group>
<group name="data-clean" string="Data Cleaning (Be careful to do that!)">
<label string="Sales"/>
<div>
<div class="mb4">
<button string="Delete All Sales Order" type="object" name="remove_sales"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
<label string="POS"/>
<div>
<div class="mb4">
<button string="Delete All POS Order" type="object" name="remove_pos" confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
<label string="Purchase"/>
<div>
<div class="mb4">
<button string="Delete All Purchase Order and Requisition" type="object" name="remove_purchase"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
<label string="MRP"/>
<div>
<div class="mb4">
<button string="Delete All Manufacturing Order" type="object" name="remove_mrp"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
@@ -112,17 +116,22 @@
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
<label string="Inventory"/>
<div>
<div class="mb4">
<button string="Delete All Move/Picking/Package/Lot" type="object" name="remove_inventory"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
<label string="Accounting"/>
<div>
<div class="mb4">
<button string="Delete All Voucher/Invoice/Bill" type="object" name="remove_account"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
<label string="Project"/>
<div class="mb4">
<button string="Delete All Project/Task/Forecast" type="object" name="remove_project"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
<label string="Base Models"/>
<div>
<div class="mb4">
<button string="Delete All Product" type="object" name="remove_product"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
@@ -135,6 +144,11 @@
<button string="Delete All Workflow" type="object" name="remove_workflow"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
<label string="All Business"/>
<div class="mb4">
<button string="Delete All MRP/Sale/Purchase/Account/MRP/Inventory/Project/Message/Workflow" type="object" name="remove_all_biz"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
</group>
</form>
</field>
@@ -149,16 +163,16 @@
</record>
<menuitem
id="menu_app_group"
id="base.menu_app_group"
name="odooApp"
parent="base.menu_administration"
sequence="1"
groups="base.group_system"/>
<menuitem
id="menu_app_theme_config"
parent="menu_app_group"
parent="base.menu_app_group"
sequence="1"
action="action_app_theme_config"
groups="base.group_system"/>
</data>
</openerp>
</odoo>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Modules -->
<record id="app_module_form" model="ir.ui.view">
<field name="name">app.ir.module.module.form</field>
<field name="model">ir.module.module</field>
<field name="inherit_id" ref="base.module_form" />
<field name="arch" type="xml">
<h3 class="oe_fade" position="attributes">
<attribute name="groups">app_odoo_customize.group_show_author_in_apps</attribute>
</h3>
<field name="website" position="attributes">
<attribute name="groups">app_odoo_customize.group_show_author_in_apps</attribute>
</field>
</field>
</record>
</odoo>

View File

@@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
'''
Created on 2017-10-28
@author: 广州尚鹏http://www.sunpop.cn
@email: 300883@qq.com
@resource of Sunpop
Odoo10离线中文用户手册下载
http://www.sunpop.cn/odoo10_user_manual_document_offline/
Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
http://www.sunpop.cn/odoo10_developer_document_offline/
@description:
'''
import models
import controllers
from .hooks import pre_init_hook

View File

@@ -1,66 +0,0 @@
# -*- coding: utf-8 -*-
# Created on 2017-11-05
# author: 广州尚鹏http://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# http://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# http://www.sunpop.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# http://www.sunpop.cn/odoo10_developer_document_offline/
# description:
{
'name': 'App Product Internal Type,Auto Sequence, Auto Code(Variants Supported)',
'summary': 'Auto Internal Reference.',
"version": '10.0.2.2',
'category': 'Sales',
'author': 'Sunpop.cn',
'website': 'http://www.sunpop.cn',
'license': 'AGPL-3',
'sequence': 2,
'installable': True,
'auto_install': False,
'application': True,
'images': ['static/description/set2.jpg'],
'currency': 'EUR',
'price': 98,
'description': u"""
App Product Auto Sequence, Auto Code(Variants Supported)
This module allows to associate a sequence to the product reference.<br/>
The reference (default code) is unique (SQL constraint) and required.<br/>
Support Product with or without Variants.
1.Auto Sequence or code for every product.自动产品编码。
2.Auto Sequence or for every product variants, like product20171130-001.自动多规格产品编码,形式为 主产品编码-001。
3.Product code must be Unique.产品编码强制要求唯一。
4.Define different product type, each product type use own rule of sequence.可自定义产品类型,不同产品类型使用不同编码规则。
5.Quick access in sale , inventory, system menu.可以在销售、库存、系统菜单中快速定义。
6.Multi language support.<br/>多语种支持。
7.Setup default Auto Sequence for each product category
""",
'pre_init_hook': 'pre_init_hook',
'depends': [
'product',
'stock',
'sale',
'purchase',
'mrp',
],
'data': [
# 视图
"security/ir.model.access.csv",
# "security/security.xml",
'views/product_template_view.xml',
'views/product_product_view.xml',
'views/product_category_view.xml',
'views/product_internal_type_view.xml',
'data/product_sequence.xml',
],
'demo': [
],
}

View File

@@ -1 +0,0 @@
import main

View File

@@ -1 +0,0 @@
# -*- coding: utf-8 -*-

View File

@@ -1,69 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="0">
<!-- 更新序号规则 Auto Internal Reference. -->
<!-- 所有的 All Products. -->
<record id="seq_product_auto" model="ir.sequence">
<field name="name">Sequence for All Products</field>
<field name="code">product.product</field>
<field name="prefix">P%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 制造的成品 manufactured Products. -->
<record id="seq_manufacture" model="ir.sequence">
<field name="name">Sequence for Manufactured Product</field>
<field name="code">product.product</field>
<field name="prefix">D%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 制造的原料 Components.-->
<record id="seq_component" model="ir.sequence">
<field name="name">Sequence for Components Product</field>
<field name="code">product.product</field>
<field name="prefix">C%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 采购的成品 Sourced Products.-->
<record id="seq_sourced" model="ir.sequence">
<field name="name">Sequence for Sourced Product</field>
<field name="code">product.product</field>
<field name="prefix">S%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- internal_type 数据-->
<record id="internal_type_manufacture" model="product.internal.type">
<field name="name">Manufactured Product</field>
<field name="description">Set prefix as "D" in link sequence</field>
<field name="link_sequence" ref="seq_manufacture"/>
</record>
<record id="internal_type_sourced" model="product.internal.type">
<field name="name">Sourced Product</field>
<field name="description">Set prefix as "S" in link sequence</field>
<field name="link_sequence" ref="seq_sourced"/>
</record>
<record id="internal_type_component" model="product.internal.type">
<field name="name">Components Product</field>
<field name="description">Set prefix as "C" in link sequence</field>
<field name="link_sequence" ref="seq_component"/>
</record>
<!--设置产品默认值为制造产品-->
<record id="product_internal_type_default" model="ir.values">
<field name="name">internal_type</field>
<field name="model">product.template</field>
<field name="key">default</field>
<field name="key2"></field>
<field name="company_id" ref="base.main_company"/>
<field name="value" eval="'I' + str(ref('app_product_sequence.internal_type_manufacture'))+'\n.'"/>
</record>
</data>
</odoo>

View File

@@ -1,109 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="0">
<!-- 更新序号规则 Auto Internal Reference. -->
<!-- 所有的 All Products. -->
<record id="seq_product_auto" model="ir.sequence">
<field name="name">Sequence for All Products</field>
<field name="code">product.product</field>
<field name="prefix">PR%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 制造的成品,如"床" manufactured Products. -->
<record id="seq_mrp_product" model="ir.sequence">
<field name="name">Sequence for Manufactured Product</field>
<field name="code">product.product</field>
<field name="prefix">CP%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 制造的板件,如"顶板" Components.-->
<record id="seq_mrp_component" model="ir.sequence">
<field name="name">Sequence for Manufactured Components</field>
<field name="code">product.product</field>
<field name="prefix">BJ%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 生产原材料,采购的板材,如"16mm中纤板" Components.-->
<record id="seq_sourced_material" model="ir.sequence">
<field name="name">Sequence for Sourced Material</field>
<field name="code">product.product</field>
<field name="prefix">BC%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 采购的成品,如"五金",纯买入卖出类 Sourced Products.-->
<record id="seq_sourced_product" model="ir.sequence">
<field name="name">Sequence for Sourced Product</field>
<field name="code">product.product</field>
<field name="prefix">WL%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- internal_type 数据-->
<!--[(4, ref('purchase.route_warehouse0_buy')),(4, ref('mrp.route_warehouse0_manufacture')),(4, ref('stock.route_warehouse0_mto'))]-->
<!--成品-->
<record id="internal_type_mrp_product" model="product.internal.type">
<field name="name">Manufactured Product</field>
<field name="ref">cp</field>
<field name="type">product</field>
<field name="sale_ok">1</field>
<field name="purchase_ok">0</field>
<field name="route_ids" eval="[(6,0, [ref('mrp.route_warehouse0_manufacture'),ref('stock.route_warehouse0_mto')])]"/>
<field name="description">Set prefix as "CP" in link sequence</field>
<field name="link_sequence" ref="seq_mrp_product"/>
</record>
<!--板件-->
<record id="internal_type_mrp_component" model="product.internal.type">
<field name="name">Manufactured Components</field>
<field name="ref">bj</field>
<field name="type">product</field>
<field name="sale_ok">0</field>
<field name="purchase_ok">0</field>
<field name="route_ids" eval="[(6,0, [ref('mrp.route_warehouse0_manufacture'),ref('stock.route_warehouse0_mto')])]"/>
<field name="description">Set prefix as "BJ" in link sequence</field>
<field name="link_sequence" ref="seq_mrp_component"/>
</record>
<!--纯制造原材料,板材-->
<record id="internal_type_sourced_material" model="product.internal.type">
<field name="name">Components Product</field>
<field name="ref">bc</field>
<field name="type">product</field>
<field name="sale_ok">0</field>
<field name="purchase_ok">1</field>
<field name="route_ids" eval="[(6,0, [ref('purchase.route_warehouse0_buy'),ref('stock.route_warehouse0_mto')])]"/>
<field name="description">Set prefix as "BC" in link sequence</field>
<field name="link_sequence" ref="seq_sourced_material"/>
</record>
<!--其它外购品,如五金-->
<record id="internal_type_sourced_product" model="product.internal.type">
<field name="name">Sourced Product</field>
<field name="ref">wl</field>
<field name="type">product</field>
<field name="sale_ok">1</field>
<field name="purchase_ok">1</field>
<field name="route_ids" eval="[(6,0, [ref('purchase.route_warehouse0_buy'),ref('stock.route_warehouse0_mto')])]"/>
<field name="description">Set prefix as "WL" in link sequence</field>
<field name="link_sequence" ref="seq_sourced_product"/>
</record>
<!--这个默认值可以不用因为在onchange事件会设置很多值-->
<!--设置产品默认值为制造成品-->
<record id="product_internal_type_default" model="ir.values">
<field name="name">internal_type</field>
<field name="model">product.template</field>
<field name="key">default</field>
<field name="key2"></field>
<field name="company_id" ref="base.main_company"/>
<field name="value" eval="'I' + str(ref('internal_type_mrp_product'))+'\n.'"/>
</record>
</data>
</odoo>

View File

@@ -1,84 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="0">
<!-- 更新序号规则 Auto Internal Reference. -->
<!-- 所有的 All Products. -->
<record id="seq_product_auto" model="ir.sequence">
<field name="name">Sequence for All Products</field>
<field name="code">product.product</field>
<field name="prefix">P%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 制造的成品 manufactured Products. -->
<record id="seq_manufacture" model="ir.sequence">
<field name="name">Sequence for Manufactured Product</field>
<field name="code">product.product</field>
<field name="prefix">D%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 制造的原料 Components.-->
<record id="seq_component" model="ir.sequence">
<field name="name">Sequence for Components Product</field>
<field name="code">product.product</field>
<field name="prefix">C%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 采购的成品 Sourced Products.-->
<record id="seq_sourced" model="ir.sequence">
<field name="name">Sequence for Sourced Product</field>
<field name="code">product.product</field>
<field name="prefix">S%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- internal_type 数据-->
<record id="internal_type_manufacture" model="product.internal.type">
<field name="name">Manufactured Product</field>
<field name="ref">d</field>
<field name="type">product</field>
<field name="sale_ok">1</field>
<field name="purchase_ok">0</field>
<field name="route_ids" eval="[(6,0, [ref('mrp.route_warehouse0_manufacture'),ref('stock.route_warehouse0_mto')])]"/>
<field name="description">Set prefix as "D" in link sequence</field>
<field name="link_sequence" ref="seq_manufacture"/>
</record>
<record id="internal_type_sourced" model="product.internal.type">
<field name="name">Sourced Product</field>
<field name="ref">s</field>
<field name="type">product</field>
<field name="sale_ok">1</field>
<field name="purchase_ok">1</field>
<field name="route_ids" eval="[(6,0, [ref('purchase.route_warehouse0_buy'),ref('stock.route_warehouse0_mto')])]"/>
<field name="description">Set prefix as "S" in link sequence</field>
<field name="link_sequence" ref="seq_sourced"/>
</record>
<record id="internal_type_component" model="product.internal.type">
<field name="name">Components Product</field>
<field name="ref">c</field>
<field name="type">product</field>
<field name="sale_ok">0</field>
<field name="purchase_ok">1</field>
<field name="route_ids" eval="[(6,0, [ref('purchase.route_warehouse0_buy'),ref('stock.route_warehouse0_mto')])]"/>
<field name="description">Set prefix as "C" in link sequence</field>
<field name="link_sequence" ref="seq_component"/>
</record>
<!--设置产品默认值为制造产品-->
<record id="product_internal_type_default" model="ir.values">
<field name="name">internal_type</field>
<field name="model">product.template</field>
<field name="key">default</field>
<field name="key2"></field>
<field name="company_id" ref="base.main_company"/>
<field name="value" eval="'I' + str(ref('app_product_sequence.internal_type_manufacture'))+'\n.'"/>
</record>
</data>
</odoo>

View File

@@ -1,109 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="0">
<!-- 更新序号规则 Auto Internal Reference. -->
<!-- 所有的 All Products. -->
<record id="seq_product_auto" model="ir.sequence">
<field name="name">Sequence for All Products</field>
<field name="code">product.product</field>
<field name="prefix">P%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 制造的成品,如"床" manufactured Products. -->
<record id="seq_mrp_product" model="ir.sequence">
<field name="name">Sequence for Manufactured Product</field>
<field name="code">product.product</field>
<field name="prefix">CP%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 制造的板件,如"顶板" Components.-->
<record id="seq_mrp_component" model="ir.sequence">
<field name="name">Sequence for Manufactured Components</field>
<field name="code">product.product</field>
<field name="prefix">BJ%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 生产原材料,采购的板材,如"16mm中纤板" Components.-->
<record id="seq_sourced_material" model="ir.sequence">
<field name="name">Sequence for Sourced Material</field>
<field name="code">product.product</field>
<field name="prefix">BC%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 采购的成品,如"五金",纯买入卖出类 Sourced Products.-->
<record id="seq_sourced_product" model="ir.sequence">
<field name="name">Sequence for Sourced Product</field>
<field name="code">product.product</field>
<field name="prefix">CL%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- internal_type 数据-->
<!--[(4, ref('purchase.route_warehouse0_buy')),(4, ref('mrp.route_warehouse0_manufacture')),(4, ref('stock.route_warehouse0_mto'))]-->
<!--成品-->
<record id="internal_type_mrp_product" model="product.internal.type">
<field name="name">成品</field>
<field name="ref">cp</field>
<field name="type">product</field>
<field name="sale_ok">1</field>
<field name="purchase_ok">0</field>
<field name="route_ids" eval="[(6,0, [ref('mrp.route_warehouse0_manufacture'),ref('stock.route_warehouse0_mto')])]"/>
<field name="description">制造的成品。如:床,桌子</field>
<field name="link_sequence" ref="seq_mrp_product"/>
</record>
<!--板件-->
<record id="internal_type_mrp_component" model="product.internal.type">
<field name="name">板件</field>
<field name="ref">bj</field>
<field name="type">product</field>
<field name="sale_ok">0</field>
<field name="purchase_ok">0</field>
<field name="route_ids" eval="[(6,0, [ref('mrp.route_warehouse0_manufacture'),ref('stock.route_warehouse0_mto')])]"/>
<field name="description">制造的半成品。如:床的左侧板,柜子的顶板</field>
<field name="link_sequence" ref="seq_mrp_component"/>
</record>
<!--纯制造原材料,板材-->
<record id="internal_type_sourced_material" model="product.internal.type">
<field name="name">原材料(板材)</field>
<field name="ref">bc</field>
<field name="type">product</field>
<field name="sale_ok">0</field>
<field name="purchase_ok">1</field>
<field name="route_ids" eval="[(6,0, [ref('purchase.route_warehouse0_buy'),ref('stock.route_warehouse0_mto')])]"/>
<field name="description">制造所需的原材料,不可直接销售。如:中纤板(厚14mm)</field>
<field name="link_sequence" ref="seq_sourced_material"/>
</record>
<!--其它外购品,如五金-->
<record id="internal_type_sourced_product" model="product.internal.type">
<field name="name">外购成品</field>
<field name="ref">cl</field>
<field name="type">product</field>
<field name="sale_ok">1</field>
<field name="purchase_ok">1</field>
<field name="route_ids" eval="[(6,0, [ref('purchase.route_warehouse0_buy'),ref('stock.route_warehouse0_mto')])]"/>
<field name="description">采购后可直接销售,也可当原材料的成品。如:门把手</field>
<field name="link_sequence" ref="seq_sourced_product"/>
</record>
<!--这个默认值可以不用因为在onchange事件会设置很多值-->
<!--设置产品默认值为制造成品-->
<record id="product_internal_type_default" model="ir.values">
<field name="name">internal_type</field>
<field name="model">product.template</field>
<field name="key">default</field>
<field name="key2"></field>
<field name="company_id" ref="base.main_company"/>
<field name="value" eval="'I' + str(ref('internal_type_mrp_product'))+'\n.'"/>
</record>
</data>
</odoo>

View File

@@ -1,91 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="0">
<!-- 更新序号规则 Auto Internal Reference. -->
<!-- 所有的 All Products. -->
<record id="seq_product_auto" model="ir.sequence">
<field name="name">Sequence for All Products</field>
<field name="code">product.product</field>
<field name="prefix">P%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 制造的成品,如"床" manufactured Products. -->
<record id="seq_mrp_product" model="ir.sequence">
<field name="name">Sequence for Manufactured Product</field>
<field name="code">product.product</field>
<field name="prefix">CP%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 制造的板件,如"顶板" Components.-->
<record id="seq_mrp_component" model="ir.sequence">
<field name="name">Sequence for Manufactured Components</field>
<field name="code">product.product</field>
<field name="prefix">BJ%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 生产原材料,采购的板材,如"16mm中纤板" Components.-->
<record id="seq_sourced_material" model="ir.sequence">
<field name="name">Sequence for Sourced Material</field>
<field name="code">product.product</field>
<field name="prefix">BC%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 采购的成品,如"五金",纯买入卖出类 Sourced Products.-->
<record id="seq_sourced_product" model="ir.sequence">
<field name="name">Sequence for Sourced Product</field>
<field name="code">product.product</field>
<field name="prefix">CL%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- internal_type 数据-->
<!--成品-->
<record id="internal_type_mrp_product" model="product.internal.type">
<field name="name">Manufactured Product</field>
<field name="ref">cp</field>
<field name="description">Set prefix as "CP" in link sequence</field>
<field name="link_sequence" ref="seq_mrp_product"/>
</record>
<!--板件-->
<record id="internal_type_mrp_component" model="product.internal.type">
<field name="name">Manufactured Components</field>
<field name="ref">bj</field>
<field name="description">Set prefix as "BJ" in link sequence</field>
<field name="link_sequence" ref="seq_mrp_component"/>
</record>
<!--纯制造原材料,板材-->
<record id="internal_type_sourced_material" model="product.internal.type">
<field name="name">Sourced Material</field>
<field name="ref">bc</field>
<field name="description">Set prefix as "BC" in link sequence</field>
<field name="link_sequence" ref="seq_sourced_material"/>
</record>
<!--其它外购品,如五金-->
<record id="internal_type_sourced_product" model="product.internal.type">
<field name="name">Sourced Product</field>
<field name="ref">cl</field>
<field name="description">Set prefix as "cl" in link sequence</field>
<field name="link_sequence" ref="seq_sourced_product"/>
</record>
<!--设置产品默认值为制造成品-->
<record id="product_internal_type_default" model="ir.values">
<field name="name">internal_type</field>
<field name="model">product.template</field>
<field name="key">default</field>
<field name="key2"></field>
<field name="company_id" ref="base.main_company"/>
<field name="value" eval="'I' + str(ref('internal_type_mrp_product'))+'\n.'"/>
</record>
</data>
</odoo>

View File

@@ -1,34 +0,0 @@
# -*- coding: utf-8 -*-
# Created on 2017-11-05
# author: 广州尚鹏http://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# http://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# http://www.sunpop.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# http://www.sunpop.cn/odoo10_developer_document_offline/
# description:
def pre_init_hook(cr):
"""
Updates existing codes matching the default 'New' or
empty. Primarily this ensures installation does not
fail for demo data.
:param cr: database cursor
:return: void
"""
cr.execute("UPDATE product_product "
"SET default_code = '!!PR!!' || id "
"WHERE default_code IS NULL OR default_code = 'New';")
cr.execute("UPDATE product_template "
"Set default_code = "
"(select default_code from product_product "
"where product_product.product_tmpl_id = product_template.id limit 1)"
"WHERE default_code IS NULL OR default_code = 'New';")

View File

@@ -1,221 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * app_product_sequence
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0-20171107\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-18 19:02+0000\n"
"PO-Revision-Date: 2017-12-18 19:02+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_product_sequence
#: model:ir.model.fields,help:app_product_sequence.field_product_internal_type_type
msgid "A stockable product is a product for which you manage stock. The \"Inventory\" app has to be installed.\n"
"A consumable product, on the other hand, is a product for which stock is not managed.\n"
"A service is a non-material product you provide.\n"
"A digital content is a non-material product you sell online. The files attached to the products are the one that are sold on the e-commerce such as e-books, music, pictures,... The \"Digital Product\" module has to be installed."
msgstr "A stockable product is a product for which you manage stock. The \"Inventory\" app has to be installed.\n"
"A consumable product, on the other hand, is a product for which stock is not managed.\n"
"A service is a non-material product you provide.\n"
"A digital content is a non-material product you sell online. The files attached to the products are the one that are sold on the e-commerce such as e-books, music, pictures,... The \"Digital Product\" module has to be installed."
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_internal_type_purchase_ok
msgid "Can be Purchased"
msgstr "可用于采购"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_internal_type_rental
msgid "Can be Rent"
msgstr "可用于出租"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_internal_type_sale_ok
msgid "Can be Sold"
msgstr "可用于销售"
#. module: app_product_sequence
#: code:addons/app_product_sequence/models/product_internal_type.py:34
#: selection:product.internal.type,type:0
#, python-format
msgid "Consumable"
msgstr "可消耗"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_internal_type_create_uid
msgid "Created by"
msgstr "创建人"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_internal_type_create_date
msgid "Created on"
msgstr "创建时间"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_category_internal_type
msgid "Default Internal Type"
msgstr "默认产品内部类型"
#. module: app_product_sequence
#: model:ir.ui.view,arch_db:app_product_sequence.product_internal_type_form_view
msgid "Auto Set Product's Value To:"
msgstr "自动设置产品默认参数为:"
#. module: app_product_sequence
#: model:ir.model.fields,help:app_product_sequence.field_product_internal_type_route_ids
msgid "Depending on the modules installed, this will allow you to define the route of the product: whether it will be bought, manufactured, MTO/MTS,..."
msgstr "取决于安装的模块它允许在产品定义路线购买制造MTO/MTS等等..."
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_internal_type_description
msgid "Description"
msgstr "说明"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_internal_type_display_name
#: model:ir.model.fields,field_description:app_product_sequence.field_product_internal_type_name
#: model:ir.ui.view,arch_db:app_product_sequence.product_internal_type_form_view
msgid "Display Name"
msgstr "显示名称"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_internal_type_id
msgid "ID"
msgstr "ID"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_product_default_code_index
msgid "Internal Reference Index"
msgstr "Varient序号"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_product_default_code_stored
#: model:ir.model.fields,field_description:app_product_sequence.field_product_template_default_code_stored
msgid "Internal Reference Stored"
msgstr "主产品编码"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_product_internal_type
#: model:ir.model.fields,field_description:app_product_sequence.field_product_template_internal_type
msgid "Internal Type"
msgstr "内部类型(编码)"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_internal_type___last_update
msgid "Last Modified on"
msgstr "最后修改日"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_internal_type_write_uid
msgid "Last Updated by"
msgstr "最后更新人"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_internal_type_write_date
msgid "Last Updated on"
msgstr "最后更新时间"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_internal_type_link_sequence
msgid "Link Sequence"
msgstr "使用的序列"
#. module: app_product_sequence
#: code:addons/app_product_sequence/models/product_template.py:41
#, python-format
msgid "Please save product first before adding varients!"
msgstr "增加产品变体前,请先保存当前产品!"
#. module: app_product_sequence
#: model:ir.model.fields,help:app_product_sequence.field_product_internal_type_sequence_prefix
msgid "Prefix value of the record for the sequence"
msgstr "序列记录的前缀"
#. module: app_product_sequence
#: model:ir.model,name:app_product_sequence.model_product_product
msgid "Product"
msgstr "产品"
#. module: app_product_sequence
#: model:ir.model,name:app_product_sequence.model_product_category
msgid "Product Category"
msgstr "产品类别"
#. module: app_product_sequence
#: model:ir.actions.act_window,name:app_product_sequence.internal_type_action
#: model:ir.ui.menu,name:app_product_sequence.menu_internal_type_action_sale
#: model:ir.ui.menu,name:app_product_sequence.menu_internal_type_action_stock
#: model:ir.ui.menu,name:app_product_sequence.menu_internal_type_action_sys
#: model:ir.ui.view,arch_db:app_product_sequence.product_internal_type_form_view
#: model:ir.ui.view,arch_db:app_product_sequence.product_internal_type_tree_view
msgid "Product Internal Type"
msgstr "内部类型(编码)"
#. module: app_product_sequence
#: model:ir.model,name:app_product_sequence.model_product_template
msgid "Product Template"
msgstr "产品模板"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_internal_type_type
msgid "Product Type"
msgstr "产品类型"
#. module: app_product_sequence
#: code:addons/app_product_sequence/models/product_product.py:83
#, python-format
msgid "Product varient can only create in Product view!"
msgstr "请在产品管理页面增加产品的多属性!"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_internal_type_route_ids
msgid "Routes"
msgstr "路线"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_internal_type_sequence_prefix
msgid "Sequence Prefix"
msgstr "编号前缀"
#. module: app_product_sequence
#: code:addons/app_product_sequence/models/product_internal_type.py:35
#: selection:product.internal.type,type:0
#, python-format
msgid "Service"
msgstr "服务"
#. module: app_product_sequence
#: model:ir.model.fields,help:app_product_sequence.field_product_internal_type_sale_ok
msgid "Specify if the product can be selected in a sales order line."
msgstr "如果产品能在销售单明细在被选择,则指定。"
#. module: app_product_sequence
#: code:addons/app_product_sequence/models/product_internal_type.py:36
#: selection:product.internal.type,type:0
#, python-format
msgid "Stockable Product"
msgstr "可库存产品"
#. module: app_product_sequence
#: sql_constraint:product.internal.type:0
#: sql_constraint:product.product:0
msgid "The reference must be unique"
msgstr "产品内部编码不可重复!"
#. module: app_product_sequence
#: model:ir.model.fields,field_description:app_product_sequence.field_product_internal_type_ref
msgid "Unique Code"
msgstr "唯一编码"
#. module: app_product_sequence
#: model:ir.model,name:app_product_sequence.model_product_internal_type
msgid "product.internal.type"
msgstr "product.internal.type"

View File

@@ -1,5 +0,0 @@
# -*- coding: utf-8 -*-
import product_template
import product_product
import product_category
import product_internal_type

View File

@@ -1,27 +0,0 @@
# -*- coding: utf-8 -*-
# Created on 2017-11-28
# author: 广州尚鹏http://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# http://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# http://www.sunpop.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# http://www.sunpop.cn/odoo10_developer_document_offline/
# description:
from openerp import api, fields, models, exceptions, _
class ProductCategory(models.Model):
_name = "product.category"
_inherit = ['product.category']
internal_type = fields.Many2one(
'product.internal.type', 'Default Internal Type',
auto_join=True, required=False)

View File

@@ -1,62 +0,0 @@
# -*- coding: utf-8 -*-
# Created on 2017-11-05
# author: 广州尚鹏http://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# http://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# http://www.sunpop.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# http://www.sunpop.cn/odoo10_developer_document_offline/
# description:
from openerp import api, fields, models, _
class ProductInternalType(models.Model):
_name = "product.internal.type"
name = fields.Char('Display Name', default='Normal', translate=True)
description = fields.Char('Description')
ref = fields.Char('Unique Code', required=True)
link_sequence = fields.Many2one(
'ir.sequence', 'Link Sequence',
auto_join=True, required=True, domain="[('code', '=', 'product.product')]")
sequence_prefix = fields.Char(u'Sequence Prefix', related='link_sequence.prefix', readonly=True, store=False)
# 各种默认值,填则自动录入,不填则不管
type = fields.Selection([
('consu', _('Consumable')),
('service', _('Service')),
('product', _('Stockable Product'))], string='Product Type',
help='A stockable product is a product for which you manage stock. The "Inventory" app has to be installed.\n'
'A consumable product, on the other hand, is a product for which stock is not managed.\n'
'A service is a non-material product you provide.\n'
'A digital content is a non-material product you sell online. The files attached to the products are the one that are sold on '
'the e-commerce such as e-books, music, pictures,... The "Digital Product" module has to be installed.')
rental = fields.Boolean('Can be Rent')
sale_ok = fields.Boolean(
'Can be Sold', default=True,
help="Specify if the product can be selected in a sales order line.")
purchase_ok = fields.Boolean('Can be Purchased', default=True)
# 使用目录的默认路线来处理,暂时不用内部类型路线
route_ids = fields.Many2many('stock.location.route', string='Routes',
domain=[('product_selectable', '=', True)],
help="Depending on the modules installed, this will allow you to define the route of the product: whether it will be bought, manufactured, MTO/MTS,...")
# company_id = fields.Many2one(
# 'res.company', 'Company',
# default=lambda self: self.env.user.company_id.id, index=1)
_sql_constraints = [
('uniq_ref',
'unique(ref)',
'The reference must be unique'),
]

View File

@@ -1,84 +0,0 @@
# -*- coding: utf-8 -*-
# Created on 2017-11-05
# author: 广州尚鹏http://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# http://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# http://www.sunpop.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# http://www.sunpop.cn/odoo10_developer_document_offline/
# description:
from openerp import models, fields, api, exceptions, _
class ProductProduct(models.Model):
_inherit = 'product.product'
default_code = fields.Char('Internal Reference', index=True, readonly=True, default=lambda self: _('New'), copy=False)
default_code_index = fields.Integer('Internal Reference Index', readonly=True)
_sql_constraints = [
('uniq_default_code',
'unique(default_code)',
'The reference must be unique'),
]
@api.model
def create(self, vals):
# todo: but 先建空白产品后编辑给2个以上变体序号会少个 -1
# code_index: 当没有变体现时值为0有变体时为该变体序号
if 'default_code' not in vals or vals['default_code'] == 'New':
code_index = 0
if 'product_tmpl_id' in vals:
template = self.env['product.template'].search([('id', '=', vals['product_tmpl_id'])], limit=1)
mylen = len(template.product_variant_ids)
# created from product_template
if 'product_tmpl_id' in vals:
template = self.env['product.template'].search([('id', '=', vals['product_tmpl_id'])], limit=1)
attr = vals['attribute_value_ids'][0][2]
if not(attr):
# 没有属性值则是单规格产品。attribute_value_ids格式为[6,0,[]]。多规格时attribute_value_ids格式为[6,0,[x]]
code_index = 0
vals['default_code_index'] = code_index
vals['default_code'] = template.default_code_stored
elif mylen == 0:
# 有属性值了,自己是第一个规格
code_index = 1
vals['default_code_index'] = code_index
vals['default_code'] = template.default_code_stored + '-%03d'%(code_index)
elif mylen == 1:
# 已存在1个当存在的1个有属性时要改已存在的product值
code_index = template.product_variant_ids[:1].default_code_index
if template.product_variant_ids[:1].attribute_value_ids:
if code_index == 0:
code_index = 1
template.product_variant_ids[:1].default_code_index = code_index
template.product_variant_ids[:1].default_code = template.default_code_stored + '-%03d'%(code_index)
# 接着改当前操作的product值
code_index = code_index + 1
vals['default_code_index'] = code_index
vals['default_code'] = template.default_code_stored + '-%03d'%(code_index)
else:
# 找到最大的序号
variant_max = max(template.product_variant_ids,key=lambda x: x['default_code_index'])
code_index = variant_max['default_code_index'] + 1
vals['default_code_index'] = code_index
vals['default_code'] = template.default_code_stored + '-%03d'%(code_index)
else:
# create from product_product
sequence = self.env['product.internal.type'].search([('id', '=', vals['internal_type'])], limit=1)
if sequence:
vals['default_code'] = sequence.link_sequence.next_by_id()
return super(ProductProduct, self).create(vals)
@api.multi
def copy(self, default=None):
if len(self.product_tmpl_id.product_variant_ids)>1 :
raise exceptions.ValidationError(_('Product varient can only create in Product view!'))
return super(ProductProduct, self).copy(default=None)

View File

@@ -1,76 +0,0 @@
# -*- coding: utf-8 -*-
# Created on 2017-11-05
# author: 广州尚鹏http://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# http://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# http://www.sunpop.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# http://www.sunpop.cn/odoo10_developer_document_offline/
# description:
from openerp import api, fields, models, exceptions, _
class ProductTemplate(models.Model):
_name = "product.template"
_inherit = ['product.template']
# auto_join只要搜索product.template自动会join。如果经常用到 internal_type 效率会高。
internal_type = fields.Many2one(
'product.internal.type', 'Internal Type',
auto_join=True, required=True)
default_code = fields.Char(
'Internal Reference', compute='_compute_default_code',
inverse='_set_default_code', store=True, readonly=True,
default='New', copy=False)
# 因为default_code有odoo的处理方式影响面大故会将其另存到 default_code_stored
default_code_stored = fields.Char('Internal Reference Stored',default='New')
@api.model
def create(self, vals):
if 'attribute_line_ids' in vals:
if len(vals['attribute_line_ids'])>0:
raise exceptions.ValidationError(_('Please save product first before adding varients!'))
if 'default_code' not in vals or vals['default_code'] == 'New':
sequence = self.env['product.internal.type'].search([('id', '=', vals['internal_type'])], limit=1)
vals['default_code'] = sequence.link_sequence.next_by_id()
vals['default_code_stored'] = vals['default_code']
return super(ProductTemplate, self).create(vals)
@api.depends('product_variant_ids', 'product_variant_ids.default_code')
def _compute_default_code(self):
unique_variants = self.filtered(lambda template: len(template.product_variant_ids) == 1)
for template in unique_variants:
template.default_code = template.product_variant_ids.default_code
for template in (self):
if len(template.product_variant_ids)>1:
template.default_code = ''
@api.one
def _set_default_code(self):
if len(self.product_variant_ids) == 1:
self.product_variant_ids.default_code = self.default_code_stored
# 当内部类型变化时,改变产品模板的各默认值
@api.onchange('internal_type')
def _onchange_internal_type(self):
if self.internal_type:
self.type = self.internal_type.type
self.rental = self.internal_type.rental
self.sale_ok = self.internal_type.sale_ok
self.purchase_ok = self.internal_type.purchase_ok
self.route_ids = self.internal_type.route_ids
# 分类变动时,如果分类绑定了内部类型则联动
@api.onchange('categ_id')
def _onchange_cate_id(self):
if self.categ_id and self.categ_id.internal_type:
self.internal_type = self.categ_id.internal_type

View File

@@ -1,3 +0,0 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_sale_order_type_manager,access_sale_order_type_manager,model_product_internal_type,sales_team.group_sale_manager,1,1,1,1
access_sale_order_type_salesman,access_sale_order_type_salesman,model_product_internal_type,sales_team.group_sale_salesman,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_sale_order_type_manager access_sale_order_type_manager model_product_internal_type sales_team.group_sale_manager 1 1 1 1
3 access_sale_order_type_salesman access_sale_order_type_salesman model_product_internal_type sales_team.group_sale_salesman 1 0 0 0

View File

@@ -1,12 +0,0 @@
<?xml version="1.0"?>
<odoo>
<record model="ir.rule" id="product_internal_type_comp_rule">
<field name="name">Product Internal Type multi-company</field>
<field name="model_id" ref="app_product_sequence.model_product_internal_type"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
<field name="perm_read" eval="1"/>
<field name="perm_create" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_unlink" eval="1"/>
</record>
</odoo>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

View File

@@ -1,162 +0,0 @@
<section class="oe_container oe_dark">
<div class="oe_row oe_padded">
<h2 class="oe_slogan" style="color:#875A7B;">App Product Auto Sequence, Auto Code(Variants Supported)</h2>
<div>
<p>
This module allows to associate a sequence to the product reference.<br/>
The reference (default code) is unique (SQL constraint) and required.<br/>
Support Product with or without Variants.
</p>
<ul>
<li>
Auto Sequence or code for every product.
</li>
<li>
Auto Sequence or for every product variants, like product20171130-001.
</li>
<li>
Product code must be Unique.
</li>
<li>
Define different product type, each product type use own rule of sequence.
</li>
<li>
Quick access in sale , inventory, system menu.
</li>
<li>
Multi language support.
</li>
</ul>
<div>
<img class="oe_picture oe_screenshot" src="set1.jpg">
</div>
<div>
<img class="oe_picture oe_screenshot" src="set2.jpg">
</div>
<h2>Sample Rule: if we create on oct 2017</h2>
<ul>
<li>
Manufactured Products: M20171100001
</li>
<li>
Components Products: C20171100001
</li>
<li>
Sourced Products: S20171100001
</li>
</ul>
<p>
Sepcial for variants. add [-00?]<br/>
<ul>
<li>
Products with color[red]: M20171100001-001
</li>
<li>
Products with color[blue]: M20171100001-002
</li>
<li>
Products with color[white]: M20171100001-003
</li>
</ul>
</p>
<h2>Installation:</h2>
<p>
Prior to installing this module, if you have any existing products you should ensure they already have a
unique reference (or no reference) set.<br/>
Products with a default_code of '/' or empty will automatically be assigned a code of "!!DP!!" followed
by the system id for that product.<br/>
Otherwise the setting of the unique constraint will fail and the module will fail to install.<br/>
Notice:<br/>
Odoo product variants is very special.<br/>
When u create a product(not product template) with attribute, It would delete the first product, which
have no attribute.
So it's very normal that the first product variants begin wit ???-002.<br/>
And we make a rule that the product variants can only create after you create normal product template.
</p>
<h2>How to use: Very simple</h2>
<p>
After installed the app. You can Go to anyone of the menu:<br/>
<ul>
<li>
Sales->Configuration->Products->Product Internal Type
</li>
<li>
Inventory->Configuration->Products->Product Internal Type
</li>
<li>
Settings->Sequences & Identifiers->Product Internal Type
</li>
</ul>
</p>
<p>
You would see the default Product Intertype we create.
<div>
<img class="oe_picture oe_screenshot" src="set3.jpg">
</div>
</p>
<p>
And create the product and code by yourself.
<div>
<img class="oe_picture oe_screenshot" src="set4.jpg">
</div>
</p>
<p>
Notice: The "Sequence Code" Field of sequence must be "product.product"
<div>
<img class="oe_picture oe_screenshot" src="set5.jpg">
</div>
</p>
Go to Prior to installing this module, if you have any existing products you should ensure they already have
a
unique reference (or no reference) set.<br/>
Products with a default_code of '/' or empty will automatically be assigned a code of "!!DP!!" followed
by the system id for that product.<br/>
Otherwise the setting of the unique constraint will fail and the module will fail to install.<br/>
Notice:<br/>
Odoo product variants is very special.<br/>
When u create a product(not product template) with attribute, It would delete the first product, which
have no attribute.
So it's very normal that the first product variants begin wit ???-002.<br/>
And we make a rule that the product variants can only create after you create normal product template.
</p>
</div>
</div>
</section>
<section class="oe_container oe_separator">
</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</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="http://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>http://www.sunpop.cn</a>
</div>
</div>
</div>
</section>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

View File

@@ -1,15 +0,0 @@
# -*- coding: utf-8 -*-
'''
Created on 2017-10-28
@author: 广州尚鹏http://www.sunpop.cn
@email: 300883@qq.com
@resource of Sunpop
Odoo10离线中文用户手册下载
http://www.sunpop.cn/odoo10_user_manual_document_offline/
Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
http://www.sunpop.cn/odoo10_developer_document_offline/
@description:
'''
from . import test_product_sequence

View File

@@ -1,59 +0,0 @@
# -*- coding: utf-8 -*-
'''
Created on 2017-10-28
@author: 广州尚鹏http://www.sunpop.cn
@email: 300883@qq.com
@resource of Sunpop
Odoo10离线中文用户手册下载
http://www.sunpop.cn/odoo10_user_manual_document_offline/
Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
http://www.sunpop.cn/odoo10_developer_document_offline/
@description:
'''
from odoo.tests.common import TransactionCase
from ..hooks import pre_init_hook
class TestProductSequence(TransactionCase):
"""Tests for creating product with and without Product Sequence"""
def setUp(self):
super(TestProductSequence, self).setUp()
self.product_product = self.env['product.product']
def test_product_create_with_default_code(self):
product = self.product_product.create(dict(
name="Apple",
default_code='PROD01'
))
self.assertEqual(product.default_code, 'PROD01')
def test_product_create_without_default_code(self):
product_1 = self.product_product.create(dict(
name="Orange",
default_code='/'))
self.assertRegexpMatches(str(product_1.default_code), r'PR/*')
def test_product_copy(self):
product_2 = self.product_product.create(dict(
name="Apple",
default_code='PROD02'
))
copy_product_2 = product_2.copy()
self.assertEqual(copy_product_2.default_code, 'PROD02-copy')
def test_pre_init_hook(self):
product_3 = self.product_product.create(dict(
name="Apple",
default_code='PROD03'
))
self.cr.execute(
"update product_product set default_code='/' where id=%s"
% (product_3.id,))
product_3.invalidate_cache()
self.assertEqual(product_3.default_code, '/')
pre_init_hook(self.cr)
product_3.invalidate_cache()
self.assertEqual(product_3.default_code, '!!mig!!%s' % (product_3.id,))

View File

@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--目录list-->
<record id="product_category_list_view_internal_type" model="ir.ui.view">
<field name="name">product.category.list.internal_type</field>
<field name="model">product.category</field>
<field name="inherit_id" ref="product.product_category_list_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='display_name']" position="after">
<field name="internal_type"/>
</xpath>
</field>
</record>
<!--目录Form-->
<record id="product_category_form_view_internal_type" model="ir.ui.view">
<field name="name">product.category.form._internal_type</field>
<field name="model">product.category</field>
<field name="inherit_id" ref="product.product_category_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='type']" position="after">
<field name="internal_type"/>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@@ -1,77 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--产品内部类型list-->
<record id="product_internal_type_tree_view" model="ir.ui.view">
<field name="name">product.internal.type.tree</field>
<field name="model">product.internal.type</field>
<field name="arch" type="xml">
<tree string="Product Internal Type">
<field name="name"/>
<field name="ref"/>
<field name="type"/>
<field name="sale_ok"/>
<field name="purchase_ok"/>
<field name="route_ids" widget="many2many_tags"/>
<field name="link_sequence" context="{'default_code': 'product.product'}"/>
<field name="sequence_prefix"/>
<field name="description"/>
</tree>
</field>
</record>
<!--产品内部类型from-->
<record id="product_internal_type_form_view" model="ir.ui.view">
<field name="name">product.internal.type.form</field>
<field name="model">product.internal.type</field>
<field name="arch" type="xml">
<form string="Product Internal Type">
<sheet>
<div class="oe_title">
<label class="oe_edit_only" for="name" string="Display Name"/>
<h1>
<field name="name"/>
</h1>
</div>
<group>
<group>
<field name="ref"/>
</group>
<group>
<field name="description"/>
</group>
</group>
<group>
<field name="link_sequence"/>
<field name="sequence_prefix"/>
</group>
<group string="Auto Set Product's Value To:">
<group>
<field name="type"/>
<field name="route_ids" widget="many2many_checkboxes"/>
</group>
<group>
<field name="sale_ok"/>
<field name="purchase_ok"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="internal_type_action" model="ir.actions.act_window">
<field name="name">Product Internal Type</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.internal.type</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="app_product_sequence.internal_type_action" id="menu_internal_type_action_sys" parent="base.next_id_5"/>
<menuitem action="app_product_sequence.internal_type_action" id="menu_internal_type_action_sale"
parent="sale.prod_config_main" sequence="6" groups="base.group_no_one"/>
<menuitem action="app_product_sequence.internal_type_action" id="menu_internal_type_action_stock"
parent="stock.menu_product_in_config_stock" sequence="3" groups="base.group_no_one"/>
</data>
</openerp>

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--产品list-->
<record id="product_product_tree_view" model="ir.ui.view">
<field name="name">product.product.tree</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_product_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="after">
<field name="internal_type"/>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--产品模板list-->
<record id="product_template_tree_view" model="ir.ui.view">
<field name="name">product.template.product.tree</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='type']" position="before">
<field name="internal_type"/>
</xpath>
</field>
</record>
<!--产品Form-->
<record id="product_template_form_view" model="ir.ui.view">
<field name="name">product.template.common.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='options']" position="before">
<div>
<label for="internal_type"/>
<field name="internal_type" options="{'no_create': True,'no_open': True}"/>
</div>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@@ -1,22 +0,0 @@
App Product Auto Sequence, Auto Code(Variants Supported)
1.<2E>Զ<EFBFBD><D4B6><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD>
2.<2E>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EBA3AC>ʽΪ <20><><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>-001<30><31>
3.<2E><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>ǿ<EFBFBD><C7BF>Ҫ<EFBFBD><D2AA>Ψһ<CEA8><D2BB>
4.<2E><><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD>ͣ<EFBFBD><CDA3><EFBFBD>ͬ<EFBFBD><CDAC>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>ʹ<EFBFBD>ò<EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
5.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۡ<EFBFBD><DBA1><EFBFBD><EFBFBD>桢ϵͳ<CFB5>˵<EFBFBD><CBB5>п<EFBFBD><D0BF>ٶ<EFBFBD><D9B6>
6.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD>֡<EFBFBD>
This module allows to associate a sequence to the product reference.<br/>
The reference (default code) is unique (SQL constraint) and required.<br/>
Support Product with or without Variants.
1.Auto Sequence or code for every product.<2E>Զ<EFBFBD><D4B6><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD>
2.Auto Sequence or for every product variants, like product20171130-001.<2E>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EBA3AC>ʽΪ <20><><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>-001<30><31>
3.Product code must be Unique.<2E><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>ǿ<EFBFBD><C7BF>Ҫ<EFBFBD><D2AA>Ψһ<CEA8><D2BB>
4.Define different product type, each product type use own rule of sequence.<2E><><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD>ͣ<EFBFBD><CDA3><EFBFBD>ͬ<EFBFBD><CDAC>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>ʹ<EFBFBD>ò<EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
5.Quick access in sale , inventory, system menu.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۡ<EFBFBD><DBA1><EFBFBD><EFBFBD>桢ϵͳ<CFB5>˵<EFBFBD><CBB5>п<EFBFBD><D0BF>ٶ<EFBFBD><D9B6>
6.Multi language support.<br/><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD>֡<EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
http://www.sunpop.cn/product/app-product-auto-sequence-auto-codevariants-supported/

View File

@@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
'''
Created on 2017-10-28
@author: 广州尚鹏http://www.sunpop.cn
@email: 300883@qq.com
@resource of Sunpop
Odoo10离线中文用户手册下载
http://www.sunpop.cn/odoo10_user_manual_document_offline/
Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
http://www.sunpop.cn/odoo10_developer_document_offline/
@description:
'''
import models
import controllers
from .hooks import pre_init_hook

View File

@@ -1,67 +0,0 @@
# -*- coding: utf-8 -*-
# Created on 2017-11-05
# author: 广州尚鹏http://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# http://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# http://www.sunpop.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# http://www.sunpop.cn/odoo10_developer_document_offline/
# description:
{
'name': 'App Product Internal Type,Auto Sequence, Auto Code(Variants Supported), Auto Attributes',
'summary': 'Auto Internal Reference.',
"version": '10.0.2.2',
'category': 'Sales',
'author': 'Sunpop.cn',
'website': 'http://www.sunpop.cn',
'license': 'AGPL-3',
'sequence': 2,
'installable': True,
'auto_install': True,
'application': True,
'images': ['static/description/set2.jpg'],
'currency': 'EUR',
'price': 98,
'description': u"""
App Product Auto Sequence, Auto Code(Variants Supported), Auto Attributes
This module allows to associate a sequence to the product reference.<br/>
The reference (default code) is unique (SQL constraint) and required.<br/>
Support Product with or without Variants.
1.Auto Sequence or code for every product.自动产品编码。
2.Auto Sequence or for every product variants, like product20171130-001.自动多规格产品编码,形式为 主产品编码-001。
3.Product code must be Unique.产品编码强制要求唯一。
4.Define different product type, each product type use own rule of sequence.可自定义产品类型,不同产品类型使用不同编码规则。
5.Quick access in sale , inventory, system menu.可以在销售、库存、系统菜单中快速定义。
6.Multi language support.<br/>多语种支持。
7.Setup default Auto Sequence for each product category自动设置每个产品目录使用的产品编码规则
8.Auto setup product attribute lik Sale/Purchase, Stockable/Consumable/Service, Stock Routes. 自动设置产品的销售/采购,可库存产品/服务/消耗品,购买/制造/按订单生成等库存路线
""",
'pre_init_hook': 'pre_init_hook',
'depends': [
'product',
'stock',
'sale',
'purchase',
'mrp',
],
'data': [
# 视图
"security/ir.model.access.csv",
"security/security.xml",
'views/product_template_view.xml',
'views/product_product_view.xml',
'views/product_category_view.xml',
'views/product_internal_type_view.xml',
'data/product_sequence.xml',
],
'demo': [
],
}

View File

@@ -1 +0,0 @@
import main

Some files were not shown because too many files have changed in this diff Show More