1.销售新增审核状态,选项为已审核和待审核,销售模型新增权限规则:销售总监查看所有的订单,销售经理只能查看自己的订单

2.报价单Form视图新增审核按钮,该按钮只有销售总监可以看到,且确认按钮只有在销售经理审核完才可显示,报价Tree视图新增审核状态
This commit is contained in:
jinling.yang
2023-11-23 17:28:58 +08:00
parent 5292826c72
commit 45d04e1a05
9 changed files with 197 additions and 140 deletions

View File

@@ -5,8 +5,8 @@ import os
import json
from datetime import datetime
import requests
# from OCC.Extend.DataExchange import read_step_file
# from OCC.Extend.DataExchange import write_stl_file
from OCC.Extend.DataExchange import read_step_file
from OCC.Extend.DataExchange import write_stl_file
from odoo import models, fields, api
from odoo.modules import get_resource_path
from odoo.exceptions import ValidationError, UserError
@@ -93,9 +93,9 @@ class QuickEasyOrder(models.Model):
# 将attach的datas内容转为glb文件
def transition_glb_file(self, report_path, model_code):
# shapes = read_step_file(report_path)
shapes = read_step_file(report_path)
output_file = os.path.join('/tmp', str(model_code) + '.stl')
# write_stl_file(shapes, output_file, 'binary', 0.03, 0.5)
write_stl_file(shapes, output_file, 'binary', 0.03, 0.5)
# 转化为glb
output_glb_file = os.path.join('/tmp', str(model_code) + '.glb')
util_path = get_resource_path('sf_base', 'static/util')

View File

@@ -12,6 +12,8 @@ class ReSaleOrder(models.Model):
address_of_delivery = fields.Char('交货人地址')
payments_way = fields.Selection([('现结', '现结'), ('月结', '月结')], '结算方式', default='现结', tracking=True)
pay_way = fields.Selection([('转账', '转账'), ('微信', '微信'), ('支付宝', '支付宝')], '支付方式')
check_status = fields.Selection([('unchecked', '未审核'), ('checked', '已审核')], '审核状态', default='unchecked')
payment_term_id = fields.Many2one(
comodel_name='account.payment.term',
@@ -40,6 +42,10 @@ class ReSaleOrder(models.Model):
})
return order_id
# 审核
def action_check(self):
self.check_status = 'checked'
def get_customer(self):
customer = self.env['res.partner'].search([('name', '=', '业务平台')])
if customer: