mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
hatchtec release mro
This commit is contained in:
@@ -1,6 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from . import models
|
|
||||||
from .hooks import pre_init_hook
|
|
||||||
from .hooks import post_init_hook
|
|
||||||
from .hooks import uninstall_hook
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Created on 2019-09-02
|
|
||||||
# author: 广州尚鹏,https://www.sunpop.cn
|
|
||||||
# email: 300883@qq.com
|
|
||||||
# resource of Sunpop
|
|
||||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
|
|
||||||
|
|
||||||
# Odoo12在线用户手册(长期更新)
|
|
||||||
# https://www.sunpop.cn/documentation/user/12.0/zh_CN/index.html
|
|
||||||
|
|
||||||
# Odoo12在线开发者手册(长期更新)
|
|
||||||
# https://www.sunpop.cn/documentation/12.0/index.html
|
|
||||||
|
|
||||||
# Odoo10在线中文用户手册(长期更新)
|
|
||||||
# https://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
|
|
||||||
|
|
||||||
# Odoo10离线中文用户手册下载
|
|
||||||
# https://www.sunpop.cn/odoo10_user_manual_document_offline/
|
|
||||||
# Odoo10离线开发手册下载-含python教程,jquery参考,Jinja2模板,PostgresSQL参考(odoo开发必备)
|
|
||||||
# https://www.sunpop.cn/odoo10_developer_document_offline/
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# Copyright (C) 2009-TODAY Sunpop.cn Ltd. https://www.sunpop.cn
|
|
||||||
# Author: Ivan Deng,300883@qq.com
|
|
||||||
# You can modify it under the terms of the GNU LESSER
|
|
||||||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
|
|
||||||
# See <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# It is forbidden to publish, distribute, sublicense, or sell copies
|
|
||||||
# of the Software or modified copies of the Software.
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
{
|
|
||||||
'name': "Partner set customer vendor",
|
|
||||||
'version': '13.19.11.13',
|
|
||||||
'author': 'Sunpop.cn',
|
|
||||||
'category': 'Base',
|
|
||||||
'website': 'https://www.sunpop.cn',
|
|
||||||
'license': 'LGPL-3',
|
|
||||||
'sequence': 2,
|
|
||||||
'price': 18.00,
|
|
||||||
'currency': 'EUR',
|
|
||||||
'images': ['static/description/banner.png'],
|
|
||||||
'depends': [
|
|
||||||
'sale',
|
|
||||||
'purchase',
|
|
||||||
],
|
|
||||||
'summary': """
|
|
||||||
Add customer, vendor (supplier) field to partner model and views.
|
|
||||||
Set and view partner type: customer or vendor.
|
|
||||||
Odoo App of Sunpop.cn
|
|
||||||
""",
|
|
||||||
'description': """
|
|
||||||
Support Odoo 13, Enterprise and Community Edition
|
|
||||||
1. Add customer, vendor field to partner
|
|
||||||
3. Multi-language Support.
|
|
||||||
4. Multi-Company Support.
|
|
||||||
5. Support Odoo 13,12, 11, Enterprise and Community Edition
|
|
||||||
==========
|
|
||||||
1.
|
|
||||||
2.
|
|
||||||
3. 多语言支持
|
|
||||||
4. 多公司支持
|
|
||||||
5. Odoo 12, 11, 企业版,社区版,多版本支持
|
|
||||||
""",
|
|
||||||
'data': [
|
|
||||||
# 'security/*.xml',
|
|
||||||
# 'security/ir.model.access.csv.csv',
|
|
||||||
# 'data/.xml',
|
|
||||||
'views/res_partner_views.xml',
|
|
||||||
# 'report/.xml',
|
|
||||||
],
|
|
||||||
'qweb': [
|
|
||||||
'static/src/xml/*.xml',
|
|
||||||
],
|
|
||||||
'demo': [],
|
|
||||||
'test': [],
|
|
||||||
'css': [],
|
|
||||||
'js': [],
|
|
||||||
'pre_init_hook': 'pre_init_hook',
|
|
||||||
'post_init_hook': 'post_init_hook',
|
|
||||||
'uninstall_hook': 'uninstall_hook',
|
|
||||||
'installable': True,
|
|
||||||
'application': True,
|
|
||||||
'auto_install': True,
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Created on 2018-10-12
|
|
||||||
# author: 广州尚鹏,https://www.sunpop.cn
|
|
||||||
# email: 300883@qq.com
|
|
||||||
# resource of Sunpop
|
|
||||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
|
|
||||||
|
|
||||||
# Odoo在线中文用户手册(长期更新)
|
|
||||||
# https://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
|
|
||||||
|
|
||||||
# Odoo10离线中文用户手册下载
|
|
||||||
# https://www.sunpop.cn/odoo10_user_manual_document_offline/
|
|
||||||
# Odoo10离线开发手册下载-含python教程,jquery参考,Jinja2模板,PostgresSQL参考(odoo开发必备)
|
|
||||||
# https://www.sunpop.cn/odoo10_developer_document_offline/
|
|
||||||
# description:
|
|
||||||
|
|
||||||
from odoo import api, SUPERUSER_ID, _
|
|
||||||
|
|
||||||
|
|
||||||
def pre_init_hook(cr):
|
|
||||||
pass
|
|
||||||
# cr.execute("")
|
|
||||||
|
|
||||||
def post_init_hook(cr, registry):
|
|
||||||
try:
|
|
||||||
#
|
|
||||||
sql = "UPDATE res_partner SET customer = TRUE WHERE customer_rank >= 1;"
|
|
||||||
cr.execute(sql)
|
|
||||||
sql = "UPDATE res_partner SET supplier = TRUE WHERE supplier_rank >= 1"
|
|
||||||
cr.execute(sql)
|
|
||||||
cr.commit()
|
|
||||||
except Exception as e:
|
|
||||||
pass
|
|
||||||
pass
|
|
||||||
# cr.execute("")
|
|
||||||
|
|
||||||
def uninstall_hook(cr, registry):
|
|
||||||
pass
|
|
||||||
# cr.execute("")
|
|
||||||
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# Translation of Odoo Server.
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: Odoo Server 10.0\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2018-01-08 14:28+0000\n"
|
|
||||||
"PO-Revision-Date: 2018-01-08 14:28+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"
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Part of Sunpop.cn. See LICENSE file for full copyright and licensing details.
|
|
||||||
|
|
||||||
# Created on 2019-04-20
|
|
||||||
# author: 广州尚鹏,http://www.sunpop.cn
|
|
||||||
# email: 300883@qq.com
|
|
||||||
# resource of Sunpop
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
# Odoo12在线用户手册(长期更新)
|
|
||||||
# http://www.sunpop.cn/documentation/user/12.0/en/index.html
|
|
||||||
|
|
||||||
# Odoo12在线开发者手册(长期更新)
|
|
||||||
# http://www.sunpop.cn/documentation/12.0/index.html
|
|
||||||
|
|
||||||
# Odoo10在线中文用户手册(长期更新)
|
|
||||||
# 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 . import res_partner
|
|
||||||
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
||||||
|
|
||||||
import base64
|
|
||||||
import collections
|
|
||||||
import datetime
|
|
||||||
import hashlib
|
|
||||||
import pytz
|
|
||||||
import threading
|
|
||||||
import re
|
|
||||||
|
|
||||||
from email.utils import formataddr
|
|
||||||
|
|
||||||
import requests
|
|
||||||
from lxml import etree
|
|
||||||
from werkzeug import urls
|
|
||||||
|
|
||||||
from odoo import api, fields, models, tools, SUPERUSER_ID, _
|
|
||||||
from odoo.modules import get_module_resource
|
|
||||||
from odoo.osv.expression import get_unaccent_wrapper
|
|
||||||
from odoo.exceptions import UserError, ValidationError
|
|
||||||
from odoo.tools import pycompat
|
|
||||||
|
|
||||||
|
|
||||||
class Partner(models.Model):
|
|
||||||
_inherit = 'res.partner'
|
|
||||||
|
|
||||||
def _get_default_customer(self):
|
|
||||||
search_partner_mode = self.env.context.get('res_partner_search_mode')
|
|
||||||
is_customer = search_partner_mode == 'customer'
|
|
||||||
if is_customer and not self.env.context.get('default_customer'):
|
|
||||||
return is_customer
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
def _get_default_supplier(self):
|
|
||||||
search_partner_mode = self.env.context.get('res_partner_search_mode')
|
|
||||||
is_supplier = search_partner_mode == 'supplier'
|
|
||||||
if is_supplier and not self.env.context.get('default_supplier'):
|
|
||||||
return is_supplier
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
customer = fields.Boolean(string='Is a Customer', default=_get_default_customer, inverse='_set_customer',
|
|
||||||
help="Check this box if this contact is a customer. It can be selected in sales orders.")
|
|
||||||
supplier = fields.Boolean(string='Is a Vendor', default=_get_default_supplier, inverse='_set_supplier',
|
|
||||||
help="Check this box if this contact is a vendor. It can be selected in purchase orders.")
|
|
||||||
|
|
||||||
def _set_customer(self):
|
|
||||||
for rec in self:
|
|
||||||
if rec.customer:
|
|
||||||
if rec.customer_rank < 1 or not rec.customer_rank:
|
|
||||||
rec.customer_rank = 1
|
|
||||||
else:
|
|
||||||
rec.customer_rank = 0
|
|
||||||
|
|
||||||
def _set_supplier(self):
|
|
||||||
for rec in self:
|
|
||||||
if rec.supplier:
|
|
||||||
if rec.supplier_rank < 1 or not rec.supplier_rank:
|
|
||||||
rec.supplier_rank = 1
|
|
||||||
else:
|
|
||||||
rec.supplier_rank = 0
|
|
||||||
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<odoo>
|
|
||||||
<data noupdate="1">
|
|
||||||
<!-- model权限 -->
|
|
||||||
<record id="acc_module" model="ir.model.access">
|
|
||||||
<field name="name">acc_module_user</field>
|
|
||||||
<field name="model_id" ref="model_app_order"/>
|
|
||||||
<field name="group_id" ref="base.group_user"/>
|
|
||||||
<field name="perm_read" eval="1"/>
|
|
||||||
<field name="perm_write" eval="1"/>
|
|
||||||
<field name="perm_create" eval="1"/>
|
|
||||||
<field name="perm_unlink" eval="1"/>
|
|
||||||
</record>
|
|
||||||
<!-- 应用权限目录 -->
|
|
||||||
<record model="ir.module.category" id="app_module_category_1">
|
|
||||||
<field name="name">App...</field>
|
|
||||||
<field name="description">Helps you manage your ...</field>
|
|
||||||
<field name="sequence">8</field>
|
|
||||||
</record>
|
|
||||||
<!-- 权限用户 -->
|
|
||||||
<!-- 普通 -->
|
|
||||||
<record id="group_app_user" model="res.groups">
|
|
||||||
<field name="name">App User</field>
|
|
||||||
<field name="category_id" ref="app_module_category_1"/>
|
|
||||||
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
|
|
||||||
<field name="comment">The user will be able to ...</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- 管理员,可以配置 -->
|
|
||||||
<record id="group_app_admin" model="res.groups">
|
|
||||||
<field name="name">App Admin</field>
|
|
||||||
<field name="category_id" ref="app_module_category_1"/>
|
|
||||||
<field name="implied_ids" eval="[(4, ref('group_app_user'))]"/>
|
|
||||||
<field name="comment">The user will be able to config ...</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- group_erp_manager自动有完整权限 -->
|
|
||||||
<record id="base.group_erp_manager" model="res.groups">
|
|
||||||
<field name="implied_ids" eval="[(4, ref('group_app_admin'))]"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- Rules -->
|
|
||||||
<record id="rule_user" model="ir.rule">
|
|
||||||
<field name="name">Users are allowed to access their own m///</field>
|
|
||||||
<field name="model_id" ref="model_app_order"/>
|
|
||||||
<field name="domain_force">['|', ('partner_id', 'in', [user.partner_id.id]), ('user_id.id', '=', user.id)]</field>
|
|
||||||
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
|
|
||||||
</record>
|
|
||||||
<!--End -->
|
|
||||||
</data>
|
|
||||||
</odoo>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
|
||||||
|
Binary file not shown.
|
Before Width: | Height: | Size: 228 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 69 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 63 KiB |
@@ -1,87 +0,0 @@
|
|||||||
<section class="oe_container">
|
|
||||||
<div class="oe_row oe_spaced" >
|
|
||||||
<div class="oe_span12">
|
|
||||||
<h2 class="oe_slogan"> Partner set customer vendor </h2>
|
|
||||||
<h3 class="oe_slogan"> Set and view partner type: customer or vendor. </h3>
|
|
||||||
<div class="oe_row">
|
|
||||||
<h3>Lastest update: v13.19.10.28</h3>
|
|
||||||
<div class="oe_span12">
|
|
||||||
<img class="oe_demo oe_screenshot" style="max-height: 100%;" src="banner.png">
|
|
||||||
</div>
|
|
||||||
<div class="oe_span12 oe_spaced">
|
|
||||||
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
|
|
||||||
<i class="fa fa-hand-o-right"></i><b> Key features: </b>
|
|
||||||
<ul class="list-unstyled">
|
|
||||||
<li>
|
|
||||||
<i class="fa fa-check-square-o text-primary"></i>
|
|
||||||
Add customer, vendor field to partner model and views. Like odoo 12.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<i class="fa fa-check-square-o text-primary"></i>
|
|
||||||
Set and view partner type: customer or supplier.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="oe_container">
|
|
||||||
<div class="oe_row oe_spaced">
|
|
||||||
<h1 class="text-danger text-center">So Easy to set and show customer or vendor.</h1>
|
|
||||||
<h4 class="oe_slogan"> </h4>
|
|
||||||
<div class="oe_demo oe_screenshot">
|
|
||||||
<img src="demo1.jpg"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="oe_container">
|
|
||||||
<div class="oe_row oe_spaced">
|
|
||||||
<h1 class="text-danger text-center">Multi-language Support..</h1>
|
|
||||||
<h4 class="oe_slogan"> </h4>
|
|
||||||
<div class="oe_demo oe_screenshot">
|
|
||||||
<img src="cnreadme.jpg"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="oe_container oe_dark">
|
|
||||||
<div class="oe_row oe_spaced text-center">
|
|
||||||
<div class="oe_span12">
|
|
||||||
<h2 class="oe_slogan">Technical Help & Support</h2>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-12 pad0">
|
|
||||||
<div class="oe_mt16">
|
|
||||||
<p><h4>
|
|
||||||
For any type of technical help & support requests, Feel free to contact us</h4></p>
|
|
||||||
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
|
|
||||||
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:guohuadeng@hotmail.com"><span
|
|
||||||
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
|
|
||||||
<i class="fa fa-envelope"></i> guohuadeng@hotmail.com</a>
|
|
||||||
<p><h4>
|
|
||||||
Via QQ: 300883</h4></p>
|
|
||||||
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
|
|
||||||
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:300883@qq.com"><span
|
|
||||||
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
|
|
||||||
<i class="fa fa-envelope"></i> 300883@qq.com</a>
|
|
||||||
</div>
|
|
||||||
<div class="oe_mt16">
|
|
||||||
<p><h4>
|
|
||||||
Visit our website for more support.</h4></p>
|
|
||||||
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
|
|
||||||
class="btn btn-warning btn-lg" rel="nofollow" href="https://www.sunpop.cn" target="_blank"><span
|
|
||||||
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
|
|
||||||
<i class="fa fa-web"></i>https://www.sunpop.cn</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="oe_row oe_spaced text-center">
|
|
||||||
<h1>More Powerful addons, Make your odoo very easy to use, easy customize:
|
|
||||||
<a class="btn btn-primary mb16" href="http://www.odoo.com/apps/modules/browse?author=Sunpop.cn">Supop.cn Odoo Addons</a>
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 30 KiB |
@@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
<!--产品list,可调整显示顺序-->
|
|
||||||
<record id="app_product_product_tree_view" model="ir.ui.view">
|
|
||||||
<field name="name">app.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='type']" position="after">
|
|
||||||
<field name="abc_classification" widget="label_selection"
|
|
||||||
options="{'classes': {'a': 'danger', 'b': 'primary', 'c': 'default'}}"/>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<odoo>
|
|
||||||
<data>
|
|
||||||
<record id="app_view_partner_property_form" model="ir.ui.view">
|
|
||||||
<field name="name">res.partner.form</field>
|
|
||||||
<field name="model">res.partner</field>
|
|
||||||
<field name="priority" eval="1"/>
|
|
||||||
<field name="inherit_id" ref="account.view_partner_property_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<xpath expr="//group[@name='sale']/field[1]" position="before">
|
|
||||||
<field name="customer"/>
|
|
||||||
</xpath>
|
|
||||||
<xpath expr="//group[@name='purchase']/field[1]" position="before">
|
|
||||||
<field name="supplier"/>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
</data>
|
|
||||||
</odoo>
|
|
||||||
Reference in New Issue
Block a user