mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
fix misc,主要是so和po的仅发送操作
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
from . import controllers
|
||||
from . import models
|
||||
from . import wizard
|
||||
from .hooks import pre_init_hook
|
||||
from .hooks import post_init_hook
|
||||
from .hooks import uninstall_hook
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
{
|
||||
'name': "odooAi Common Util and Tools,欧度智能基础核心优化",
|
||||
'version': '16.24.04.18',
|
||||
'version': '16.24.08.08',
|
||||
'author': 'odooai.cn',
|
||||
'category': 'Extra tools',
|
||||
'website': 'https://www.odooai.cn',
|
||||
@@ -82,6 +82,7 @@
|
||||
],
|
||||
'data': [
|
||||
'views/ir_cron_views.xml',
|
||||
'wizard/mail_compose_message_views.xml',
|
||||
# 'report/.xml',
|
||||
],
|
||||
'qweb': [
|
||||
|
||||
@@ -1,29 +1,119 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * app_common
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Project-Id-Version: Odoo Server 16.0-20231112\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-01-08 14:28+0000\n"
|
||||
"PO-Revision-Date: 2018-01-08 14:28+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"POT-Creation-Date: 2024-08-08 14:55+0000\n"
|
||||
"PO-Revision-Date: 2024-08-08 14:55+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_common
|
||||
#. odoo-python
|
||||
#: code:addons/app_common/models/ir_mail_server.py:0
|
||||
#: code:addons/app_common/models/mail_mail.py:0
|
||||
#, python-format
|
||||
msgid "=================Email to ignore: %s"
|
||||
msgstr "=================被忽略的邮箱: %s"
|
||||
|
||||
#. module: app_common
|
||||
#: model:ir.model,name:app_common.model_base
|
||||
msgid "Base"
|
||||
msgstr "基础"
|
||||
|
||||
#. module: app_common
|
||||
#: model:ir.model,name:app_common.model_res_partner
|
||||
msgid "Contact"
|
||||
msgstr "联系人"
|
||||
|
||||
#. module: app_common
|
||||
#: model:ir.model,name:app_common.model_mail_compose_message
|
||||
msgid "Email composition wizard"
|
||||
msgstr "EMail撰写向导"
|
||||
|
||||
#. module: app_common
|
||||
#. odoo-python
|
||||
#: code:addons/app_common/models/ir_mail_server.py:0
|
||||
#, python-format
|
||||
msgid "Email to ignore: %s"
|
||||
msgstr "忽略的邮箱: %s"
|
||||
|
||||
#. module: app_common
|
||||
#: model:ir.model,name:app_common.model_ir_http
|
||||
msgid "HTTP Routing"
|
||||
msgstr "HTTP 路由"
|
||||
|
||||
#. module: app_common
|
||||
#: model:ir.model.fields,field_description:app_common.field_ir_cron__trigger_user_id
|
||||
msgid "Last Trigger User"
|
||||
msgstr "手动运行用户"
|
||||
|
||||
#. module: app_common
|
||||
#: model:ir.model.fields,field_description:app_common.field_res_users__login
|
||||
msgid "Login"
|
||||
msgstr "登录账号"
|
||||
|
||||
#. module: app_common
|
||||
#: model:ir.model,name:app_common.model_ir_mail_server
|
||||
msgid "Mail Server"
|
||||
msgstr "邮件服务器"
|
||||
|
||||
#. module: app_common
|
||||
#: model:ir.model,name:app_common.model_mail_mail
|
||||
msgid "Outgoing Mails"
|
||||
msgstr "发出邮件"
|
||||
|
||||
#. module: app_common
|
||||
#: model:ir.model,name:app_common.model_ir_cron
|
||||
msgid "Scheduled Actions"
|
||||
msgstr "安排的动作"
|
||||
|
||||
#. module: app_common
|
||||
#: model_terms:ir.ui.view,arch_db:app_common.app_mail_compose_message_form
|
||||
msgid "Send Without Mail"
|
||||
msgstr "仅改状态不发邮"
|
||||
|
||||
#. module: app_common
|
||||
#: model:ir.model.fields,field_description:app_common.field_mail_compose_message__show_send_without_mail
|
||||
msgid "Show Send Only"
|
||||
msgstr "显示只改状态"
|
||||
|
||||
#. module: app_common
|
||||
#. odoo-python
|
||||
#: code:addons/app_common/wizard/mail_compose_message.py:0
|
||||
#, python-format
|
||||
msgid "This only available in Sale Order or Purchase Order"
|
||||
msgstr "本操作只对销售订单和采购订单生效"
|
||||
|
||||
#. module: app_common
|
||||
#: model:ir.model.fields,help:app_common.field_res_users__login
|
||||
msgid "Used to log into the system"
|
||||
msgstr "用此账号名登录系统"
|
||||
|
||||
#. module: app_common
|
||||
#: model:ir.model,name:app_common.model_res_users
|
||||
msgid "User"
|
||||
msgstr "用户"
|
||||
|
||||
#. module: app_common
|
||||
#: model:ir.model,name:app_common.model_ir_ui_view
|
||||
msgid "View"
|
||||
msgstr "查看"
|
||||
|
||||
#. module: app_common
|
||||
#. odoo-python
|
||||
#: code:addons/app_common/models/ir_ui_view.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"You can Ignore this. Failed to load RelaxNG XML schema for views validation,"
|
||||
" file: %s"
|
||||
msgstr ""
|
||||
"此警告可忽略:载入文件失败 RelaxNG XML schema for views validation,"
|
||||
" 文件名: %s"
|
||||
|
||||
4
app_common/wizard/__init__.py
Normal file
4
app_common/wizard/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import mail_compose_message
|
||||
|
||||
29
app_common/wizard/mail_compose_message.py
Normal file
29
app_common/wizard/mail_compose_message.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, api, fields, _
|
||||
from odoo.exceptions import AccessError, UserError
|
||||
|
||||
|
||||
class MailComposeMessage(models.TransientModel):
|
||||
_inherit = 'mail.compose.message'
|
||||
|
||||
show_send_without_mail = fields.Boolean(string="Show Send Only", compute='_compute_show_send_without_mail')
|
||||
|
||||
@api.depends('model')
|
||||
def _compute_show_send_without_mail(self):
|
||||
show = False
|
||||
if self.model in ['sale.order', 'purchase.order']:
|
||||
order = self.env[self.model].browse(self.res_id)
|
||||
if order and order.state == 'sent':
|
||||
show = False
|
||||
elif self.env.context.get('send_rfq') or self.env.context.get('mark_so_as_sent'):
|
||||
show = True
|
||||
self.show_send_without_mail = show
|
||||
|
||||
def action_send_without_mail(self):
|
||||
# hook
|
||||
if self.model in ['sale.order', 'purchase.order']:
|
||||
pass
|
||||
else:
|
||||
raise UserError(_('This only available in Sale Order or Purchase Order'))
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
15
app_common/wizard/mail_compose_message_views.xml
Normal file
15
app_common/wizard/mail_compose_message_views.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="app_mail_compose_message_form" model="ir.ui.view">
|
||||
<field name="name">app.mail.compose.message.form</field>
|
||||
<field name="model">mail.compose.message</field>
|
||||
<field name="inherit_id" ref="mail.email_compose_message_wizard_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//footer/button[@name='action_send_mail']" position="before">
|
||||
<field name="show_send_without_mail" invisible="1"/>
|
||||
<button string="Send Without Mail" name="action_send_without_mail" type="object" class="btn-primary" data-hotkey="a"
|
||||
attrs="{'invisible': [('show_send_without_mail', '=', False)]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -41,7 +41,7 @@
|
||||
],
|
||||
'images': ['static/description/banner.png'],
|
||||
'data': [
|
||||
'views/purchase_views.xml',
|
||||
'views/purchase_order_views.xml',
|
||||
],
|
||||
|
||||
'assets': {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
{
|
||||
'name': "Advance purchase order navigator by date and vendor",
|
||||
'version': '16.24.06.15',
|
||||
'version': '16.24.08.08',
|
||||
'author': 'odooai.cn',
|
||||
'category': 'Extra tools',
|
||||
'website': 'https://www.odooai.cn',
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<field name="inherit_id" ref="purchase.view_purchase_order_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//searchpanel//field[1]" position="before">
|
||||
<field name="date_approve"/>
|
||||
<field name="date_order"/>
|
||||
</xpath>
|
||||
</field>
|
||||
@@ -18,6 +19,7 @@
|
||||
<field name="inherit_id" ref="purchase.purchase_order_view_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//searchpanel//field[@name='company_id']" position="before">
|
||||
<field name="date_approve"/>
|
||||
<field name="date_order"/>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
{
|
||||
'name': "odoo Enterprise enhance Pack,企业版界面及操作增强",
|
||||
'version': '16.24.07.17',
|
||||
'version': '16.24.08.08',
|
||||
'author': 'odooai.cn',
|
||||
'category': 'Extra tools',
|
||||
'website': 'https://www.odooai.cn',
|
||||
|
||||
@@ -14,3 +14,12 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.o_dialog_container {
|
||||
.o_form_view:not(.o_field_highlight) {
|
||||
.o_field_widget:not(.o_field_invalid):not(.o_field_highlight) .o_input:not(:hover):not(:focus) {
|
||||
--o-input-border-color: #{map-get($grays, '200')};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user