init ooo18 from 16

This commit is contained in:
Ivan Office
2024-11-04 17:13:02 +08:00
parent 0da14ceaca
commit 6233a29e32
59 changed files with 2483 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
from .hooks import pre_init_hook
from .hooks import post_init_hook
from . import controllers
from . import models
from . import ir
from . import res

View File

@@ -0,0 +1,130 @@
# -*- coding: utf-8 -*-
# Created on 2023-02-02
# author: 欧度智能https://www.odooai.cn
# email: 300883@qq.com
# resource of odooai
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# https://www.odooai.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# https://www.odooai.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# https://www.odooai.cn/odoo10_developer_document_offline/
# description:
{
'name': 'odoo中文版套件之基础,中国会计基础,Chinese Enhance All in One',
'version': '24.11.04',
'author': 'odooai.cn',
'category': 'Base',
'website': 'https://www.odooai.cn',
'live_test_url': 'https://demo.odooapp.cn',
'license': 'LGPL-3',
'sequence': 2,
'price': 0,
'currency': 'EUR',
'summary': '''
odoo简体中文版全面增强. Chinese enhance. Out of the box use odoo in china. Chinese address format, number format, money format.
Set all chinese default value. Default country, timezone, currency, partner.中国会计基础模块.
''',
'description': '''
odoo Chinese Enhance. odoo中国版增强-基础
1. 中文地址格式,适用于所有中国中文客户、供应商、合作伙伴、用户、员工信息等
2. 中文默认值,如国家、时区、货币等。处理模块 base, product.
3. 客户加简称,地址显示中文化,客户编码显示优先
4. 客户地址显示增加手机号与电话号码
5. 货币处理,人民币增强,增加排序显示
6. 修正品类的列表及m2o字段中不显示中文目录名的Bug
7. 修正仓库位置的列表及m2o字段中不显示中文目录名的Bug
8. 超级用户改时区为 中国
9. 时间格式年月日为 中国格式,如 2023-08-08时间为 12:34
10. 国家增加排序,中国排第一
11. 收款相关显示中国习惯
12. 翻译导出默认中文默认po
13. [默认已移除,可自行加载.py]在 base 模型增加 name_en_US 字段,赋值后同时改翻译值
14. 常用小数精度调整
15. 销售团队改为中国
16. 精简语言的显示,如 Chinese简体中文改为 中文
21. 多语言支持,多公司支持
22. Odoo 17,16,15,14,13,12, 企业版社区版在线SaaS.sh版等全版本支持
23. 代码完全开源
======
1. Chinese address format, applicable to all Chinese customers, suppliers, partners, users, employee information etc.
2. Default values in Chinese such as country, time zone and currency. Processing module base, product.
3. Add customer abbreviation and display addresses in Chinese; prioritize displaying customer codes.
4. Display phone numbers along with mobile numbers for customer addresses.
5. Currency processing with added sorting display.
6. Fixed bug where the category list and m2o field did not display the name of the Chinese directory.
7. Fixed bug where warehouse location list and m2o field did not display the name of the Chinese directory.
8. Superuser changed time zone to China.
9. Date format is year-month-day (e.g., 2023-08-08) and time is 12:34
10.Country sorting added; China ranked first
11.Display payment-related information according to typical practices in China.
12.Default export translation is set to Mandarin (po).
13.Added 'name_en_US' field in base model which updates translation value when assigned a value.
14.Common decimal precision adjustments made.
15.Sales team changed to [China].
21. Multi-language Support. Multi-Company Support.
22. Support Odoo 17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition.
23. Full Open Source.
''',
'pre_init_hook': 'pre_init_hook',
'post_init_hook': 'post_init_hook',
'depends': [
'base_address_extended',
'account',
'sales_team',
'sale',
'stock',
'app_odoo_customize',
],
'images': ['static/description/banner.jpg'],
'data': [
'views/res_partner_views.xml',
'views/res_currency_views.xml',
'views/sale_order_views.xml',
'views/account_move_views.xml',
'views/ir_default_views.xml',
# 'views/templates.xml',
'wizard/sale_make_invoice_advance_views.xml',
'data/base_data.xml',
'data/decimal_precision_data.xml',
'data/res_country_data.xml',
'data/res_currency_data.xml',
'data/res_lang_data.xml',
'data/res_company_data.xml',
'data/res_partner_data.xml',
'data/res_users_data.xml',
'data/product_category_data.xml',
'data/product_pricelist_data.xml',
'data/stock_location_data.xml',
'data/sales_team_data.xml',
'data/ir_default_data.xml',
'views/ir_module_module_views.xml',
],
'assets': {
'web.assets_backend': [
'app_base_chinese/static/src/scss/app_style.scss',
]
},
'demo': [
'demo/res_company_demo.xml',
'demo/res_partner_demo.xml',
],
'test': [
],
'css': [
],
'qweb': [
'static/src/xml/*.xml',
],
'js': [
],
'installable': True,
'application': True,
'auto_install': False,
}

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import database

View File

@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
import os
import re
from lxml import html
import odoo
import odoo.modules.registry
from odoo import http
from odoo.exceptions import AccessError
from odoo.http import content_disposition, dispatch_rpc, request, Response
from odoo.service import db
from odoo.tools.misc import file_open, str2bool
from odoo.addons.web.controllers.database import Database as Database
from odoo.addons.base.models.ir_qweb import render as qweb_render
DBNAME_PATTERN = '^[a-zA-Z0-9][a-zA-Z0-9_.-]+$'
class Database(Database):
def _render_template(self, **d):
d.setdefault('manage', True)
d['insecure'] = odoo.tools.config.verify_admin_password('admin')
d['list_db'] = odoo.tools.config['list_db']
d['langs'] = odoo.service.db.exp_list_lang()
d['countries'] = odoo.service.db.exp_list_countries()
d['pattern'] = DBNAME_PATTERN
# databases list
try:
d['databases'] = http.db_list()
d['incompatible_databases'] = odoo.service.db.list_db_incompatible(d['databases'])
except odoo.exceptions.AccessDenied:
d['databases'] = [request.db] if request.db else []
templates = {}
with file_open("web/static/src/public/database_manager.qweb.html", "r") as fd:
templates['database_manager'] = fd.read()
with file_open("web/static/src/public/database_manager.master_input.qweb.html", "r") as fd:
templates['master_input'] = fd.read()
# with file_open("web/static/src/public/database_manager.create_form.qweb.html", "r") as fd:
with file_open("app_base_chinese/static/src/public/database_manager.create_form.qweb.html", "r") as fd:
templates['create_form'] = fd.read()
def load(template_name):
fromstring = html.document_fromstring if template_name == 'database_manager' else html.fragment_fromstring
return (fromstring(templates[template_name]), template_name)
return qweb_render('database_manager', d, load)

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<function name="install_lang" model="res.lang"/>
<record id="base.main_partner" model="res.partner" context="{'default_is_company': True}">
<field name="name">欧度智能</field>
</record>
<!-- Basic Company -->
<record id="base.main_company" model="res.company">
<field name="name">欧度智能</field>
</record>
<record model="res.partner" id="base.partner_root">
<field name="name">超管</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!--<record id="sales_team.team_sales_department" model="crm.team">-->
<!--<field name="name">Sales</field>-->
<!--</record>-->
</data>
</odoo>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="product.decimal_discount" model="decimal.precision">
<field name="digits">0</field>
</record>
<record id="product.decimal_product_uom" model="decimal.precision">
<field name="digits">2</field>
</record>
<record id="account.decimal_payment" model="decimal.precision">
<field name="digits">3</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data noupdate="1">
<!-- 各种默认值 -->
<!--设置客户默认国家为中国-->
<function model="ir.default" name="set"
eval="('res.partner', 'country_id', ref('base.cn'))"/>
<!--设置默认时区为中国注意select 类型要加 ""-->
<function model="ir.default" name="set"
eval="('res.partner', 'tz', 'Etc/GMT-8')"/>
<!--设置用户email在odoo内提醒-->
<!-- fix此处不可设置因为门户用户只能通过 email不能 inbox-->
<!-- <function model="ir.default" name="set"-->
<!-- eval="('res.users', 'notification_type', 'inbox')"/>-->
<!--设置产品默认是可库存产品-->
<function model="ir.default" name="set"
eval="('product.template', 'detailed_type', 'product')"/>
<!--设置翻译导出默认中文-->
<function model="ir.default" name="set"
eval="('base.language.export', 'lang', 'zh_CN')"/>
<!--设置翻译导出默认po-->
<function model="ir.default" name="set"
eval="('base.language.export', 'format', 'po')"/>
</data>
</odoo>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- 注意,品类名默认是无中文的 -->
<function model="product.category" name="write" context="{'lang': 'zh_CN'}">
<value eval="[ref('product.product_category_all', False)]"/>
<value eval="{'name': '全部'}"/>
</function>
<function model="product.category" name="write" context="{'lang': 'zh_CN'}">
<value eval="[ref('product.product_category_1', False)]"/>
<value eval="{'name': '在售'}"/>
</function>
<function model="product.category" name="write" context="{'lang': 'zh_CN'}">
<value eval="[ref('product.cat_expense', False)]"/>
<value eval="{'name': '费用'}"/>
</function>
<function model="product.category" name="write" context="{'lang': 'zh_CN'}">
<value eval="[ref('event_sale.product_category_events', False)]"/>
<value eval="{'name': '活动票'}"/>
</function>
<!--<record id="product.product_category_all" model="product.category">-->
<!--<field name="name">全部</field>-->
<!--</record>-->
<!--<record id="product.product_category_1" model="product.category">-->
<!--<field name="name">在售</field>-->
<!--</record>-->
</data>
</odoo>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Price list -->
<!-- <record id="product.list0" model="product.pricelist">-->
<!-- <field name="currency_id" ref="base.CNY"/>-->
<!-- </record>-->
</data>
</odoo>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="base.main_company" model="res.company">
<field name="currency_id" ref="base.CNY"/>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Country -->
<record id="base.cn" model="res.country">
<field name="enforce_cities" eval="True"/>
<field name="address_format" eval="'%(country_name)s%(state_name)s%(city)s%(street)s\n%(street2)s'"/>
<field name="address_view_id" ref="app_base_chinese.app_view_partner_form_chinese"/>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Currencies -->
<!-- <record id="base.USD" model="res.currency">-->
<!-- <field name="active" eval="False"/>-->
<!-- </record>-->
<!-- <record id="base.EUR" model="res.currency">-->
<!-- <field name="active" eval="False"/>-->
<!-- </record>-->
<record id="base.CNY" model="res.currency" context="{'lang': 'zh_CN'}">
<field name="full_name">人民币</field>
<field name="active" eval="True"/>
<field name="currency_unit_label"></field>
<field name="currency_subunit_label"></field>
<field name="position">before</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="0">
<!-- 时间格式 -->
<record id="base.lang_zh_CN" model="res.lang" context="{'lang': 'zh_CN'}">
<field name="name">中文</field>
<field name="date_format">%Y-%m-%d</field>
<field name="time_format">%H:%M:%S</field>
<field name="active" eval="True"/>
</record>
<record id="base.lang_en" model="res.lang" context="{'lang': 'zh_CN'}">
<field name="name">English</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="base.public_partner" model="res.partner" context="{'lang': 'zh_CN'}">
<field name="name">公共访客用户</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- 默认user使用write处理 -->
<function model="res.users" name="write" context="{'lang': 'zh_CN'}">
<value eval="[ref('base.default_user')]"/>
<value model="res.users" eval="{
'lang': 'zh_CN',
'tz': 'Etc/GMT-8',
'name': '默认内部用户模板',
}"/>
</function>
<function model="res.users" name="write" context="{'lang': 'zh_CN'}">
<value eval="[ref('base.template_portal_user_id')]"/>
<value model="res.users" eval="{
'lang': 'zh_CN',
'tz': 'Etc/GMT-8',
'name': '默认门户用户模板',
}"/>
</function>
<!-- 游客-->
<function model="res.users" name="write" context="{'lang': 'zh_CN'}">
<value eval="[ref('base.public_user')]"/>
<value model="res.users" eval="{
'lang': 'zh_CN',
'tz': 'Etc/GMT-8',
}"/>
</function>
</data>
</odoo>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="sales_team.team_sales_department" model="crm.team" context="{'lang': 'zh_CN'}">
<field name="name">中国</field>
</record>
<record id="sales_team.team_sales_department" model="crm.team" context="{'lang': 'en'}">
<field name="name">China</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,7 @@
id,name
stock.stock_location_locations_partner,往来单位
stock.stock_location_customers,客户区位
stock.stock_location_suppliers,供应商区位
stock.stock_location_locations,物理区位
stock.stock_location_locations_virtual,虚拟区位
stock.stock_location_inter_wh,内部中转区位
1 id name
2 stock.stock_location_locations_partner 往来单位
3 stock.stock_location_customers 客户区位
4 stock.stock_location_suppliers 供应商区位
5 stock.stock_location_locations 物理区位
6 stock.stock_location_locations_virtual 虚拟区位
7 stock.stock_location_inter_wh 内部中转区位

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="stock.removal_fifo" model="product.removal" context="{'lang': 'zh_CN'}">
<field name="name">先进先出(FIFO)</field>
</record>
<record id="stock.removal_lifo" model="product.removal" context="{'lang': 'zh_CN'}">
<field name="name">后进先出(LIFO)</field>
</record>
</data>
<data noupdate="0">
<function model="stock.location" name="write" context="{'lang': 'zh_CN'}">
<value eval="[ref('stock.stock_location_locations', False)]"/>
<value model="stock.location" eval="{
'name': '物理区位',
}"/>
</function>
<function model="stock.location" name="write" context="{'lang': 'zh_CN'}">
<value eval="[ref('stock.stock_location_locations_partner', False)]"/>
<value model="stock.location" eval="{
'name': '往来单位',
}"/>
</function>
<function model="stock.location" name="write" context="{'lang': 'zh_CN'}">
<value eval="[ref('stock.stock_location_locations_virtual', False)]"/>
<value model="stock.location" eval="{
'name': '虚拟区位',
}"/>
</function>
<function model="stock.location" name="write" context="{'lang': 'zh_CN'}">
<value eval="[ref('stock.stock_location_suppliers', False)]"/>
<value model="stock.location" eval="{
'name': '供应商区位',
}"/>
</function>
<function model="stock.location" name="write" context="{'lang': 'zh_CN'}">
<value eval="[ref('stock.stock_location_customers', False)]"/>
<value model="stock.location" eval="{
'name': '客户区位',
}"/>
</function>
<function model="stock.location" name="write" context="{'lang': 'zh_CN'}">
<value eval="[ref('stock.stock_location_inter_wh', False)]"/>
<value model="stock.location" eval="{
'name': '中转区位',
}"/>
</function>
<!-- 几个特殊区位处理-->
<function model="res.company" name="_adjust_wh_cn_name"/>
</data>
</odoo>

View File

@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="partner_demo" model="res.partner">
<field name="name">Demo User</field>
<field name="company_id" ref="main_company"/>
<field name="customer" eval="False"/>
<field name="email">demo@yourcompany.example.com</field>
<field name="company_name">YourCompany</field>
<field name="street">Avenue des Dessus-de-Lives, 2</field>
<field name="city">Namur (Loyers)</field>
<field name="zip">5101</field>
<field name="country_id" ref="be"/>
</record>
<record model="res.partner.bank" id="bank_partner_demo">
<field name="acc_number">60-16-13 31926819</field>
<field name="acc_type">bank</field>
<field name="partner_id" ref="partner_demo" />
</record>
<record id="main_partner" model="res.partner">
<field name="name">YourCompany</field>
<field name="company_name">YourCompany</field>
<field name="street">1725 Slough Ave.</field>
<field name="city">Scranton</field>
<field name="zip">18540</field>
<field name='country_id' ref='base.us'/>
<field name='state_id' ref='state_us_39'/>
<field name="phone">+1 555 123 8069</field>
<field name="email">info@yourcompany.example.com</field>
<field name="website">www.example.com</field>
<field name="image" type="base64" file="base/res/res_company_logo.png"/>
</record>
<record id="main_company" model="res.company">
<field name="name">YourCompany</field>
<field name="external_report_layout">standard</field>
</record>
<record id="user_demo" model="res.users">
<field name="partner_id" ref="base.partner_demo"/>
<field name="login">demo</field>
<field name="password">demo</field>
<field name="signature" type="xml"><span>-- <br/>+Mr Demo</span></field>
<field name="company_id" ref="main_company"/>
<field name="groups_id" eval="[(6,0,[ref('base.group_user'), ref('base.group_partner_manager')])]"/>
<field name="image" type="base64" file="base/static/img/user_demo-image.jpg"/>
</record>
<record model="res.partner" id="base.partner_root">
<field name="company_name">YourCompany</field>
<field name="street">215 Vine St</field>
<field name="city">Scranton</field>
<field name="zip">18503</field>
<field name='country_id' ref='base.us'/>
<field name='state_id' ref='state_us_39'/>
<field name="phone">+1 555-555-5555</field>
<field name="email">admin@yourcompany.example.com</field>
<field name="tz">Europe/Brussels</field>
<field name="image" type="base64" file="base/static/img/partner_root-image.jpg"/>
</record>
<!-- Portal : partner and user -->
<record id="partner_demo_portal" model="res.partner">
<field name="name">Demo Portal User</field>
<field name="email">demo.portal@yourcompany.example.com</field>
<field name="supplier" eval="False"/>
<field name="customer" eval="True"/>
<field name="city">Vivegnis</field>
<field name="zip">4683</field>
<field name="country_id" ref="base.be"/>
<field name="company_name">YourCompany</field>
<field name="street">Rue Cesar de Paepe, 43</field>
</record>
<record id="demo_user0" model="res.users" context="{'no_reset_password': True}">
<field name="partner_id" ref="partner_demo_portal"/>
<field name="login">portal</field>
<field name="password">portal</field>
<field name="signature"><![CDATA[<span>-- <br/>Mr Demo Portal</span>]]></field>
<field name="groups_id" eval="[(5,)]"/><!-- Avoid auto-including this user in any default group -->
</record>
<record id="base.group_portal" model="res.groups"><!-- Add the demo user to the portal (and therefore to the portal member group) -->
<field name="users" eval="[(4,ref('demo_user0'))]"/>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,738 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="product_category_2" model="product.category">
<field name="parent_id" ref="product.product_category_all"/>
<field name="name">Internal</field>
</record>
<record id="product_category_3" model="product.category">
<field name="parent_id" ref="product.product_category_1"/>
<field name="name">Services</field>
</record>
<record id="product_category_4" model="product.category">
<field name="parent_id" ref="product.product_category_1"/>
<field name="name">Software</field>
</record>
<record id="product_category_5" model="product.category">
<field name="parent_id" ref="product_category_1"/>
<field name="name">Physical</field>
</record>
<record id="service_order_01" model="product.product">
<field name="name">Prepaid Consulting</field>
<field name="categ_id" ref="product_category_3"/>
<field name="standard_price">40</field>
<field name="list_price">90</field>
<field name="type">service</field>
<field name="uom_id" ref="product_uom_hour"/>
<field name="uom_po_id" ref="product_uom_hour"/>
<field name="description">Example of product to invoice on order.</field>
<field name="default_code">SERV_ORDER</field>
</record>
<record id="service_delivery" model="product.product">
<field name="name">Cost-plus Contract</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">200.0</field>
<field name="list_price">180.0</field>
<field name="type">service</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="default_code">SERV_DEL</field>
</record>
<record id="service_cost_01" model="product.product">
<field name="name">External Audit</field>
<field name="categ_id" ref="product_category_3"/>
<field name="standard_price">160</field>
<field name="list_price">180</field>
<field name="type">service</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="description">Example of products to invoice based on cost.</field>
<field name="default_code">SERV_COST</field>
</record>
<record id="product_delivery_01" model="product.product">
<field name="name">Switch, 24 ports</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">55.0</field>
<field name="list_price">70.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="default_code">PROD_DEL</field>
</record>
<record id="product_delivery_02" model="product.product">
<field name="name">Datacard</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">35.0</field>
<field name="list_price">40.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="default_code">PROD_DEL02</field>
</record>
<record id="product_order_01" model="product.product">
<field name="name">Zed+ Antivirus</field>
<field name="categ_id" ref="product_category_4"/>
<field name="standard_price">235.0</field>
<field name="list_price">280.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="default_code">PROD_ORDER</field>
</record>
<record id="product_product_1" model="product.product">
<field name="name">GAP Analysis Service</field>
<field name="categ_id" ref="product_category_3"/>
<field name="standard_price">20.5</field>
<field name="list_price">30.75</field>
<field name="type">service</field>
<field name="uom_id" ref="product_uom_hour"/>
<field name="uom_po_id" ref="product_uom_hour"/>
<field name="description">Example of products to invoice based on delivery.</field>
</record>
<record id="product_product_2" model="product.product">
<field name="name">Support Services</field>
<field name="categ_id" ref="product_category_3"/>
<field name="standard_price">25.5</field>
<field name="list_price">38.25</field>
<field name="type">service</field>
<field name="uom_id" ref="product_uom_hour"/>
<field name="uom_po_id" ref="product_uom_hour"/>
<field name="description">Example of product to invoice based on delivery.</field>
</record>
<record id="product_product_3" model="product.product">
<field name="name">Computer SC234</field>
<field name="categ_id" ref="product_category_5"/>
<field name="list_price">450.0</field>
<field name="standard_price">300.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="description_sale">17" LCD Monitor&#xA;Processor AMD 8-Core</field>
<field name="default_code">PCSC234</field>
</record>
<!-- Ecommerce Variants and Products -->
<record id="product_attribute_1" model="product.attribute">
<field name="name">Memory</field>
</record>
<record id="product_attribute_value_1" model="product.attribute.value">
<field name="name">16 GB</field>
<field name="attribute_id" ref="product_attribute_1"/>
</record>
<record id="product_attribute_value_2" model="product.attribute.value">
<field name="name">32 GB</field>
<field name="attribute_id" ref="product_attribute_1"/>
</record>
<record id="product_attribute_2" model="product.attribute">
<field name="name">Color</field>
</record>
<record id="product_attribute_value_3" model="product.attribute.value">
<field name="name">White</field>
<field name="attribute_id" ref="product_attribute_2"/>
</record>
<record id="product_attribute_value_4" model="product.attribute.value">
<field name="name">Black</field>
<field name="attribute_id" ref="product_attribute_2"/>
</record>
<record id="product_attribute_3" model="product.attribute">
<field name="name">Wi-Fi</field>
</record>
<record id="product_attribute_value_5" model="product.attribute.value">
<field name="name">2.4 GHz</field>
<field name="attribute_id" ref="product_attribute_3"/>
</record>
<record id="product_product_4" model="product.product">
<field name="name">iPad Retina Display</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">500.0</field>
<field name="list_price">750.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="description_sale">7.9inch (diagonal) LED-backlit, 128Gb&#xA;Dual-core A5 with quad-core graphics&#xA;FaceTime HD Camera, 1.2 MP Photos</field>
<field name="default_code">E-COM01</field>
<field name="attribute_value_ids" eval="[(6,0,[ref('product.product_attribute_value_1'), ref('product.product_attribute_value_3')])]"/>
</record>
<record id="product_product_4b" model="product.product">
<field name="default_code">E-COM02</field>
<field name="product_tmpl_id" ref="product_product_4_product_template"/>
<field name="attribute_value_ids" eval="[(6,0,[ref('product.product_attribute_value_1'), ref('product.product_attribute_value_4')])]"/>
</record>
<record id="product_product_4c" model="product.product">
<field name="default_code">E-COM03</field>
<field name="product_tmpl_id" ref="product_product_4_product_template"/>
<field name="attribute_value_ids" eval="[(6,0,[ref('product.product_attribute_value_2'), ref('product.product_attribute_value_3')])]"/>
</record>
<record id="product_product_4d" model="product.product">
<field name="default_code">E-COM04</field>
<field name="product_tmpl_id" ref="product_product_4_product_template"/>
<field name="attribute_value_ids" eval="[(6,0,[ref('product.product_attribute_value_2'), ref('product.product_attribute_value_4')])]"/>
</record>
<record id="product_attribute_line_1" model="product.attribute.line">
<field name="product_tmpl_id" ref="product_product_4_product_template"/>
<field name="attribute_id" ref="product_attribute_1"/>
<field name="value_ids" eval="[(6,0,[ref('product.product_attribute_value_1'), ref('product.product_attribute_value_2')])]"/>
</record>
<record id="product_attribute_line_2" model="product.attribute.line">
<field name="product_tmpl_id" ref="product_product_4_product_template"/>
<field name="attribute_id" ref="product_attribute_2"/>
<field name="value_ids" eval="[(6,0,[ref('product.product_attribute_value_3'), ref('product.product_attribute_value_4')])]"/>
</record>
<record id="product_attribute_line_3" model="product.attribute.line">
<field name="product_tmpl_id" ref="product_product_4_product_template"/>
<field name="attribute_id" ref="product_attribute_3"/>
<field name="value_ids" eval="[(6,0,[ref('product.product_attribute_value_5')])]"/>
</record>
<record id="product_product_4_product_template" model="product.template">
<field name="attribute_line_ids" eval="[(6,0,[ref('product.product_attribute_line_1'), ref('product.product_attribute_line_2'), ref('product.product_attribute_line_3')])]"/>
</record>
<record id="product_product_4d" model="product.product">
<field name="active" eval="False"/>
</record>
<record id="product_attribute_price_1" model="product.attribute.price">
<field name="product_tmpl_id" ref="product_product_4_product_template"/>
<field name="value_id" ref="product_attribute_value_2"/>
<field name="price_extra">50.40</field>
</record>
<record id="product_product_5b" model="product.product">
<field name="name">Bose Mini Bluetooth Speaker</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">140.0</field>
<field name="list_price">247.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="description_sale">Bose's smallest portable Bluetooth speaker</field>
<field name="default_code">E-COM05</field>
</record>
<record id="product_product_5" model="product.product">
<field name="name">Custom Computer (kit)</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">600.0</field>
<field name="list_price">147.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="description">Custom computer shipped in kit.</field>
<field name="default_code">E-COM06</field>
</record>
<record id="product_product_5c" model="product.product">
<field name="name">Parts Replacement</field>
<field name="categ_id" ref="product_category_3"/>
<field name="standard_price">600.0</field>
<field name="list_price">147.0</field>
<field name="type">service</field>
</record>
<record id="product_product_6" model="product.product">
<field name="name">iPad Mini</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">800.0</field>
<field name="list_price">320.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="default_code">E-COM07</field>
<field name='weight'>0.330</field>
</record>
<record id="product_product_6c" model="product.product">
<field name="name">Repair</field>
<field name="categ_id" ref="product_category_3"/>
<field name="standard_price">800.0</field>
<field name="list_price">320.0</field>
<field name="type">service</field>
</record>
<record id="product_product_7" model="product.product">
<field name="name">Apple In-Ear Headphones</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">70.0</field>
<field name="list_price">79.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="default_code">E-COM08</field>
</record>
<record id="product_product_8" model="product.product">
<field name="name">iMac</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">1299.0</field>
<field name="list_price">1799.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="default_code">E-COM09</field>
<field name='weight'>9.54</field>
</record>
<record id="product_product_9" model="product.product">
<field name="name">Apple Wireless Keyboard</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">10.0</field>
<field name="list_price">47.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="default_code">E-COM10</field>
</record>
<record id="product_product_10" model="product.product">
<field name="name">Mouse, Optical</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">12.50</field>
<field name="list_price">14</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="default_code">E-COM11</field>
</record>
<record id="product_product_11" model="product.product">
<field name="name">iPod</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">14</field>
<field name="list_price">16.50</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="default_code">E-COM12</field>
<field name="attribute_value_ids" eval="[(6,0,[ref('product.product_attribute_value_1')])]"/>
</record>
<record id="product_product_11b" model="product.product">
<field name="default_code">E-COM13</field>
<field name="product_tmpl_id" ref="product_product_11_product_template"/>
<field name="attribute_value_ids" eval="[(6,0,[ref('product.product_attribute_value_2')])]"/>
</record>
<record id="product_product_11c" model="product.product">
<field name="name">Cleaning</field>
<field name="categ_id" ref="product_category_3"/>
<field name="standard_price">14</field>
<field name="list_price">16.50</field>
<field name="type">service</field>
</record>
<record id="product_attribute_line_4" model="product.attribute.line">
<field name="product_tmpl_id" ref="product_product_11_product_template"/>
<field name="attribute_id" ref="product_attribute_1"/>
<field name="value_ids" eval="[(6,0,[ref('product.product_attribute_value_1'), ref('product.product_attribute_value_2')])]"/>
</record>
<record id="product_product_11_product_template" model="product.template">
<field name="attribute_line_ids" eval="[(6,0,[ref('product.product_attribute_line_4')])]"/>
</record>
<record id="product_attribute_price_2" model="product.attribute.price">
<field name="product_tmpl_id" ref="product_product_11_product_template"/>
<field name="value_id" ref="product_attribute_value_2"/>
<field name="price_extra">6.40</field>
</record>
<!-- MRP Demo Data-->
<record id="product_product_12" model="product.product">
<field name="name">Mouse, Wireless</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">18</field>
<field name="list_price">12.50</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="default_code">M-Wir</field>
</record>
<record id="product_product_13" model="product.product">
<field name="name">RAM SR5</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">78.0</field>
<field name="list_price">85.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="default_code">RAM-SR5</field>
</record>
<record id="product_product_16" model="product.product">
<field name="name">Computer Case</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">20.0</field>
<field name="list_price">25.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="default_code">C-Case</field>
</record>
<record id="product_product_17" model="product.product">
<field name="name">HDD SH-1</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">860.0</field>
<field name="list_price">975.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="default_code">HDD-SH1</field>
</record>
<record id="product_product_20" model="product.product">
<field name="name">Motherboard I9P57</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">1700.0</field>
<field name="list_price">1950.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="default_code">MBi9</field>
</record>
<record id="product_product_22" model="product.product">
<field name="name">Processor Core i5 2.70 Ghz</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">2010.0</field>
<field name="list_price">2100.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="default_code">CPUi5</field>
</record>
<record id="product_product_24" model="product.product">
<field name="name">Graphics Card</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">876.0</field>
<field name="list_price">885.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="default_code">CARD</field>
</record>
<record id="product_product_25" model="product.product">
<field name="name">Laptop E5023</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">2870.0</field>
<field name="list_price">2950.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="description">17" Monitor, 4GB RAM&#xA;Standard-1294P Processor</field>
<field name="default_code">LAP-E5</field>
</record>
<record id="product_product_27" model="product.product">
<field name="name">Laptop Customized</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">3300.0</field>
<field name="list_price">3645.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="description">Custom Laptop based on customer's requirement.</field>
<field name="default_code">LAP-CUS</field>
</record>
<record id="consu_delivery_03" model="product.product">
<field name="name">Basic Computer</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">25000.0</field>
<field name="list_price">23500.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="description_sale">Dvorak keyboard&#xA;left-handed mouse</field>
<field name="default_code">CONS_DEL03</field>
</record>
<record id="consu_delivery_02" model="product.product">
<field name="name">Little server</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">45000.0</field>
<field name="list_price">40000.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="description_sale">raid 1, 512ECC ram</field>
<field name="default_code">CONS_DEL02</field>
</record>
<record id="consu_delivery_01" model="product.product">
<field name="name">Server</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">65000.0</field>
<field name="list_price">60000.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="description_sale">raid 10, 2048ECC ram</field>
<field name="default_code">CONS_DEL01</field>
</record>
<!-- Membership products -->
<record id="membership_0" model="product.product">
<field name="name">Gold Membership</field>
<field name="list_price">180</field>
<field name="categ_id" ref="product.product_category_1"/>
<field name="type">service</field>
<field name="active" eval="False"/>
</record>
<record id="membership_1" model="product.product">
<field name="name">Silver Membership</field>
<field name="categ_id" ref="product.product_category_1"/>
<field name="list_price">80</field>
<field name="type">service</field>
<field name="active" eval="False"/>
</record>
<record id="membership_2" model="product.product">
<field name="name">Basic Membership</field>
<field name="categ_id" ref="product.product_category_1"/>
<field name="list_price">40</field>
<field name="type">service</field>
<field name="active" eval="False"/>
</record>
<!--
Resource: product.supplierinfo
-->
<record id="product_supplierinfo_1" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_6_product_template"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
<field name="price">750</field>
</record>
<record id="product_supplierinfo_2" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_6_product_template"/>
<field name="name" ref="base.res_partner_4"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
<field name="price">790</field>
</record>
<record id="product_supplierinfo_2bis" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_6_product_template"/>
<field name="name" ref="base.res_partner_4"/>
<field name="delay">3</field>
<field name="min_qty">3</field>
<field name="price">785</field>
</record>
<record id="product_supplierinfo_3" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_7_product_template"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
<field name="price">65</field>
</record>
<record id="product_supplierinfo_4" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_7_product_template"/>
<field name="name" ref="base.res_partner_4"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
<field name="price">72</field>
</record>
<record id="product_supplierinfo_5" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_8_product_template"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">2</field>
<field name="min_qty">5</field>
<field name="price">1299</field>
</record>
<record id="product_supplierinfo_6" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_8_product_template"/>
<field name="name" ref="base.res_partner_12"/>
<field name="delay">4</field>
<field name="min_qty">1</field>
<field name="price">1399</field>
</record>
<record id="product_supplierinfo_7" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_10_product_template"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">2</field>
<field name="min_qty">1</field>
<field name="price">12.50</field>
</record>
<record id="product_supplierinfo_8" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_11_product_template"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">2</field>
<field name="min_qty">1</field>
<field name="price">14</field>
</record>
<record id="product_supplierinfo_9" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_13_product_template"/>
<field name="name" ref="base.res_partner_4"/>
<field name="delay">5</field>
<field name="min_qty">1</field>
<field name="price">78</field>
</record>
<record id="product_supplierinfo_10" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_16_product_template"/>
<field name="name" ref="base.res_partner_3"/>
<field name="delay">1</field>
<field name="min_qty">1</field>
<field name="price">20</field>
</record>
<record id="product_supplierinfo_11" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_17_product_template"/>
<field name="name" ref="base.res_partner_2"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
<field name="price">860</field>
</record>
<record id="product_supplierinfo_12" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_20_product_template"/>
<field name="name" ref="base.res_partner_4"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
<field name="price">1700</field>
</record>
<record id="product_supplierinfo_13" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_20_product_template"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">4</field>
<field name="min_qty">5</field>
<field name="price">1720</field>
</record>
<record id="product_supplierinfo_14" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_22_product_template"/>
<field name="name" ref="base.res_partner_2"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
<field name="price">2010</field>
</record>
<record id="product_supplierinfo_15" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_24_product_template"/>
<field name="name" ref="base.res_partner_2"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
<field name="price">876</field>
</record>
<record id="product_supplierinfo_16" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_25_product_template"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">8</field>
<field name="min_qty">1</field>
<field name="price">2870</field>
</record>
<record id="product_supplierinfo_17" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_delivery_02_product_template"/>
<field name="name" ref="base.res_partner_2"/>
<field name="delay">4</field>
<field name="min_qty">1</field>
<field name="price">390</field>
</record>
<record id="product_supplierinfo_18" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_delivery_01_product_template"/>
<field name="name" ref="base.res_partner_3"/>
<field name="delay">2</field>
<field name="min_qty">12</field>
<field name="price">90</field>
</record>
<record id="product_supplierinfo_19" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_delivery_01_product_template"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">4</field>
<field name="min_qty">1</field>
<field name="price">66</field>
</record>
<record id="product_supplierinfo_20" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_delivery_02_product_template"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">5</field>
<field name="min_qty">1</field>
<field name="price">35</field>
</record>
<record id="product_supplierinfo_21" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_delivery_01_product_template"/>
<field name="name" ref="base.res_partner_12"/>
<field name="delay">7</field>
<field name="min_qty">1</field>
<field name="price">55</field>
</record>
<record id="product_supplierinfo_22" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_9_product_template"/>
<field name="name" ref="base.res_partner_12"/>
<field name="delay">4</field>
<field name="min_qty">0</field>
<field name="price">10</field>
</record>
<record id="product_supplierinfo_23" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_27_product_template"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">10</field>
<field name="min_qty">0</field>
<field name="price">3300</field>
</record>
<record id="product_supplierinfo_24" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_12_product_template"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">3</field>
<field name="min_qty">0</field>
<field name="price">12.50</field>
</record>
<record id="product_supplierinfo_25" model="product.supplierinfo">
<field name="product_tmpl_id" ref="product_product_12_product_template"/>
<field name="name" ref="base.res_partner_4"/>
<field name="delay">2</field>
<field name="min_qty">0</field>
<field name="price">13.50</field>
</record>
<record forcecreate="True" id="property_product_pricelist_demo" model="ir.property">
<field name="name">property_product_pricelist</field>
<field name="fields_id" search="[('model','=','res.partner'),('name','=','property_product_pricelist')]"/>
<field name="value" eval="'product.pricelist,'+str(ref('list0'))"/>
<field name="res_id" eval="'res.partner,'+str(ref('base.partner_demo'))"/>
<field name="company_id" ref="base.main_company"/>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="false">
<record id="product_product_1" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_1-image.jpg"/>
</record>
<record id="product_product_2" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_2-image.jpg"/>
</record>
<record id="product_product_3" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_3-image.jpg"/>
</record>
<record id="product_product_4" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_4-image.png"/>
</record>
<record id="product_product_5" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_5-image.jpg"/>
</record>
<record id="product_product_5b" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_5-image.png"/>
</record>
<record id="product_product_6" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_6-image.png"/>
</record>
<record id="product_product_7" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_7-image.png"/>
</record>
<record id="product_product_8" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_8-image.png"/>
</record>
<record id="product_product_9" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_9-image.png"/>
</record>
<record id="product_product_10" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_10-image.jpg"/>
</record>
<record id="product_product_11" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_11-image.png"/>
</record>
<record id="product_product_12" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_12-image.jpg"/>
</record>
<record id="product_product_13" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_13-image.jpg"/>
</record>
<record id="product_product_16" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_16-image.jpg"/>
</record>
<record id="product_product_17" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_17-image.jpg"/>
</record>
<record id="product_product_20" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_20-image.jpg"/>
</record>
<record id="product_product_22" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_22-image.jpg"/>
</record>
<record id="product_product_24" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_24-image.jpg"/>
</record>
<record id="product_product_25" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_25-image.jpg"/>
</record>
<record id="product_product_27" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_27-image.jpg"/>
</record>
<record id="product_order_01" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_43-image.jpg"/>
</record>
<record id="product_delivery_02" model="product.product">
<field name="image" type="base64" file="product/static/img/product_product_46-image.jpg"/>
</record>
<record id="membership_0" model="product.product">
<field name="image" type="base64" file="product/static/img/membership_0-image.jpg"/>
</record>
<record id="membership_1" model="product.product">
<field name="image" type="base64" file="product/static/img/membership_1-image.jpg"/>
</record>
<record id="membership_2" model="product.product">
<field name="image" type="base64" file="product/static/img/membership_2-image.jpg"/>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record model="res.bank" id="bank_ing">
<field name="name">ING</field>
<field name="bic">BBRUBEBB</field>
</record>
<record model="res.bank" id="bank_crelan">
<field name="name">Crelan</field>
<field name="bic">NICABEBB</field>
</record>
<record model="res.bank" id="bank_cbc">
<field name="name">CBC</field>
<field name="bic">CREGBEBB</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="main_company" model="res.company">
<field name="name">odooAi欧度智能</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- todo: 只处理主partern后续处理其它-->
<record id="base.main_partner" model="res.partner">
<field name="email">info@odooai.cn</field>
<field name="website">www.odooai.cn</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,98 @@
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<data noupdate="1">
<record id="base.res_partner_address_1" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_1-image.png"/>
</record>
<record id="base.res_partner_address_2" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_2-image.png"/>
</record>
<record id="base.res_partner_address_4" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_4-image.png"/>
</record>
<record id="base.res_partner_address_5" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_5-image.png"/>
</record>
<record id="base.res_partner_address_7" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_7-image.png"/>
</record>
<record id="base.res_partner_address_10" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_10-image.png"/>
</record>
<record id="base.res_partner_address_11" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_11-image.png"/>
</record>
<record id="base.res_partner_address_13" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_13-image.png"/>
</record>
<record id="base.res_partner_address_14" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_14-image.png"/>
</record>
<record id="base.res_partner_address_15" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_15-image.png"/>
</record>
<record id="base.res_partner_address_16" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_16-image.png"/>
</record>
<record id="base.res_partner_address_17" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_17-image.png"/>
</record>
<record id="base.res_partner_address_18" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_18-image.png"/>
</record>
<record id="base.res_partner_address_24" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_24-image.png"/>
</record>
<record id="base.res_partner_address_25" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_25-image.png"/>
</record>
<record id="base.res_partner_address_27" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_27-image.png"/>
</record>
<record id="base.res_partner_address_28" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_28-image.png"/>
</record>
<record id="base.res_partner_address_30" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_30-image.png"/>
</record>
<record id="base.res_partner_address_32" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_32-image.png"/>
</record>
<record id="base.res_partner_address_33" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_33-image.png"/>
</record>
<record id="base.res_partner_address_34" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_address_34-image.png"/>
</record>
<record id="base.res_partner_main1" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_main1-image.png"/>
</record>
<record id="base.res_partner_main2" model="res.partner">
<field name="image" type="base64" file="base/static/img/res_partner_main2-image.png"/>
</record>
</data>
</odoo>

71
app_base_chinese/hooks.py Normal file
View File

@@ -0,0 +1,71 @@
# -*- coding: utf-8 -*-
# Created on 2017-11-22
# author: 欧度智能https://www.odooai.cn
# email: 300883@qq.com
# resource of odooai
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册长期更新
# https://www.odooai.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# https://www.odooai.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# https://www.odooai.cn/odoo10_developer_document_offline/
# description:
from odoo import api, SUPERUSER_ID, _
def pre_init_hook(cr):
"""
数据初始化,只在安装时执行,更新时不执行
"""
# todo: 启用中文
pass
def post_init_hook(cr, registry):
"""
数据初始化,只在安装后执行,更新时不执行
"""
try:
env = api.Environment(cr, SUPERUSER_ID, {'active_test': False})
ids = env['product.category'].sudo().with_context(lang='zh_CN').search([
('parent_id', '!=', False)
], order='parent_path')
for rec in ids:
rec._compute_complete_name()
ids = env['stock.location'].sudo().with_context(lang='zh_CN').search([
('location_id', '!=', False),
('usage', '!=', 'views'),
], order='parent_path')
for rec in ids:
rec._compute_complete_name()
# 超级用户及模板用户改时区为中国
ids = env['res.users'].sudo().with_context(lang='zh_CN').browse([1,2,3,4,5])
# rec_extra = env.ref('base.template_portal_user_id')
# if rec_extra:
# ids += rec_extra
ids.write({
'tz': "Etc/GMT-8",
'lang': "zh_CN",
})
# 公司价格改人民币
env = api.Environment(cr, SUPERUSER_ID, {'active_test': True})
ids = env['res.company'].sudo().search([], limit=1)
if ids:
ids.write({'currency_id': env.ref('base.CNY').id})
# 价格表改人民币
ids = env['product.pricelist'].sudo().search([], limit=1)
if ids:
ids.write({'currency_id': env.ref('base.CNY').id})
except Exception as e:
raise Warning(e)
def uninstall_hook(cr, registry):
"""
数据初始化,卸载时执行
"""
pass

View File

@@ -0,0 +1,128 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * app_base_chinese
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0+e-20221228\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-02-14 08:50+0000\n"
"PO-Revision-Date: 2023-02-14 08:50+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_base_chinese
#: model:ir.model.fields,field_description:app_base_chinese.field_account_tax_group__active
msgid "Active"
msgstr "激活"
#. module: app_base_chinese
#: model:ir.model,name:app_base_chinese.model_res_company
msgid "Companies"
msgstr "公司"
#. module: app_base_chinese
#: model:ir.model,name:app_base_chinese.model_res_partner
msgid "Contact"
msgstr "联系人"
#. module: app_base_chinese
#: model_terms:ir.ui.view,arch_db:app_base_chinese.app_res_partner_kanban_view
msgid "Credit"
msgstr "信用额:"
#. module: app_base_chinese
#: model:ir.model,name:app_base_chinese.model_res_currency
msgid "Currency"
msgstr "币种"
#. module: app_base_chinese
#: model:ir.model.fields,help:app_base_chinese.field_res_currency__sequence
msgid "Determine the display order. Sort ascending."
msgstr "决定显示顺序,数字越小排序越前"
#. module: app_base_chinese
#: model_terms:ir.ui.view,arch_db:app_base_chinese.app_view_sale_advance_payment_inv
msgid "FaPiao / Invoice Orders"
msgstr "创建收据/发票"
#. module: app_base_chinese
#: model:ir.model.fields,field_description:app_base_chinese.field_res_partner__fax
#: model:ir.model.fields,field_description:app_base_chinese.field_res_users__fax
msgid "Fax"
msgstr "传真"
#. module: app_base_chinese
#: model:ir.model.fields,field_description:app_base_chinese.field_stock_location__complete_name
msgid "Full Location Name"
msgstr "完整的位置名称"
#. module: app_base_chinese
#: model:ir.model,name:app_base_chinese.model_stock_location
msgid "Inventory Locations"
msgstr "库存位置"
#. module: app_base_chinese
#: model_terms:ir.ui.view,arch_db:app_base_chinese.app_view_order_form
msgid "Invoices/FaPiao"
msgstr "收据/发票"
#. module: app_base_chinese
#: model_terms:ir.ui.view,arch_db:app_base_chinese.app_view_order_form
msgid "Make Collections"
msgstr "收款"
#. module: app_base_chinese
#: model:ir.model.fields,field_description:app_base_chinese.field_res_partner__name
#: model:ir.model.fields,field_description:app_base_chinese.field_res_users__name
msgid "Name"
msgstr "名称"
#. module: app_base_chinese
#: model_terms:ir.ui.view,arch_db:app_base_chinese.app_view_move_form
msgid "Post Entry"
msgstr "过帐"
#. module: app_base_chinese
#: model:ir.model,name:app_base_chinese.model_product_category
msgid "Product Category"
msgstr "品类"
#. module: app_base_chinese
#: model:ir.model.fields,field_description:app_base_chinese.field_res_currency__sequence
msgid "Sequence"
msgstr "排序"
#. module: app_base_chinese
#: model:ir.model.fields,help:app_base_chinese.field_account_tax_group__active
msgid "Set active to false to hide the tax without removing it."
msgstr "请不要删除指定税率,可以将其归档。"
#. module: app_base_chinese
#: model:ir.model.fields,field_description:app_base_chinese.field_res_partner__short_name
#: model:ir.model.fields,field_description:app_base_chinese.field_res_users__short_name
msgid "Short Name"
msgstr "简称"
#. module: app_base_chinese
#: model:ir.model,name:app_base_chinese.model_account_tax_group
msgid "Tax Group"
msgstr "税组"
#. module: app_base_chinese
#. odoo-javascript
#: code:addons/app_base_chinese/static/src/xml/views.xml:0
#, python-format
msgid "性能原因,只支持 200 条记录的显示"
msgstr ""
#. module: app_base_chinese
#. odoo-javascript
#: code:addons/app_base_chinese/static/src/xml/views.xml:0
#, python-format
msgid "记录没有树状结构"
msgstr ""

View File

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

View File

@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
from . import res_company
from . import res_partner
from . import res_currency
from . import product_category
from . import stock_location
from . import account_tax_group
from . import ir_module_module

View File

@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
from odoo import api, fields, models, _, tools
class AccountTaxGroup(models.Model):
_inherit = 'account.tax.group'
active = fields.Boolean(default=True, help="Set active to false to hide the tax without removing it.")

View File

@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
import logging
import lxml.html
from odoo import api, fields, models, modules, tools, _
_logger = logging.getLogger(__name__)
class Module(models.Model):
_inherit = "ir.module.module"
description_html_cn = fields.Html('Description HTML CN', compute='_get_desc_cn')
@api.depends('name', 'description')
def _get_desc_cn(self):
for module in self:
module_path = modules.get_module_path(module.name, display_warning=False) # avoid to log warning for fake community module
if module_path:
path = modules.check_resource_path(module_path, 'static/description/index_cn.html')
else:
module.description_html_cn = False
if module_path and path:
# 注意: b 不能在 mode中才能使用 utf-8
with tools.file_open(path, 'r') as desc_file:
doc = desc_file.read()
html = lxml.html.document_fromstring(doc)
for element, attribute, link, pos in html.iterlinks():
if element.get('src') and not '//' in element.get('src') and not 'static/' in element.get('src'):
element.set('src', "/%s/static/description/%s" % (module.name, element.get('src')))
module.description_html_cn = tools.html_sanitize(lxml.html.tostring(html))
else:
module.description_html_cn = False

View File

@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
import logging
from odoo import api, fields, models, _
_logger = logging.getLogger(__name__)
class ProductCategory(models.Model):
_inherit = "product.category"

View File

@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
from odoo import api, models, fields, _
from odoo.exceptions import UserError, ValidationError
class ResCompany(models.Model):
_inherit = 'res.company'
@api.model
def _adjust_wh_cn_name(self):
companys = self.env['res.company'].with_context(active_test=False, lang='zh_CN').search([])
for rec in companys:
# 修正区位名称
ids = self.env['stock.location'].with_context(active_test=False).search(
[('name', 'like', ': Transit Location'), ('company_id', '=', rec.id)])
ids.with_context(lang='zh_CN').write({'name': '%s:中转区位' % rec.name})
ids = self.env['stock.location'].with_context(active_test=False).search(
[('name', 'like', ': Scrap'), ('company_id', '=', rec.id)])
ids.with_context(lang='zh_CN').write({'name': '%s:报废区位' % rec.name})
ids = self.env['stock.location'].with_context(active_test=False).search(
[('name', 'like', ': Inventory adjustment'), ('company_id', '=', rec.id)])
ids.with_context(lang='zh_CN').write({'name': '%s:盘点区位' % rec.name})
# 注意,原生没有在生产中使用 _
ids = self.env['stock.location'].with_context(active_test=False).search([
('name', 'like', ': Production'), ('company_id', '=', rec.id)])
ids.with_context(lang='zh_CN').write({'name': '%s:生产区位' % rec.name})
ids = self.env['stock.location'].with_context(active_test=False).search([
('name', 'like', ': Subcontracting Location'), ('company_id', '=', rec.id)])
ids.with_context(lang='zh_CN').write({'name': '%s:委外区位' % rec.name})

View File

@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class Country(models.Model):
_inherit = 'res.country'
_order = 'sequence,name'
sequence = fields.Integer('Sequence', help="Determine the display order", default=99)

View File

@@ -0,0 +1,53 @@
# -*- coding: utf-8 -*-
from odoo import api, fields, models
class ResCurrency(models.Model):
_inherit = 'res.currency'
_order = 'active desc, sequence, name'
sequence = fields.Integer('Sequence', default=10, help="Determine the display order. Sort ascending.")
def rmb_upper(self, value):
"""
人民币大写
传入浮点类型的值返回 unicode 字符串
:param 传入阿拉伯数字
:return 返回值是对应阿拉伯数字的绝对值的中文数字
"""
if self.name != 'CNY':
return
rmbmap = [u"", u"", u"", u"", u"", u"", u"", u"", u"", u""]
unit = [u"", u"", u"", u"", u"", u"", u"", u"", u"", u"", u"亿",
u"", u"", u"", u"", u"", u"", u"", u""]
# 冲红负数处理
xflag = 0
if value < 0:
xflag = value
value = abs(value)
# 先把value 数字进行格式化保留两位小数,转成字符串然后去除小数点
nums = list(map(int, list(str('%0.2f' % value).replace('.', ''))))
words = []
zflag = 0 # 标记连续0次数以删除万字或适时插入零字
start = len(nums) - 3
for i in range(start, -3, -1): # 使i对应实际位数负数为角分
# 大部分情况对应数字不等于零 或者是刚开始循环
if 0 != nums[start - i] or len(words) == 0:
if zflag:
words.append(rmbmap[0])
zflag = 0
words.append(rmbmap[nums[start - i]]) # 数字对应的中文字符
words.append(unit[i + 2]) # 列表此位置的单位
# 控制‘万/元’ 万和元比较特殊如2拾万和2拾1万 无论有没有这个1 万字是必须的
elif 0 == i or (0 == i % 4 and zflag < 3):
# 上面那种情况定义了 2拾1万 的显示 这个是特殊对待的 2拾万一类的显示
words.append(unit[i + 2])
# 元(控制条件为 0 == i )和万(控制条为(0 == i % 4 and zflag < 3))的情况的处理是一样的
zflag = 0
else:
zflag += 1
if words[-1] != unit[0]: # 结尾非‘分’补整字 最小单位 如果最后一个字符不是最小单位(分)则要加一个整字
words.append(u"")
if xflag < 0: # 如果为负数则要在数字前面加上‘负’字
words.insert(0, u"")
return ''.join(words)

View File

@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
from odoo import api, models, fields, _
from odoo.exceptions import UserError, ValidationError
class ResPartner(models.Model):
_inherit = 'res.partner'
name = fields.Char(translate=False)
short_name = fields.Char('Short Name') # 简称
fax = fields.Char('Fax') # 简称
# 增加地址显示中的手机号与电话号码
# 选项 show_address 开启则增加显示手机与电话号
def _get_name(self):
name = super(ResPartner, self)._get_name()
partner = self
if self._context.get('show_address'):
if partner.mobile and partner.phone:
name = name + "\n" + partner.mobile + "," + partner.phone
elif partner.mobile:
name = name + "\n" + partner.mobile
elif partner.phone:
name = name + "\n" + partner.phone
return name.strip()
@api.model_create_multi
def create(self, vals_list):
for values in vals_list:
if 'lang' not in values:
values['lang'] = 'zh_CN'
return super(ResPartner, self).create(vals_list)

View File

@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
import logging
from odoo import api, fields, models, _
_logger = logging.getLogger(__name__)
class Location(models.Model):
_inherit = "stock.location"
complete_name = fields.Char(translate=True)

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

View File

@@ -0,0 +1,156 @@
<section class="oe_container container">
<div class="oe_row oe_spaced" >
<div class="row">
<h2 class="oe_slogan">Chinese Enhance All in One。 Local customize for china user </h2>
<h3 class="oe_slogan">20+ chinese setting enhance.</h3>
<div class="oe_row">
<h3>Latest update: v16.23.08.02</h3>
<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>
1. Chinese address format, applicable to all Chinese customers, suppliers, partners, users, employee information etc.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
2. Default values in Chinese such as country, time zone and currency. Processing module base, product.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
3. Add customer abbreviation and display addresses in Chinese; prioritize displaying customer codes.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
4. Display phone numbers along with mobile numbers for customer addresses.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
5. Currency processing with added sorting display.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
6. Fixed bug where the category list and m2o field did not display the name of the Chinese directory.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
7. Fixed bug where warehouse location list and m2o field did not display the name of the Chinese directory.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
8. Superuser changed time zone to China.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
9. Date format is year-month-day (e.g., 2023-08-08) and time is 12:34
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
10.Country sorting added; China ranked first
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
11.Display payment-related information according to typical practices in China.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
12.Default export translation is set to Mandarin (po).
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
13.Added 'name_en_US' field in base model which updates translation value when assigned a value.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
14.Common decimal precision adjustments made.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
15.Sales team changed to "China".
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
21. Multi-language Support. Multi-Company Support.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
22. Support Odoo 17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
23. Full Open Source..
</li>
</ul>
</div>
</div>
<div class="row">
<img class="oe_demo oe_screenshot img img-fluid" src="cnreadme.png">
</div>
</div>
</div>
</div>
</section>
<section class="oe_container container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Set the address format to chinese. Including all customer, supplier, users</h4>
<div class="oe_demo oe_screenshot img img-fluid">
<img src="demo1.jpg">
</div>
</div>
</section>
<section class="oe_container container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Set Default country, state, timezone, currency.</h4>
<div class="oe_demo oe_screenshot img img-fluid">
<img src="demo2.jpg">
</div>
</div>
</section>
<section class="oe_container container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Fix Category Display not in english bug.</h4>
<div class="oe_demo oe_screenshot img img-fluid">
<img src="demo3.jpg">
</div>
</div>
</section>
<section class="container oe_dark">
<div class="oe_row oe_spaced text-center">
<div class="row">
<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:odoo@china.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> odoo@china.com</a>
<p><h4>
Via QQ: 300883 (App user would not get QQ or any other IM support. Only for odoo project customize.)</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:300883@qq.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> 300883@qq.com</a>
</div>
<div class="oe_mt16">
<h4>
Visit our website for more support.</h4>
<h4>https://www.odooai.cn</h4>
</div>
</div>
</div>
<div class="oe_row oe_spaced text-center">
<h2>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=odooai.cn">odooai.cn Odoo Addons</a>
</h2>
</div>
</section>

View File

@@ -0,0 +1,67 @@
<t>
<t t-call="master_input" />
<div class="row mb-3">
<label for="dbname" class="col-md-4 col-form-label">Database Name</label>
<div class="col-md-8">
<input id="dbname" type="text" name="name" class="form-control" required="required" autocomplete="off" t-att-pattern="pattern" title="Only alphanumerical characters, underscore, hyphen and dot are allowed"/>
</div>
</div>
<div class="row mb-3">
<label for="login" class="col-md-4 col-form-label">Email</label>
<div class="col-md-8">
<input id="login" type="text" name="login" class="form-control" required="required" autocomplete="off"/>
</div>
</div>
<div class="row mb-3">
<label for="password" class="col-md-4 col-form-label">Password</label>
<div class="col-md-8">
<div class="input-group">
<input id="password" type="password" name="password" class="form-control" required="required" autocomplete="off"/>
<span class="fa fa-eye o_little_eye input-group-text" aria-hidden="true" style="cursor: pointer;"></span>
</div>
</div>
</div>
<div class="row mb-3">
<label for="phone" class="col-md-4 col-form-label">Phone number</label>
<div class="col-md-8">
<input id="phone" type="tel" name="phone" class="form-control" autocomplete="off"/>
</div>
</div>
<div class="row mb-3">
<label for="lang" class="col-md-4 col-form-label">Language</label>
<div class="col-md-8">
<select id="lang" name="lang" class="form-select" required="required" autocomplete="off">
<t t-foreach="langs" t-as="lang">
<t t-if="lang[0] == 'zh_CN'">
<option t-att-value="lang[0]" t-out="lang[1]" selected="selected"/>
</t>
<t t-else="">
<option t-att-value="lang[0]" t-out="lang[1]"/>
</t>
</t>
</select>
</div>
</div>
<div class="row mb-3">
<label for="country" class="col-md-4 col-form-label ">Country</label>
<div class="col-md-8">
<select id="country" name="country_code" class="form-select" autocomplete="off">
<option value=""></option>
<t t-foreach="countries" t-as="country">
<t t-if="country[0] == 'cn'">
<option t-att-value="country[0]" t-out="country[1]" selected="selected"/>
</t>
<t t-else="">
<option t-att-value="country[0]" t-out="country[1]"/>
</t>
</t>
</select>
</div>
</div>
<div class="row mb-3">
<label for="load_demo_checkbox" class="col-md-4 col-form-label">Demo data</label>
<div class="col-md-8">
<input type="checkbox" id="load_demo_checkbox" class="form-control-sm" name="demo" value="1" />
</div>
</div>
</t>

View File

@@ -0,0 +1,39 @@
//必须有 form ,故要特殊处理样式
.o_form_view.o_form_nosheet.o_form_address_chinese, .o_form_view .o_form_nosheet.o_form_address_chinese {
padding: 0 0 0 0;
}
.o_form_view .o_address_format.o_address_chinese {
.o_address_country {
display: -webkit-inline-flex;
display: inline-flex;
width: 38%;
margin-right: 2%;
}
}
.o_form_view .o_address_format.o_address_chinese {
.o_address_country {
display: -webkit-inline-flex;
display: inline-flex;
width: 38%;
margin-right: 2%;
}
}
.o_form_view .o_form_editable .o_address_format.o_address_chinese {
.o_address_zip{
width: 38%;
margin-right: 2%;
}
.o_address_state {
width: 38%;
margin-right: 2%;
}
.o_address_city{
width: 38%;
margin-right: 2%;
}
.o_address_city_id{
width: 38%;
margin-right: 2%;
}
}

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<!--改search中英文-->
<t t-extend="SearchPanel.Category">
<t t-jquery="div.alert" t-operation="replace">
<div t-if="category.limitAttained" class="alert alert-warning">
<span>性能原因,只支持 200 条记录的显示</span>
<span t-if="category.parentField">记录没有树状结构</span>
</div>
</t>
</t>
</templates>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- VIEWS -->
<record id="app_view_move_form" model="ir.ui.view">
<field name="name">app.account.move.form</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<!-- 过帐操作-->
<xpath expr="//header//button[@name='action_post']" position="attributes">
<attribute name="string">Post Entry</attribute>
</xpath>
</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- currency视图, tree -->
<record id="app_view_currency_tree" model="ir.ui.view">
<field name="name">app.res.currency.tree</field>
<field name="model">res.currency</field>
<field name="inherit_id" ref="base.view_currency_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="before">
<field name="sequence" widget="handle"/>
</xpath>
</field>
</record>
<!-- currency视图, form -->
<record id="app_view_currency_form" model="ir.ui.view">
<field name="name">app.res.currency.form</field>
<field name="model">res.currency</field>
<field name="inherit_id" ref="base.view_currency_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='position']" position="after">
<field name="sequence"/>
</xpath>
</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="app_base_chinese_module_module_form_view" model="ir.ui.view">
<field name="name">app.base.chinese.module.module.form</field>
<field name="model">ir.module.module</field>
<field name="inherit_id" ref="base.module_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='description_html']" position="before">
<field name="description_html_cn" class="oe_styling_v8" attrs="{'invisible': [('description_html_cn', '=', False)]}"/>
</xpath>
</field>
</record>
<record id="app_base_chinese_module_kanban_view" model="ir.ui.view">
<field name="name">app.base.chinese.module.kanban</field>
<field name="model">ir.module.module</field>
<field name="inherit_id" ref="base.module_view_kanban"/>
<field name="arch" type="xml">
<xpath expr="//a[@t-if='record.to_buy.raw_value']" position="attributes">
<attribute name="href">https://www.odooapp.cn/pricing?utm_source=db&amp;utm_medium=module#hosting=on_premise</attribute>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="app_view_company_tree" model="ir.ui.view">
<field name="name">app.res.company.form</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="base.view_company_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="after">
<field name="short_name"/>
</xpath>
</field>
</record>
<record id="app_view_company_form" model="ir.ui.view">
<field name="name">app.res.company.form</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="base.view_company_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='phone']" position="before">
<field name='short_name'/>
</xpath>
</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- currency视图, tree -->
<record id="app_ir_default_tree_view" model="ir.ui.view">
<field name="name">app.ir.default tree view</field>
<field name="model">ir.default</field>
<field name="inherit_id" ref="base.ir_default_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='json_value']" position="after">
<field name="condition"/>
</xpath>
</field>
</record>
<!-- currency视图, form -->
<record id="app_ir_default_form_view" model="ir.ui.view">
<field name="name">app.ir.default form view</field>
<field name="model">ir.default</field>
<field name="inherit_id" ref="base.ir_default_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='json_value']" position="after">
<field name="condition"/>
</xpath>
</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- Partner Form视图用继承方式改写2018-11-21,ivan -->
<record id="app_view_partner_form" model="ir.ui.view">
<field name="name">app.res.partner.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<!-- 客户编号设计在重要位置,放到 app_partner_auto_reference -->
<!--<xpath expr="//field[@name='type']" position="after">-->
<!--<xpath expr="//field[@name='ref']" position="move"/>-->
<!--</xpath>-->
<xpath expr="//field[@name='function']" position="before">
<field name="short_name"/>
</xpath>
<!--res.partner客户细节调整至 app_base_chinese_city 中处理 -->
<xpath expr="//field[@name='street']" position="before">
<xpath expr="//div[@name='partner_address_country']" position="move"/>
</xpath>
<xpath expr="//page//field[@name='child_ids']//form[1]//field[@name='name']" position="attributes">
<attribute name="required">1</attribute>
<attribute name="force_save">1</attribute>
</xpath>
<xpath expr="//field[@name='child_ids']//form[1]//field[@name='email']" position="before">
<field name="category_id" widget="many2many_tags"/>
</xpath>
<!-- res.partner联系人 kanban -->
<!-- 显示类型和地址等 -->
<xpath expr="//field[@name='child_ids']//kanban[1]//templates//field[@name='name']" position="before">
<t t-if="record.ref and record.ref.raw_value">[<field name="ref"/>]
</t>
</xpath>
<xpath expr="//field[@name='child_ids']//kanban[1]//templates//field[@name='name']" position="after">
<div t-if="record.type and record.type.raw_value">
<field name="type"/>
</div>
<div t-if="record.category_id and record.category_id.raw_value">
<field name="category_id" widget="many2many_tags"/>
</div>
</xpath>
</field>
</record>
<!-- 指定的中国地址格式-->
<record id="app_view_partner_form_chinese" model="ir.ui.view">
<field name="name">app.res.partner.form.chinese</field>
<field name="model">res.partner</field>
<field name="priority" eval="900"/>
<field name="arch" type="xml">
<form class="o_form_address_chinese">
<div class="o_address_format o_address_chinese">
<div name="partner_address_country" class="d-flex">
<field name="country_id" placeholder="Country" class="o_address_country"
options='{"no_open": True, "no_create": True}'/>
<field name="zip" placeholder="ZIP" class="o_address_zip"/>
</div>
<field name="state_id" class="o_address_state" placeholder="State" options='{"no_open": True, "no_create": True}'
context="{'country_id': country_id, 'default_country_id': country_id, 'zip': zip}"/>
<field name="city_id" placeholder="City" class="o_address_city"
options='{"no_open": True, "no_create": True}'
context="{'default_country_id': country_id, 'default_state_id': state_id,}"/>
<field name="city" placeholder="City" invisible="1"/>
<field name="street" placeholder="Street..." class="o_address_street"/>
<field name="street2" placeholder="Street 2..." class="o_address_street"/>
</div>
</form>
</field>
</record>
<record id="app_view_partner_tree" model="ir.ui.view">
<field name="name">app.res.partner.tree</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='email']" position="after">
<field name="category_id" widget="many2many_tags" optional="show"/>
</xpath>
</field>
</record>
<!--Partner kanban 视图用继承方式改写2017-11-23,ivan-->
<record id="app_res_partner_kanban_view" model="ir.ui.view">
<field name="name">app.res.partner.kanban</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.res_partner_kanban_view"/>
<field name="arch" type="xml">
<xpath expr="//templates" position="before">
<field name="credit_limit"/>
</xpath>
<xpath expr="//div[hasclass('oe_kanban_details')]/div/ul" position="inside">
<li t-if="record.credit_limit and record.credit_limit.raw_value">
Credit
<field name="credit_limit"/>
</li>
</xpath>
</field>
</record>
<!--end客户-->
<!-- 为供应商菜单单独增加筛选器 2017-11-13 -->
<!--end供应商-->
<!-- 所有合作伙伴 2017-11-13 -->
</data>
</odoo>

View File

@@ -0,0 +1,24 @@
<odoo>
<data>
<!-- 改收款相关操作显示 -->
<record id="app_view_order_form" model="ir.ui.view">
<field name="name">app.sale.order.form</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<!-- 全款操作-->
<xpath expr="//header//button[@name='%(sale.action_view_sale_advance_payment_inv)d'][1]" position="attributes">
<attribute name="string">Make Collections</attribute>
</xpath>
<!-- 尾款操作-->
<xpath expr="//header//button[@name='%(sale.action_view_sale_advance_payment_inv)d'][1]" position="attributes">
<attribute name="string">Make Collections</attribute>
</xpath>
<!-- 查看收据列表-->
<xpath expr="//div[hasclass('oe_button_box')]//field[@name='invoice_count']" position="attributes">
<attribute name="string">Invoices/FaPiao</attribute>
</xpath>
</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="sale.view_sale_advance_payment_inv" model="ir.ui.view">
<field name="name">FaPiao / Invoice Orders</field>
</record>
<record id="app_view_sale_advance_payment_inv" model="ir.ui.view">
<field name="name">app.account.move.form</field>
<field name="model">sale.advance.payment.inv</field>
<field name="inherit_id" ref="sale.view_sale_advance_payment_inv"/>
<field name="arch" type="xml">
<xpath expr="//form" position="attributes">
<attribute name="string">FaPiao / Invoice Orders</attribute>
</xpath>
</field>
</record>
<record id="sale.action_view_sale_advance_payment_inv" model="ir.actions.act_window">
<field name="name">Create FaPiao / Invoice</field>
</record>
</odoo>