Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hh_ccs
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
贺阳
hh_ccs
Commits
2d04ffe8
提交
2d04ffe8
authored
9月 10, 2025
作者:
贺阳
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1、PDA扫码记录的操作增加 按托盘理货或按托盘交货
2、按托盘理货接口
上级
9344661e
全部展开
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
70 行增加
和
24 行删除
+70
-24
__manifest__.py
ccs_connect_tiktok/__manifest__.py
+1
-1
order_controller.py
ccs_connect_tiktok/controllers/order_controller.py
+0
-0
__init__.py
ccs_connect_tiktok/models/__init__.py
+1
-0
cc_pallet.py
ccs_connect_tiktok/models/cc_pallet.py
+34
-0
pda_scan_record.py
ccs_connect_tiktok/models/pda_scan_record.py
+3
-1
cc_pallet.py
ccs_pallet/models/cc_pallet.py
+1
-0
pallet_label_report.xml
ccs_pallet/reports/pallet_label_report.xml
+29
-12
pallet_print_wizard.py
ccs_pallet/wizard/pallet_print_wizard.py
+1
-10
没有找到文件。
ccs_connect_tiktok/__manifest__.py
浏览文件 @
2d04ffe8
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
"""
,
"""
,
'category'
:
'Clearance of customs'
,
'category'
:
'Clearance of customs'
,
'website'
:
'https://www.yizuo.ltd'
,
'website'
:
'https://www.yizuo.ltd'
,
'depends'
:
[
'base_setup'
,
'ccs_base'
],
'depends'
:
[
'base_setup'
,
'ccs_base'
,
'ccs_pallet'
],
'data'
:
[
'data'
:
[
'security/security.xml'
,
'security/security.xml'
,
'security/ir.model.access.csv'
,
'security/ir.model.access.csv'
,
...
...
ccs_connect_tiktok/controllers/order_controller.py
浏览文件 @
2d04ffe8
差异被折叠。
点击展开。
ccs_connect_tiktok/models/__init__.py
浏览文件 @
2d04ffe8
...
@@ -10,6 +10,7 @@ from . import ir_attachment
...
@@ -10,6 +10,7 @@ from . import ir_attachment
from
.
import
http
from
.
import
http
from
.
import
pda_scan_record
from
.
import
pda_scan_record
from
.
import
bl_patrol
from
.
import
bl_patrol
from
.
import
cc_pallet
ccs_connect_tiktok/models/cc_pallet.py
0 → 100644
浏览文件 @
2d04ffe8
# -*- coding: utf-8 -*-
# 导入日志
import
logging
from
odoo
import
models
,
fields
,
api
,
_
# 获取日志
_logger
=
logging
.
getLogger
(
__name__
)
class
CcPallet
(
models
.
Model
):
# 模型名称
_inherit
=
'cc.pallet'
# 模型描述
_description
=
'Pallet'
def
search_pallet_info
(
self
):
"""搜索托盘信息"""
return
{
'id'
:
self
.
id
,
#托盘id
'name'
:
self
.
name
,
#托盘号
'express_company_id'
:
self
.
express_company_id
.
id
,
#快递公司id
'express_company_name'
:
self
.
express_company_id
.
name
,
#快递公司名称
'usage_state'
:
self
.
usage_state
,
#使用状态 unused未使用 used已使用
'print_state'
:
self
.
print_state
,
#打印状态 unprinted未打印 printed已打印
'sorting_time'
:
self
.
sorting_time
,
#托盘理货时间
'delivery_time'
:
self
.
delivery_time
,
#托盘交货时间
'package_count'
:
self
.
package_count
,
#大包数量
'partner_id'
:
self
.
partner_id
.
id
,
#使用客户id
'partner_name'
:
self
.
partner_id
.
name
,
#使用客户名称
'delivery_plate_number'
:
self
.
delivery_plate_number
,
#托盘交付车牌号
}
\ No newline at end of file
ccs_connect_tiktok/models/pda_scan_record.py
浏览文件 @
2d04ffe8
...
@@ -24,8 +24,10 @@ class PDAScanRecord(models.Model):
...
@@ -24,8 +24,10 @@ class PDAScanRecord(models.Model):
operation
=
fields
.
Selection
([
operation
=
fields
.
Selection
([
(
'bill_tally'
,
_
(
'Bill Tally'
)),
# 按提单理货
(
'bill_tally'
,
_
(
'Bill Tally'
)),
# 按提单理货
(
'tail_tally'
,
_
(
'Tail Tally'
)),
# 按尾程理货
(
'tail_tally'
,
_
(
'Tail Tally'
)),
# 按尾程理货
(
'pallet_tally'
,
_
(
'Pallet Tally'
)),
# 按托盘理货
(
'bill_handover'
,
_
(
'Bill Handover'
)),
# 按提单交货
(
'bill_handover'
,
_
(
'Bill Handover'
)),
# 按提单交货
(
'tail_handover'
,
_
(
'Tail Handover'
))
# 按尾程交货
(
'tail_handover'
,
_
(
'Tail Handover'
)),
# 按尾程交货
(
'pallet_handover'
,
_
(
'Pallet Handover'
))
# 按托盘交货
],
string
=
_
(
'Operation'
),
required
=
True
)
# 操作
],
string
=
_
(
'Operation'
),
required
=
True
)
# 操作
record_type
=
fields
.
Selection
([
record_type
=
fields
.
Selection
([
(
'tally'
,
_
(
'Tally'
)),
# 理货
(
'tally'
,
_
(
'Tally'
)),
# 理货
...
...
ccs_pallet/models/cc_pallet.py
浏览文件 @
2d04ffe8
...
@@ -124,6 +124,7 @@ class CcPallet(models.Model):
...
@@ -124,6 +124,7 @@ class CcPallet(models.Model):
'target'
:
'new'
,
'target'
:
'new'
,
'context'
:
{
'context'
:
{
'default_pallet_ids'
:
[(
6
,
0
,
self
.
ids
)],
'default_pallet_ids'
:
[(
6
,
0
,
self
.
ids
)],
'active_ids'
:
self
.
ids
,
},
},
}
}
...
...
ccs_pallet/reports/pallet_label_report.xml
浏览文件 @
2d04ffe8
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<odoo>
<!-- 托盘标签纸张格式 -->
<record
id=
"paperformat_pallet_label"
model=
"report.paperformat"
>
<field
name=
"name"
>
托盘标签 (10x15cm)
</field>
<field
name=
"default"
eval=
"True"
/>
<field
name=
"format"
>
custom
</field>
<field
name=
"orientation"
>
Portrait
</field>
<field
name=
"margin_top"
>
0
</field>
<field
name=
"margin_bottom"
>
0
</field>
<field
name=
"margin_left"
>
0
</field>
<field
name=
"margin_right"
>
0
</field>
<field
name=
"header_line"
eval=
"False"
/>
<field
name=
"header_spacing"
>
0
</field>
<field
name=
"dpi"
>
90
</field>
<field
name=
"page_width"
>
10
</field>
<field
name=
"page_height"
>
15
</field>
</record>
<!-- 托盘标签打印报告 -->
<!-- 托盘标签打印报告 -->
<record
id=
"action_pallet_label_report"
model=
"ir.actions.report"
>
<record
id=
"action_pallet_label_report"
model=
"ir.actions.report"
>
<field
name=
"name"
>
托盘标签
</field>
<field
name=
"name"
>
托盘标签
</field>
...
@@ -7,6 +24,7 @@
...
@@ -7,6 +24,7 @@
<field
name=
"report_type"
>
qweb-pdf
</field>
<field
name=
"report_type"
>
qweb-pdf
</field>
<field
name=
"report_name"
>
ccs_pallet.pallet_label_report
</field>
<field
name=
"report_name"
>
ccs_pallet.pallet_label_report
</field>
<field
name=
"report_file"
>
ccs_pallet.pallet_label_report
</field>
<field
name=
"report_file"
>
ccs_pallet.pallet_label_report
</field>
<field
name=
"paperformat_id"
ref=
"paperformat_pallet_label"
/>
<field
name=
"binding_model_id"
ref=
"model_cc_pallet"
/>
<field
name=
"binding_model_id"
ref=
"model_cc_pallet"
/>
<field
name=
"binding_type"
>
report
</field>
<field
name=
"binding_type"
>
report
</field>
</record>
</record>
...
@@ -15,22 +33,21 @@
...
@@ -15,22 +33,21 @@
<template
id=
"pallet_label_report"
>
<template
id=
"pallet_label_report"
>
<t
t-call=
"web.html_container"
>
<t
t-call=
"web.html_container"
>
<t
t-foreach=
"docs"
t-as=
"pallet"
>
<t
t-foreach=
"docs"
t-as=
"pallet"
>
<div
class=
"page"
style=
"width: 10
cm; height: 15cm; margin: 0; padding: 0.5cm; border: 1px solid #ccc; page-break-after: always
;"
>
<div
class=
"page"
style=
"width: 10
0%; height: 100%; margin: 0; padding: 0.3cm; page-break-after: always; font-family: 'DejaVu Sans', Arial, sans-serif; box-sizing: border-box; position: relative
;"
>
<!-- 客户名称和快递简称 -->
<!-- 客户名称和快递简称 -->
<div
style=
"text-align: center;
margin-bottom: 1
cm;"
>
<div
style=
"text-align: center;
height: 2cm; display: flex; align-items: center; justify-content: center; margin-bottom: 0.2
cm;"
>
<h2
style=
"margin: 0; font-size:
24px; font-weight: bold
;"
>
<h2
style=
"margin: 0; font-size:
18px; font-weight: bold; line-height: 1.2
;"
>
<t
t-esc=
"pallet.
custom
er_id.name or 'TIKTOK'"
/>
/
<t
t-esc=
"pallet.express_company_id.name or 'RM'"
/>
<t
t-esc=
"pallet.
partn
er_id.name or 'TIKTOK'"
/>
/
<t
t-esc=
"pallet.express_company_id.name or 'RM'"
/>
</h2>
</h2>
</div>
</div>
<!-- 条形码区域 -->
<!-- 条形码区域 -->
<div
style=
"text-align: center;
margin: 2cm 0; padding: 1cm; border: 2px dashed #999; background-color: #f9f9f9
;"
>
<div
style=
"text-align: center;
height: 8cm; border: 2px dashed #999; background-color: #f9f9f9; display: flex; flex-direction: column; justify-content: center; margin-bottom: 0.2cm
;"
>
<div
style=
"font-size: 1
8
px; color: #666; margin-bottom: 0.5cm;"
>
<div
style=
"font-size: 1
4
px; color: #666; margin-bottom: 0.5cm;"
>
<!-- 托盘号作为
二维
码 -->
<!-- 托盘号作为
条形
码 -->
<t
t-if=
"pallet.name"
>
<t
t-if=
"pallet.name"
>
<!-- `quiet=0` to remove the left and right margins on the barcode -->
<div
t-out=
"pallet.name"
style=
"padding:0; margin-bottom: 0.3cm;"
t-options=
"{'widget': 'barcode', 'quiet': 0, 'symbology': 'auto', 'width': 2, 'height': 60}"
/>
<div
t-out=
"pallet.name"
style=
"padding:0"
t-options=
"{'widget': 'barcode', 'quiet': 0, 'symbology': 'auto', 'img_style': barcode_size}"
/>
<div
class=
"o_label_name"
style=
"height:1.2em;background-color: transparent; font-size: 12px;"
>
<div
class=
"o_label_name"
style=
"height:1.7em;background-color: transparent;"
>
<span
t-out=
"pallet.name"
/>
<span
t-out=
"pallet.name"
/>
</div>
</div>
</t>
</t>
...
@@ -38,8 +55,8 @@
...
@@ -38,8 +55,8 @@
</div>
</div>
<!-- 托盘号 -->
<!-- 托盘号 -->
<div
style=
"text-align: center;
margin-top: 1cm
;"
>
<div
style=
"text-align: center;
height: 3cm; display: flex; align-items: center; justify-content: center
;"
>
<h1
style=
"margin: 0; font-size: 2
8px; font-weight: bold
;"
>
<h1
style=
"margin: 0; font-size: 2
2px; font-weight: bold; line-height: 1.2
;"
>
<t
t-esc=
"pallet.name"
/>
<t
t-esc=
"pallet.name"
/>
</h1>
</h1>
</div>
</div>
...
...
ccs_pallet/wizard/pallet_print_wizard.py
浏览文件 @
2d04ffe8
...
@@ -31,13 +31,4 @@ class PalletPrintWizard(models.TransientModel):
...
@@ -31,13 +31,4 @@ class PalletPrintWizard(models.TransientModel):
def
_generate_print_report
(
self
):
def
_generate_print_report
(
self
):
"""生成打印报告"""
"""生成打印报告"""
return
{
return
self
.
env
.
ref
(
'ccs_pallet.action_pallet_label_report'
)
.
report_action
(
self
.
pallet_ids
)
'type'
:
'ir.actions.report'
,
'report_name'
:
'ccs_pallet.pallet_label_report'
,
'report_type'
:
'qweb-pdf'
,
'data'
:
{
'ids'
:
self
.
pallet_ids
.
ids
,
'model'
:
'cc.pallet'
,
},
'context'
:
self
.
env
.
context
,
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论