提交 57151be6 authored 作者: 贺阳's avatar 贺阳

1、新增提货扫码和修改提货信息,尾程快递理货检查是否倒序,托盘理货检查是否倒序的接口开发

2、交货检查是否倒序的接口优化
上级 f16fec9f
...@@ -6,11 +6,11 @@ msgid "" ...@@ -6,11 +6,11 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 16.0\n" "Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-09-22 01:56+0000\n" "POT-Creation-Date: 2025-09-23 09:28+0000\n"
"PO-Revision-Date: 2025-09-22 09:57+0800\n" "PO-Revision-Date: 2025-09-23 17:30+0800\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: zh_CN\n" "Language: zh\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
...@@ -173,6 +173,11 @@ msgstr "<span class=\"o_stat_text\">已交货大包</span>" ...@@ -173,6 +173,11 @@ msgstr "<span class=\"o_stat_text\">已交货大包</span>"
msgid "<span class=\"o_stat_text\">Goods</span>" msgid "<span class=\"o_stat_text\">Goods</span>"
msgstr "<span class=\"o_stat_text\">货物</span>" msgstr "<span class=\"o_stat_text\">货物</span>"
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_bl_view
msgid "<span class=\"o_stat_text\">Picked Up Big Packages</span>"
msgstr "<span class=\"o_stat_text\">已提货大包</span>"
#. module: ccs_base #. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_big_package_view #: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_big_package_view
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_bl_view #: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_bl_view
...@@ -900,35 +905,6 @@ msgstr "清关重量" ...@@ -900,35 +905,6 @@ msgstr "清关重量"
msgid "Checked goods" msgid "Checked goods"
msgstr "已理货" msgstr "已理货"
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_big_package__pickup_user_id
#: model:ir.model.fields,field_description:ccs_base.field_cc_history_big_package__pickup_user_id
msgid "Pickup User"
msgstr "提货人"
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_big_package__pickup_time
#: model:ir.model.fields,field_description:ccs_base.field_cc_history_big_package__pickup_time
msgid "Pickup Time"
msgstr "提货时间"
#. module: ccs_base
#: model:ir.model.fields.selection,name:ccs_base.selection__cc_big_package__tally_state__picked_up
#: model:ir.model.fields.selection,name:ccs_base.selection__cc_history_big_package__tally_state__picked_up
#: model_terms:ir.ui.view,arch_db:ccs_base.search_cc_big_package_view
msgid "Picked Up"
msgstr "已提货"
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_bl__picked_up_big_package_qty
msgid "Picked Up Big Package Qty"
msgstr "已提货大包数量"
#. module: ccs_base
#: model:ir.actions.act_window,name:ccs_base.action_show_big_package_picked_up
msgid "Picked Up Big Package"
msgstr "已提货大包"
#. module: ccs_base #. module: ccs_base
#. odoo-python #. odoo-python
#: code:addons/ccs_base/wizard/add_exception_info_wizard.py:0 #: code:addons/ccs_base/wizard/add_exception_info_wizard.py:0
...@@ -2574,6 +2550,39 @@ msgstr "托盘号" ...@@ -2574,6 +2550,39 @@ msgstr "托盘号"
msgid "Pallet Usage Date" msgid "Pallet Usage Date"
msgstr "托盘使用日期" msgstr "托盘使用日期"
#. module: ccs_base
#: model:ir.model.fields.selection,name:ccs_base.selection__cc_big_package__tally_state__picked_up
#: model_terms:ir.ui.view,arch_db:ccs_base.search_cc_big_package_view
msgid "Picked Up"
msgstr "已提货"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/models/cc_bill_loading.py:0
#, python-format
msgid "Picked Up Big Package"
msgstr "已提货大包"
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_bl__picked_up_big_package_qty
msgid "Picked Up Big Package Qty"
msgstr "已提货大包数量"
#. module: ccs_base
#: model:ir.model.fields.selection,name:ccs_base.selection__cc_node__tally_state__picked_up
msgid "Picked up"
msgstr "已提货"
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_big_package__pickup_time
msgid "Pickup Time"
msgstr "提货时间"
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_big_package__pickup_user_id
msgid "Pickup User"
msgstr "提货人"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_last_mile_provider__placement_area #: model:ir.model.fields,field_description:ccs_base.field_cc_last_mile_provider__placement_area
msgid "Placement Area" msgid "Placement Area"
......
...@@ -873,24 +873,24 @@ class CcBL(models.Model): ...@@ -873,24 +873,24 @@ class CcBL(models.Model):
'domain': [('bl_id', '=', self.id), ('is_cancel', '=', False)], 'domain': [('bl_id', '=', self.id), ('is_cancel', '=', False)],
} }
def action_show_big_package_tally(self): def action_show_big_package_picked_up(self):
# 返回一个action,显示已货的大包 # 返回一个action,显示已货的大包
return { return {
'name': _('Tally Big Package'), 'name': _('Picked Up Big Package'),
'type': 'ir.actions.act_window', 'type': 'ir.actions.act_window',
'res_model': 'cc.big.package', 'res_model': 'cc.big.package',
'view_mode': 'tree,form', 'view_mode': 'tree,form',
'domain': [('bl_id', '=', self.id), ('is_cancel', '=', False), ('tally_state', '=', 'checked_goods')], 'domain': [('bl_id', '=', self.id), ('is_cancel', '=', False), ('tally_state', '=', 'picked_up')],
} }
def action_show_big_package_picked_up(self): def action_show_big_package_tally(self):
# 返回一个action,显示已货的大包 # 返回一个action,显示已货的大包
return { return {
'name': _('Picked Up Big Package'), 'name': _('Tally Big Package'),
'type': 'ir.actions.act_window', 'type': 'ir.actions.act_window',
'res_model': 'cc.big.package', 'res_model': 'cc.big.package',
'view_mode': 'tree,form', 'view_mode': 'tree,form',
'domain': [('bl_id', '=', self.id), ('is_cancel', '=', False), ('tally_state', '=', 'picked_up')], 'domain': [('bl_id', '=', self.id), ('is_cancel', '=', False), ('tally_state', '=', 'checked_goods')],
} }
def action_show_big_package_delivered(self): def action_show_big_package_delivered(self):
......
...@@ -43,6 +43,7 @@ class CcNode(models.Model): ...@@ -43,6 +43,7 @@ class CcNode(models.Model):
tally_state = fields.Selection([ tally_state = fields.Selection([
('unprocessed_goods', 'Unprocessed goods'), ('unprocessed_goods', 'Unprocessed goods'),
('picked_up', 'Picked up'),
('checked_goods', 'Checked goods'), ('checked_goods', 'Checked goods'),
('handover_completed', 'Handover Completed') ('handover_completed', 'Handover Completed')
], default='', string='Corresponding to the status of the big package', index=True) # 对应大包状态 未理货/已理货/尾程交接 ], default='', string='Corresponding to the status of the big package', index=True) # 对应大包状态 未理货/已理货/尾程交接
......
...@@ -6,8 +6,8 @@ msgid "" ...@@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 16.0\n" "Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-09-22 01:59+0000\n" "POT-Creation-Date: 2025-09-23 09:31+0000\n"
"PO-Revision-Date: 2025-09-22 10:00+0800\n" "PO-Revision-Date: 2025-09-23 17:35+0800\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: zh_CN\n" "Language: zh_CN\n"
...@@ -95,6 +95,14 @@ msgstr "提单号" ...@@ -95,6 +95,14 @@ msgstr "提单号"
msgid "Bill Of Loading Sync Logs" msgid "Bill Of Loading Sync Logs"
msgstr "关务提单状态同步日志" msgstr "关务提单状态同步日志"
#. module: ccs_connect_tiktok
#. odoo-python
#: code:addons/ccs_connect_tiktok/models/pda_scan_record.py:0
#: model:ir.model.fields.selection,name:ccs_connect_tiktok.selection__pda_scan_record__operation__bill_pickup
#, python-format
msgid "Bill Pickup"
msgstr "按提单提货"
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
#. odoo-python #. odoo-python
#: code:addons/ccs_connect_tiktok/models/pda_scan_record.py:0 #: code:addons/ccs_connect_tiktok/models/pda_scan_record.py:0
...@@ -388,6 +396,14 @@ msgstr "托盘" ...@@ -388,6 +396,14 @@ msgstr "托盘"
msgid "Pallet Handover" msgid "Pallet Handover"
msgstr "托盘交货" msgstr "托盘交货"
#. module: ccs_connect_tiktok
#. odoo-python
#: code:addons/ccs_connect_tiktok/models/pda_scan_record.py:0
#: model:ir.model.fields.selection,name:ccs_connect_tiktok.selection__pda_scan_record__operation__pallet_pickup
#, python-format
msgid "Pallet Pickup"
msgstr "托盘提货"
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
#. odoo-python #. odoo-python
#: code:addons/ccs_connect_tiktok/models/pda_scan_record.py:0 #: code:addons/ccs_connect_tiktok/models/pda_scan_record.py:0
...@@ -396,6 +412,14 @@ msgstr "托盘交货" ...@@ -396,6 +412,14 @@ msgstr "托盘交货"
msgid "Pallet Tally" msgid "Pallet Tally"
msgstr "托盘理货" msgstr "托盘理货"
#. module: ccs_connect_tiktok
#. odoo-python
#: code:addons/ccs_connect_tiktok/models/pda_scan_record.py:0
#: model:ir.model.fields.selection,name:ccs_connect_tiktok.selection__pda_scan_record__record_type__pickup
#, python-format
msgid "Pickup"
msgstr "提货"
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
#: model:ir.model.fields,field_description:ccs_connect_tiktok.field_cc_node__interval_minutes #: model:ir.model.fields,field_description:ccs_connect_tiktok.field_cc_node__interval_minutes
msgid "Predecessor Node Interval (Minutes)" msgid "Predecessor Node Interval (Minutes)"
...@@ -541,6 +565,14 @@ msgstr "进度编码" ...@@ -541,6 +565,14 @@ msgstr "进度编码"
msgid "Tail Handover" msgid "Tail Handover"
msgstr "按尾程交货" msgstr "按尾程交货"
#. module: ccs_connect_tiktok
#. odoo-python
#: code:addons/ccs_connect_tiktok/models/pda_scan_record.py:0
#: model:ir.model.fields.selection,name:ccs_connect_tiktok.selection__pda_scan_record__operation__tail_pickup
#, python-format
msgid "Tail Pickup"
msgstr ""
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
#. odoo-python #. odoo-python
#: code:addons/ccs_connect_tiktok/models/pda_scan_record.py:0 #: code:addons/ccs_connect_tiktok/models/pda_scan_record.py:0
...@@ -685,7 +717,7 @@ msgstr "" ...@@ -685,7 +717,7 @@ msgstr ""
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
#: model:ir.model.fields,field_description:ccs_connect_tiktok.field_res_config_settings__delivery_time #: model:ir.model.fields,field_description:ccs_connect_tiktok.field_res_config_settings__delivery_time
msgid "交货操作晚于提货操作X分钟" msgid "交货间隔时间"
msgstr "" msgstr ""
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
...@@ -901,6 +933,11 @@ msgstr "" ...@@ -901,6 +933,11 @@ msgstr ""
msgid "状态" msgid "状态"
msgstr "" msgstr ""
#. module: ccs_connect_tiktok
#: model:ir.model.fields,field_description:ccs_connect_tiktok.field_res_config_settings__tally_interval_time
msgid "理货间隔时间"
msgstr ""
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
#: model:ir.model.fields,field_description:ccs_connect_tiktok.field_ao_tt_api_log__source #: model:ir.model.fields,field_description:ccs_connect_tiktok.field_ao_tt_api_log__source
#: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.search_ao_tt_api_log_view #: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.search_ao_tt_api_log_view
......
...@@ -1169,22 +1169,28 @@ class CcBl(models.Model): ...@@ -1169,22 +1169,28 @@ class CcBl(models.Model):
'domain': [('bl_id', '=', self.id), ('is_sync', '=', False)], 'domain': [('bl_id', '=', self.id), ('is_sync', '=', False)],
} }
def search_bl_info(self, pda_lang=False, type='tally'): def search_bl_info(self, pda_lang=False, type='tally', is_all=True):
""" """
查询提单信息 查询提单信息
""" """
vals = { vals = {
'bl_id': self.id, # 提单id
'bl_no': self.bl_no or '', # 提单号 'bl_no': self.bl_no or '', # 提单号
}
if is_all:
vals.update({
'scan_big_package_qty': self.tally_big_package_qty + self.delivered_big_package_qty if type == 'tally' else self.delivered_big_package_qty, 'scan_big_package_qty': self.tally_big_package_qty + self.delivered_big_package_qty if type == 'tally' else self.delivered_big_package_qty,
# 已扫大包数量 # 已扫大包数量
'big_package_arr': [big_package_item.search_big_package_info(pda_lang=pda_lang, type=type) for 'big_package_arr': [big_package_item.search_big_package_info(pda_lang=pda_lang, type=type) for
big_package_item in big_package_item in
self.big_package_ids], self.big_package_ids],
# 大包信息 # 大包信息
'ship_package_arr': [ship_package_item.search_ship_package_info(pda_lang=pda_lang) for ship_package_item in 'ship_package_arr': [ship_package_item.search_ship_package_info(pda_lang=pda_lang) for ship_package_item
in
self.ship_package_ids], # 小包信息 self.ship_package_ids], # 小包信息
'pallet_arr': self.get_unique_pallet_info(), # 托盘信息 'pallet_arr': self.get_unique_pallet_info(), # 托盘信息
} })
return vals return vals
def get_unique_pallet_info(self): def get_unique_pallet_info(self):
...@@ -1243,7 +1249,8 @@ class CcBl(models.Model): ...@@ -1243,7 +1249,8 @@ class CcBl(models.Model):
user_obj = self.env['res.users'].search([('login', '=', pda_db_user)], limit=1) user_obj = self.env['res.users'].search([('login', '=', pda_db_user)], limit=1)
ship_package_ids = [ship_package_dict for sublist in [d['id'] for d in ship_packages] for ship_package_ids = [ship_package_dict for sublist in [d['id'] for d in ship_packages] for
ship_package_dict in sublist] ship_package_dict in sublist]
tally_state = 'checked_goods' if action_type == 'tally' else 'handover_completed' tally_state = 'checked_goods' if action_type == 'tally' else (
'picked_up' if action_type == 'pickup' else 'handover_completed')
# 后续节点 # 后续节点
node_obj = self.env['cc.node'].sudo().search([ node_obj = self.env['cc.node'].sudo().search([
('node_type', '=', 'package'), ('node_type', '=', 'package'),
...@@ -1444,12 +1451,15 @@ class CcBigPackage(models.Model): ...@@ -1444,12 +1451,15 @@ class CcBigPackage(models.Model):
vals = { vals = {
'tally_state_label': state_arr[self.tally_state] or '', # 理货状态显示名称 'tally_state_label': state_arr[self.tally_state] or '', # 理货状态显示名称
'tally_state': self.tally_state or '', # 理货状态系统KEY 'tally_state': self.tally_state or '', # 理货状态系统KEY
'tally_user_id': (self.tally_user_id.id or 0) if type == 'tally' else ((self.delivery_user_id.id or 0) if type == 'handover' else (self.pickup_user_id.id or 0)), 'tally_user_id': (self.tally_user_id.id or 0) if type == 'tally' else (
(self.delivery_user_id.id or 0) if type == 'handover' else (self.pickup_user_id.id or 0)),
# 理货人id/交货人id/提货人id # 理货人id/交货人id/提货人id
'tally_user_name': (self.tally_user_id.name or '') if type == 'tally' else (( 'tally_user_name': (self.tally_user_id.name or '') if type == 'tally' else ((
self.delivery_user_id.name or '') if type == 'handover' else (self.pickup_user_id.name or '')), self.delivery_user_id.name or '') if type == 'handover' else (
self.pickup_user_id.name or '')),
# 理货人名称/交货人名称/提货人名称 # 理货人名称/交货人名称/提货人名称
'tally_time': (self.tally_time or '') if type == 'tally' else ((self.delivery_time or '') if type == 'handover' else (self.pickup_time or '')), 'tally_time': (self.tally_time or '') if type == 'tally' else (
(self.delivery_time or '') if type == 'handover' else (self.pickup_time or '')),
# 理货时间/交货时间/提货时间 # 理货时间/交货时间/提货时间
'big_package_no': self.big_package_no or '', # 大包号 'big_package_no': self.big_package_no or '', # 大包号
'next_service_provider_name': self.next_provider_name or '', # 下一个服务商名称 'next_service_provider_name': self.next_provider_name or '', # 下一个服务商名称
...@@ -1467,13 +1477,13 @@ class CcBigPackage(models.Model): ...@@ -1467,13 +1477,13 @@ class CcBigPackage(models.Model):
action_type = kwargs.get('action_type') action_type = kwargs.get('action_type')
for item in self: for item in self:
if action_type == 'tally' and item.tally_state == 'unprocessed_goods': if action_type == 'tally' and item.tally_state in ('unprocessed_goods', 'picked_up'):
# 更新理货信息 # 更新理货信息
self._update_info(item, kwargs, 'tally') self._update_info(item, kwargs, 'tally')
elif action_type == 'handover' and item.tally_state != 'handover_completed': elif action_type == 'handover' and item.tally_state != 'handover_completed':
# 更新交接信息 # 更新交接信息
self._update_info(item, kwargs, 'handover') self._update_info(item, kwargs, 'handover')
elif action_type == 'pickup' and item.tally_state == 'picked_up': elif action_type == 'pickup' and item.tally_state == 'unprocessed_goods':
# 更新提货信息 # 更新提货信息
self._update_info(item, kwargs, 'pickup') self._update_info(item, kwargs, 'pickup')
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from odoo import models, fields, api, _ from odoo import models, fields, api, _
from odoo.exceptions import ValidationError
class PDAScanRecord(models.Model): class PDAScanRecord(models.Model):
...@@ -28,8 +27,6 @@ class PDAScanRecord(models.Model): ...@@ -28,8 +27,6 @@ class PDAScanRecord(models.Model):
('tail_tally', _('Tail Tally')), # 按尾程理货 ('tail_tally', _('Tail Tally')), # 按尾程理货
('pallet_tally', _('Pallet Tally')), # 按托盘理货 ('pallet_tally', _('Pallet Tally')), # 按托盘理货
('bill_pickup', _('Bill Pickup')), # 按提单提货 ('bill_pickup', _('Bill Pickup')), # 按提单提货
('tail_pickup', _('Tail Pickup')), # 按尾程提货
('pallet_pickup', _('Pallet Pickup')), # 按托盘提货
('bill_handover', _('Bill Handover')), # 按提单交货 ('bill_handover', _('Bill Handover')), # 按提单交货
('tail_handover', _('Tail Handover')), # 按尾程交货 ('tail_handover', _('Tail Handover')), # 按尾程交货
('pallet_handover', _('Pallet Handover')) # 按托盘交货 ('pallet_handover', _('Pallet Handover')) # 按托盘交货
...@@ -43,7 +40,7 @@ class PDAScanRecord(models.Model): ...@@ -43,7 +40,7 @@ class PDAScanRecord(models.Model):
transfer_number = fields.Char(string=_('Transfer Number')) # 转运单号 transfer_number = fields.Char(string=_('Transfer Number')) # 转运单号
# 增加提单关联字段 # 增加提单关联字段
bl_id = fields.Many2one('cc.bl', string=_('Bill of Lading'), ondelete='cascade') # 提单对象 bl_id = fields.Many2one('cc.bl', string=_('Bill of Lading'), ondelete='cascade') # 提单对象
#增加状态 成功 失败 # 增加状态 成功 失败
state = fields.Selection([ state = fields.Selection([
('success', _('Success')), ('success', _('Success')),
('failed', _('Failed')) ('failed', _('Failed'))
...@@ -51,7 +48,8 @@ class PDAScanRecord(models.Model): ...@@ -51,7 +48,8 @@ class PDAScanRecord(models.Model):
failure_reason = fields.Char(string=_('Failure Reason')) # 失败原因 failure_reason = fields.Char(string=_('Failure Reason')) # 失败原因
@api.model @api.model
def create_scan_record(self, operation, record_type, bill_number, transfer_number, state, operator_id=False, bl_id=False, failure_reason=False, operation_time=False): def create_scan_record(self, operation, record_type, bill_number, transfer_number, state, operator_id=False,
bl_id=False, failure_reason=False, operation_time=False):
""" """
创建扫码记录的方法,供接口调用 创建扫码记录的方法,供接口调用
Create scan record method for API calls Create scan record method for API calls
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Part of SmartGo. See LICENSE file for full copyright and licensing details. # Part of SmartGo. See LICENSE file for full copyright and licensing details.
import logging import logging
from odoo import api, fields, models, _ from odoo import api, fields, models
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)
...@@ -15,14 +15,19 @@ class ResConfigSettings(models.TransientModel): ...@@ -15,14 +15,19 @@ class ResConfigSettings(models.TransientModel):
tt_app_secret = fields.Char('AppSecret', default='') tt_app_secret = fields.Char('AppSecret', default='')
tt_version = fields.Char('接口版本', default='3.0') tt_version = fields.Char('接口版本', default='3.0')
tt_customer_id = fields.Many2one('res.partner', string='客户') tt_customer_id = fields.Many2one('res.partner', string='客户')
#交货操作晚于提货操作X分钟【默认80分钟】 # 交货操作晚于提货操作X分钟【默认80分钟】
delivery_time = fields.Integer('交货操作晚于提货操作X分钟', default=80,config_parameter='delivery_time') delivery_time = fields.Integer('交货间隔时间', default=80, config_parameter='delivery_time')
# 提货操作晚于理货操作X分钟【默认80分钟】
tally_interval_time = fields.Integer('理货间隔时间', default=80, config_parameter='tally_interval_time')
# 巡查配置 # 巡查配置
patrol_receiver_emails = fields.Char('接收邮件地址', help='多个邮箱地址,用逗号分隔', config_parameter='patrol_receiver_emails') patrol_receiver_emails = fields.Char('接收邮件地址', help='多个邮箱地址,用逗号分隔',
config_parameter='patrol_receiver_emails')
patrol_sender_email = fields.Char('发送邮箱地址', config_parameter='patrol_sender_email') patrol_sender_email = fields.Char('发送邮箱地址', config_parameter='patrol_sender_email')
patrol_check_days = fields.Integer('巡查天数', default=5, help='检查近几天的提单', config_parameter='patrol_check_days') patrol_check_days = fields.Integer('巡查天数', default=5, help='检查近几天的提单',
patrol_start_hour = fields.Integer('巡查开始时间(小时)', default=8, help='北京时间,24小时制', config_parameter='patrol_start_hour') config_parameter='patrol_check_days')
patrol_start_hour = fields.Integer('巡查开始时间(小时)', default=8, help='北京时间,24小时制',
config_parameter='patrol_start_hour')
@api.model @api.model
def get_values(self): def get_values(self):
...@@ -38,6 +43,7 @@ class ResConfigSettings(models.TransientModel): ...@@ -38,6 +43,7 @@ class ResConfigSettings(models.TransientModel):
tt_version = config.get_param('tt_version', default='') tt_version = config.get_param('tt_version', default='')
tt_customer_id = config.get_param('tt_customer_id', default=False) tt_customer_id = config.get_param('tt_customer_id', default=False)
delivery_time = config.get_param('delivery_time', default=80) delivery_time = config.get_param('delivery_time', default=80)
tally_interval_time = config.get_param('tally_interval_time', default=80)
patrol_receiver_emails = config.get_param('patrol_receiver_emails', default='') patrol_receiver_emails = config.get_param('patrol_receiver_emails', default='')
patrol_sender_email = config.get_param('patrol_sender_email', default='') patrol_sender_email = config.get_param('patrol_sender_email', default='')
patrol_check_days = config.get_param('patrol_check_days', default=5) patrol_check_days = config.get_param('patrol_check_days', default=5)
...@@ -50,6 +56,7 @@ class ResConfigSettings(models.TransientModel): ...@@ -50,6 +56,7 @@ class ResConfigSettings(models.TransientModel):
tt_version=tt_version, tt_version=tt_version,
tt_customer_id=customer, tt_customer_id=customer,
delivery_time=delivery_time, delivery_time=delivery_time,
tally_interval_time=tally_interval_time,
patrol_receiver_emails=patrol_receiver_emails, patrol_receiver_emails=patrol_receiver_emails,
patrol_sender_email=patrol_sender_email, patrol_sender_email=patrol_sender_email,
patrol_check_days=patrol_check_days, patrol_check_days=patrol_check_days,
...@@ -66,6 +73,7 @@ class ResConfigSettings(models.TransientModel): ...@@ -66,6 +73,7 @@ class ResConfigSettings(models.TransientModel):
ir_config.set_param("tt_version", self.tt_version or "") ir_config.set_param("tt_version", self.tt_version or "")
ir_config.set_param("tt_customer_id", self.tt_customer_id.id or False) ir_config.set_param("tt_customer_id", self.tt_customer_id.id or False)
ir_config.set_param("delivery_time", self.delivery_time or 80) ir_config.set_param("delivery_time", self.delivery_time or 80)
ir_config.set_param("tally_interval_time", self.tally_interval_time or 80)
ir_config.set_param("patrol_receiver_emails", self.patrol_receiver_emails or "") ir_config.set_param("patrol_receiver_emails", self.patrol_receiver_emails or "")
ir_config.set_param("patrol_sender_email", self.patrol_sender_email or "") ir_config.set_param("patrol_sender_email", self.patrol_sender_email or "")
ir_config.set_param("patrol_check_days", self.patrol_check_days or 5) ir_config.set_param("patrol_check_days", self.patrol_check_days or 5)
......
...@@ -25,6 +25,10 @@ ...@@ -25,6 +25,10 @@
<label for="tt_customer_id"/> <label for="tt_customer_id"/>
<field name="tt_customer_id"/> <field name="tt_customer_id"/>
</div> </div>
<div class="text-muted">
<label for="tally_interval_time"/>
<field name="tally_interval_time"/>
</div>
<div class="text-muted"> <div class="text-muted">
<label for="delivery_time"/> <label for="delivery_time"/>
<field name="delivery_time"/> <field name="delivery_time"/>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论