Commit 683f8149 董杰

合并分支 'dongjie0423' 到 'master'

Dongjie0423

查看合并请求 !3
2 个父辈 8fcdda3e 018e0b7f
正在显示 126 个修改的文件 包含 5237 行增加441 行删除
# -*- coding: utf-8 -*-
from . import models
from . import report
\ No newline at end of file
from . import report
from . import wizard
\ No newline at end of file
......@@ -32,5 +32,7 @@
'report/purchase_invoice_report_views.xml',
'views/base_menu.xml',
'views/report_menu.xml',
'wizard/update_date_view.xml',
],
}
\ No newline at end of file
......@@ -61,6 +61,7 @@ class AccPurchaseInvoice(models.AbstractModel):
res = {}
if len(docids)>1:
final_total = 0.0
final_residual = 0.0
po_names = ''
note_str = ''
bank_str = ''
......@@ -82,6 +83,7 @@ class AccPurchaseInvoice(models.AbstractModel):
if invoice_model.invoice_number:
invoice_str += invoice_model.invoice_number + ','
final_total += amount_total
final_residual += invoice_model.residual
res = {
'amount_total':final_total,
'po_names':po_names,
......@@ -89,7 +91,7 @@ class AccPurchaseInvoice(models.AbstractModel):
'bank_str':bank_str,
'invoice_str':invoice_str,
'today':today,
'residual':invoice_model.residual
'residual':final_residual
}
else:
po_names = ''
......
......@@ -15,7 +15,7 @@
<field name="asset_sequence"/>
<field name="acc_asset_code"/>
<field name="user_id"/>
<!-- <field name="acc_type"/> -->
<field name="acc_type"/>
<!-- <field name="minus_amount"/>
<field name="invoice_acc_total"/>
<field name="invoice_state"/> -->
......
......@@ -57,9 +57,21 @@
<!-- <xpath expr="//button[@name='action_invoice_open']" position="before">
<button name="teller_accept" string="出纳审核" type="object" states="open" class="oe_highlight" groups="acct_base.acc_account_user_group"/>
</xpath> -->
<xpath expr="//button[@name='action_invoice_sent'][1]" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//button[@name='action_invoice_sent'][2]" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//button[@name='preview_invoice']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//button[@name='action_invoice_open']" position="before">
<button name="boss_accept" string="财务审核" type="object" states="teller" class="oe_highlight" groups="acct_base.acc_account_user_group"/>
</xpath>
<xpath expr="//button[@name='action_invoice_open']" position="before">
<button name="%(update_date_wizard)d" states="open" type="action" string="更新到期日期" class="oe_highlight"/>
</xpath>
<xpath expr="//button[@name='action_invoice_open']" position="after">
<button name="add_sale_discount_line" string="添加折扣" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
</xpath>
......@@ -90,25 +102,32 @@
</tree>
</field>
<group class="oe_subtotal_footer oe_right">
<field name="invoice_acc_total" nolabel="1" widget="monetary" options="{'currency_field': 'currency_id'}" class="oe_subtotal_footer_separator" />
<field name="invoice_acc_total" nolabel="1" widget="monetary" options="{'currency_field': 'currency_id'}" class="oe_subtotal_footer_separator"/>
</group>
</page>
</xpath>
</field>
</record>
<!-- account.invoice tree视图 -->
<!-- <record model="ir.ui.view" id="account_invoice_acc_tree_view">
<field name="name">account.invoice.acc.tree</field>
<!-- 账单增加搜索条件视图 -->
<record id="acc_account_invoice_search_inherit_view" model="ir.ui.view">
<field name="name">acc.account.invoice.search</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="product.product_template_tree_view"/>
<field name="mode">primary</field>
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="internal_des"/>
<field name="partner_code"/>
<field name="product_model"/>
</field>
<xpath expr="//field[@name='user_id']" position="after">
<separator/>
<!-- <filter name="state" string="未到货" domain="[('state','=', 'draft')]"/> -->
<!-- <filter string="My Activities" name="activities_my" domain="[('activity_ids.user_id', '=', uid)]"/>
<separator/> -->
<filter string="逾期账单" name="activities_overdue" domain="[('date_due', '&lt;', context_today().strftime('%Y-%m-%d'))]"/>
<filter string="今日到期账单" name="activities_today" domain="[('date_due', '=', context_today().strftime('%Y-%m-%d'))]"/>
<filter string="本月到期账单" name="month"
domain="[('date_due','&gt;=', time.strftime('%Y-%m-01')),('date_due','&lt;', (context_today() + relativedelta(months=1)).strftime('%Y-%m-01') ) ]"/>
<!-- <filter string="Future Activities" name="activities_upcoming_all" domain="[('activity_ids.date_deadline', '&gt;', context_today().strftime('%Y-%m-%d')) ]"/> -->
</xpath>
</field>
</record> -->
</record>
</data>
</openerp>
# -*- coding: utf-8 -*-
from . import update_date
\ No newline at end of file
#coding=utf-8
from odoo import models,fields,api, _
import datetime
import logging
from odoo.exceptions import UserError, ValidationError
_logger = logging.getLogger(__name__)
class UpdateDate(models.TransientModel):
_name = "update.date"
date_due = fields.Date(string='到期日期',required=True)
@api.multi
def update_date_due(self):
date_due = self.date_due
context = dict(self._context or {})
active_id = context.get('active_id', False)
# if active_id:
# before_model = self.env['before.purchase'].browse(active_id)
# for line in before_model.order_line:
# if line.brand == brand:
# line.write()
if active_id:
active_model = self.env['account.invoice'].browse(active_id)
# cr = self.env.cr
# cr.execute("""
# UPDATE account_invoice
# SET partner_id = %s
# WHERE
# brand = '%s'
# AND order_id = %s
# """% (partner_id.id,brand,active_id)
# )
active_model.write({'date_due':date_due})
return True
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!--导数据-->
<record id="update_date_form_view" model="ir.ui.view">
<field name="name">更新账单到期日期</field>
<field name="model">update.date</field>
<field name="arch" type="xml">
<form string="updatedate">
<sheet>
<group>
<field name='date_due'/>
</group>
<footer name="codes">
<button class="oe_stat_button" name="update_date_due" string="更新" type="object"/>
</footer>
</sheet>
</form>
</field>
</record>
<record id="update_date_wizard" model="ir.actions.act_window">
<field name="name">更新到期日期</field>
<field name="res_model">update.date</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<!-- <field name="context">{"type":"vmc_watergodcard"}</field> -->
<field name="view_id" ref="update_date_form_view"/>
<field name="target">new</field>
</record>
<!-- <menuitem id="import_bom_data" name="供应商数据导入" parent="acct_data_import_menu" sequence="1" action="import_partner_data_wizard"/> -->
</data>
</odoo>
\ No newline at end of file
......@@ -26,6 +26,7 @@ class res_partner_acc(models.Model):
quality_level = fields.Selection([('0', '一般'), ('1', '低'), ('2', '高'), ('3', '非常高')], '质量评级', default='0')
price_level = fields.Selection([('0', '一般'), ('1', '低'), ('2', '高'), ('3', '非常高')], '价格评级', default='0')
acc_image = fields.Binary("营业执照", attachment=True)
customer_type = fields.Selection([('jinxiao', '经销商'), ('daili', '代理商'), ('zuizhong', '最终用户')], '类型', default='jinxiao')
# @api.model
# def create(self,vals):
......
......@@ -33,13 +33,14 @@ class AccTools(models.Model):
@smtpaddr:smtp服务地址,可以在邮箱看,比如163邮箱为smtp.163.com
@password:发信人的邮箱密码
'''
fromaddr = "notreply@acctronics.cn"
# fromaddr = "notreply@acctronics.cn"
fromaddr = "notreply@neotel.tech"
smtpaddr = "smtp.exmail.qq.com"
# toaddrs = ['jie.dong@acctronics.cn']
toaddrs = toaddrs
# subject = "最新消息"
subject = subjects
password = "Acc@041"
password = "Acc@0113"
# msg = "测试"
msg = message
mail_msg = MIMEMultipart()
......@@ -58,8 +59,8 @@ class AccTools(models.Model):
s.quit()
_logger.info("邮件发送成功")
except Exception as e:
print ("Error: unable to send email")
_logger.info("邮件发送失败")
# print ("Error: unable to send email")
_logger.info("邮件发送失败,错误信息:{}".format(e))
def get_users(self,group_name):
commerce_group = self.env['res.groups'].search([('name', '=', group_name)])
......
......@@ -149,6 +149,7 @@
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='lang']" position="after">
<field name="customer_type"/>
<field name="charge_person"/>
<field name="traffic_level" widget="priority"/>
<field name="quality_level" widget="priority"/>
......
......@@ -71,6 +71,7 @@ class AccHrExpenseSheet(models.Model):
subjects = "{}费用报销单{}审批".format(self.employee_id.name,self.name)
message = "{}的费用报销单{}需要您审批,请及时处理".format(self.employee_id.name,self.name)
self.env['acc.tools'].send_report_email(subjects,message,toaddrs)
self.env.user.notify_success(message='提交成功')
@api.multi
def approve_expense_sheets(self):
......@@ -100,6 +101,7 @@ class AccHrExpenseSheet(models.Model):
subjects = "{}费用报销单{}审批".format(self.employee_id.name,self.name)
message = "{}的费用报销单{}管理部已批准,请及时处理".format(self.employee_id.name,self.name)
self.env['acc.tools'].send_report_email(subjects,message,toaddrs)
self.env.user.notify_success(message='审核成功')
return True
def save_exel(self, header, body, file_name):
......
......@@ -51,7 +51,7 @@ class AccMrpBom(models.Model):
# group_name = '商务部员工'
# create_user_id = self._uid
# luna.zhang@neotel-technology.com
toaddrs = ['coco.ma@neotel-technology.com','jie.dong@neotel-technology.com','yi.wang@neotel-technology.com','cissy.shen@neotel-technology.com']
toaddrs = ['xue.zhang@neotel.tech','jie.dong@neotel-technology.com','yi.wang@neotel-technology.com','cissy.shen@neotel-technology.com']
# toaddrs = ['jie.dong@neotel-technology.com']
subjects = "物料清单{}{}已创建".format(res.product_tmpl_id.name,res.code)
message = "物料清单{}{}已创建请及时查看".format(res.product_tmpl_id.name,res.code)
......
......@@ -48,6 +48,7 @@ class CFTemplateCategory(models.Model):
('done', 'Locked'),
('cancel', 'Cancelled')
], string='Status', readonly=True, index=True, copy=False, default='draft', track_visibility='onchange')
color = fields.Integer(string='Color Index')
crm_ponumber = fields.Char(string=u'老采购单号',readonly=True)
charge_person = fields.Many2one('res.users',string=u'负责人',default=lambda self: self.env.user.id,required=True)
traffic_rule = fields.Char(string=u'运输条款',required=True)
......@@ -168,6 +169,7 @@ class CFTemplateCategory(models.Model):
# toaddrs = []
# toaddrs.append(self.manage_user.login)
toaddrs = ['cissy.shen@neotel-technology.com']
# toaddrs = ['fiona.wu@neotel-technology.com']
# toaddrs = ['jie.dong@acctronics.cn']
subjects = "采购单{}需要您审批,请及时处理".format(self.name)
message = "采购单{}<br><br>标题:{}<br><br>供应商:{}<br><br>支付条款:{}<br><br>总价:{}<br><br><br>需要您审批,请及时处理<br><br><br>谢谢".format(self.name,self.title,self.partner_id.name,self.payment_rule,self.amount_total)
......@@ -376,19 +378,17 @@ class CFTemplateCategory(models.Model):
@api.multi
def write(self, vals):
# if self.purchase_type == 'office':
# self.check_office_price(vals)
if vals.get('minus_amount'):
amount = self.amount_untaxed + self.amount_tax - vals.get('minus_amount', 0)
vals.update({
"amount_total": amount
})
if vals.get('discount_rate'):
rate_amount = self.amount_untaxed * vals.get('discount_rate')/100
amount = self.amount_untaxed + self.amount_tax - rate_amount
vals.update({
"amount_total": amount
})
# if vals.get('discount_rate'):
# rate_amount = self.amount_untaxed * vals.get('discount_rate')/100
# amount = self.amount_untaxed + self.amount_tax - rate_amount
# vals.update({
# "amount_total": amount
# })
res = super(CFTemplateCategory, self).write(vals)
return res
......@@ -592,6 +592,18 @@ class CFTemplateCategory(models.Model):
sheet.write(n, j, body[i][j])
wbk.save(file_name) ##该文件名必须存在
@api.multi
def check_before_qty(self):
for line in self.order_line:
b_line = self.env['before.purchase.line'].search([('order_id', '=', self.before_purchase_id.id),('product_id', '=', line.product_id.id)])
if len(b_line) == 1:
b_qty = b_line.qty
line.update({'product_qty':b_qty})
else:
raise ValidationError(u'待确认询价单明细行该编码产品“{}”不存在或存在多条该编码明细行'.format(line.acc_code))
return True
def export_record(self,file_name):
"""
导出采购单信息
......@@ -615,6 +627,8 @@ class CFTemplateCategory(models.Model):
pt.acc_code AS acc_code,
pt.partner_code AS partner_code,
pt.product_model AS product_model,
pt.acc_purchase_price AS price,
pt.product_describe_cn AS describe,
pol.product_qty AS qty,
rp. NAME AS supplier,
pol.forcast_date AS forcast_date
......@@ -647,8 +661,10 @@ class CFTemplateCategory(models.Model):
detail_list_first.append(line.get('acc_code'))
detail_list_first.append(line.get('partner_code'))
detail_list_first.append(line.get('product_model'))
detail_list_first.append(line.get('price'))
detail_list_first.append(line.get('qty'))
detail_list_first.append(line.get('supplier'))
detail_list_first.append(line.get('describe'))
if line.get('forcast_date'):
detail_list_first.append(line.get('forcast_date').strftime("%Y-%m-%d"))
else:
......@@ -656,10 +672,10 @@ class CFTemplateCategory(models.Model):
detail_list_all.append(detail_list_first)
dir_path = os.path.join(file_url, 'Administrator')
filename = "{}.xls".format('询价单明细表')
filename = "{}明细表.xls".format(self.name)
file_path = os.path.join(dir_path, filename)
check_path(file_path)
head = ['序号', '负责人','单号','标题','品牌','产品名称','产品编码','供应商编码','产品型号','数量','供应商','预计到货日期']
head = ['序号', '负责人','单号','标题','品牌','产品名称','产品编码','供应商编码','产品型号','价格','数量','供应商','中文描述','预计到货日期']
self.save_exel(head, detail_list_all, file_path)
return self.export_record(file_path)
......
......@@ -4,6 +4,7 @@ from odoo import fields, models, api, http, _
from odoo.addons import decimal_precision as dp
from odoo.http import request
from odoo.exceptions import UserError, ValidationError
import random
class BeforePurchase(models.Model):
"""
......@@ -30,6 +31,8 @@ class BeforePurchase(models.Model):
charge_person = fields.Many2one('res.users',string='采购负责人')
gen_datetime = fields.Datetime(string='生成时间',default=lambda self: fields.Datetime.now(),)
po_number = fields.Text(string='关联的采购单',readonly=True)
color = fields.Integer(string='颜色')
purchase_order_ids = fields.Many2many('purchase.order','before_purchase_rel','before_id','purchase_id',string='关联采购单',readonly=True)
purchase_company = fields.Many2one('acc.company',string='采购公司',required=True)
delivery_address = fields.Many2one('delivery.address',string='交货地址')
state = fields.Selection([('draft', '待确认'), ('done', '已确认'),('cancel', '已取消')], '状态', default='draft',track_visibility='onchange')
......@@ -76,6 +79,7 @@ class BeforePurchase(models.Model):
}
res_line = [(0,0,line_vals)]
po_vals = {
'color':random.randint(1, 12),
'partner_id':line.partner_id.id,
'title':self.name,
'before_purchase_id':self.id,
......@@ -93,7 +97,8 @@ class BeforePurchase(models.Model):
}
if not exits_order:
po_obj = self.env['purchase.order'].create(po_vals)
self.add_ponumber(po_obj)
# self.add_ponumber(po_obj)
self.add_ponumbers(po_obj)
if exits_order:
exits_order.write({'order_line':res_line})
# self.write({'purchase_date':fields.Datetime.now(),'is_purchasing':True})
......@@ -132,6 +137,12 @@ class BeforePurchase(models.Model):
sale_order.write({'po_number':new_po_name})
self.write({'po_number':new_po_name})
@api.multi
def add_ponumbers(self,pobj):
po_id = pobj.id
self.purchase_order_ids = [(4,po_id)]
return True
def merge_before_line(self):
order_id = self.id
......@@ -188,6 +199,7 @@ class BeforePurchase(models.Model):
# return self.message_post(body=merge_tips, subject=subject)
return True
class BeforePurchaseLine(models.Model):
_name = 'before.purchase.line'
_description = " 待确认询价单明细"
......
......@@ -76,12 +76,12 @@
<br/>
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<th colspan="10" class="text-center">
<th colspan="11" class="text-center">
<strong><span t-field="o.purchase_company.name"/></strong>
</th>
</tr>
<tr>
<th colspan="10" class="text-center">
<th colspan="11" class="text-center">
<strong>采 购 合 同</strong>
</th>
</tr>
......@@ -89,7 +89,7 @@
<td colspan="5" class="text-center">
合同编号:<span t-field="o.name"/>
</td>
<td colspan="5" class="text-center">
<td colspan="6" class="text-center">
下单日期:<span t-field="o.gen_date"/>
</td>
</tr>
......@@ -103,7 +103,7 @@
<td colspan="2" class="text-center">
乙方(卖方)
</td>
<td colspan="3" class="text-center">
<td colspan="4" class="text-center">
<span t-field="o.partner_id.name"/>
</td>
</tr>
......@@ -117,7 +117,7 @@
<td colspan="2" class="text-center">
乙方联系人
</td>
<td colspan="3" class="text-center">
<td colspan="4" class="text-center">
<span t-field="o.contact_id.name"/>
</td>
</tr>
......@@ -131,12 +131,12 @@
<td colspan="2" class="text-center">
乙方电话:
</td>
<td colspan="3" class="text-center">
<td colspan="4" class="text-center">
<span t-field="o.contact_id.mobile"/>
</td>
</tr>
<tr>
<td colspan="10" class="text-left">
<td colspan="11" class="text-left">
甲方向乙方订购以下产品,请按照要求货期准时送货。
</td>
</tr>
......@@ -150,25 +150,28 @@
<th style="width:9%;">
名称
</th>
<th style="width:9%;">
<th style="width:11%;">
规格型号
</th>
<th style="width:8%;">
<th style="width:7%;">
供应商编号
</th>
<th style="width:20%;">
<th style="width:16%;">
描述
</th>
<th style="width:8%;">
<th style="width:7%;">
品牌
</th>
<th style="width:7%;">
数量
</th>
<th style="width:5%;">
单位
</th>
<th style="width:9%;">
单价
</th>
<th style="width:10%;">
<th style="width:9%;">
金额小计
</th>
<th style="width:15%;">
......@@ -194,16 +197,15 @@
<td class="text-center">
<span t-field="line.product_id.product_tmpl_id.product_describe_cn"/>
</td>
<td class="text-center">
<span t-field="line.product_id.product_tmpl_id.brand"/>
</td>
<td class="text-center">
<span t-esc="'{:,}'.format(int(line.product_qty))"/>
</td>
<!-- <td class="text-center">
<span t-field="line.product_uom.name" groups="product.group_uom"/>
</td> -->
<td class="text-center">
<span t-field="line.product_id.product_tmpl_id.uom_po_id"/>
</td>
<td class="text-center">
<span t-field="line.price_unit" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
......@@ -219,7 +221,7 @@
</td>
</tr>
<tr>
<td colspan="10" class="text-left">
<td colspan="11" class="text-left">
备注:<span t-field="o.notes"/>
</td>
<!-- <th colspan="1">
......@@ -265,8 +267,9 @@
</p>
<p>
五、产品验收:
<p style="text-indent:2em;">1、甲方应在收到乙方产品之日起7日内进行验收。</p>
<p style="text-indent:2em;">1、甲方应在收到乙方产品之日起7日内进行验收,甲方的验收不免除乙方的质量保证责任</p>
<p style="text-indent:2em;">2、若甲方验收时发现产品存在质量、包装、损坏等问题,或乙方未按合同约定提供相应产品的,有权要求乙方更换,因此产生的额外费用由乙方承担。</p>
<p style="text-indent:2em;">3、乙方应当严格按照本订单约定交期向甲方交付产品,未经甲方提前书面同意,不得迟延、提前或分批交付。乙方逾期交付产品的,应当按照订单金额的3‰/日向甲方支付逾期违约金了,且甲方有权解除订单,甲方解除订单的,乙方应按照订单金额的30%向甲方承担违约责任,不足以弥补甲方的损失的(包括但不限于甲方因此向甲方客户承担的逾期违约责任、从第三方购买替代品所产生的额外费用等),乙方应当补足。</p>
</p>
<p>
......@@ -280,10 +283,12 @@
</p>
<p>
七、质量保证:
<p style="text-indent:2em;">1、验货标准,按照相应运营商产品规格及质量进行验货。乙方应当提供产品规格及质量标准供甲方参考。</p>
<p style="text-indent:2em;">2、产品的使用期质保期:乙方产品的使用期为1年,自收货日期开始计算。</p>
<p style="text-indent:2em;">3、若在使用期内产品出现损坏或无法正常使用,甲方有权要求乙方更换,因此产生的额外费用由乙方承担。</p>
<p style="text-indent:2em;">4、本次生产的产品必需与运营商样品质量一致。</p>
<p style="text-indent:2em;">1、质量标准:国家标准、行业标准、原厂标准及双方约定的其他标准。卖方提供的产品应当是全新原包装正品,产品到买方指定交货地点时剩余的有效期应大于全部有效期的75%。甲方不得隐瞒、改造、变造产品信息(包括但不限于品牌、原料、产地、生产厂商、生产日期、有效日期等)。乙方对于质量保证及保修的承诺对象不仅限于甲方,在甲方有要求时,乙方同意为甲方的客户、最终客户或其他第三方提供本协议所述之保证及服务;乙方接到质保/保修要求的,应当在12个小时内响应并处理</p>
<p style="text-indent:2em;"> 2.乙方应当向甲方主动、如实披露所有产品的信息,包括但不限于生厂商、货权、授权情况、有效期等,乙方不得向甲方交付不符合甲方要求的产品或违反乙方自身有义务遵守的货源渠道规则的产品。乙方交付的产品不符合订单规定的,乙方应向甲方退还全部货款,并承担订单金额的100%作为违约,并由乙方根据甲方的指示负责包换、保修或退货,并承担因此产生的费用。</p>
<p style="text-indent:2em;">3.乙方向甲方交付重大瑕疵产品的(包括但不限于假货、已使用、翻新、变造、替换零部件、伪造贴标/铭牌,或以买多发少、买高价发低价产品、以次充好、无交易有结算、滥用或泄漏甲方客户信息等不正当手段损害甲方或甲方客户利益的),乙方应当按照 违约订单商品数量乘以甲方向终端客户销售该产品的单价计算所得)总价的十倍进行赔偿,并承担甲方采取补救措施所支出的必要费用,包括但不限于向甲方客户赔偿的费用等。</p>
<p style="text-indent:2em;">4.除上述约定外,乙方违反/不履行本订单其他条款或因乙方提供的产品造成甲方损失的,由乙方承担所有损失(包括但不限于人工费、运输费、包装费、挑拣费、返修费、重置费、报废损失、客户索赔、人身伤害等赔偿);任何情况下赔偿金额无法计算或低于订单总金额30%的,乙方按照订单总金额的30%承担违约金。</p>
<p style="text-indent:2em;">5、产品的质保期:乙方产品的质保期为【1】年,自验收日起开始计算。</p>
<p style="text-indent:2em;">6、若在质保期内产品出现损坏或无法正常使用,甲方有权要求乙方更换,因此产生的额外费用由乙方承担。维修二次及二次以上或更换后仍无法正常使用或产品出现损坏的,甲方有权要求退货并取消订单,由此所产生的损失及费用由乙方承担(包括律师费、调查费、诉讼仲裁费、差旅费、诉讼保全担保费用等)。</p>
</p>
<p>
八、发货时间:
......@@ -295,22 +300,25 @@
</p>
<p>
十、违约责任:
<p style="text-indent:2em;">1、甲方逾期付款,每逾期一日需支付乙方合同金额1‰的违约金,逾期超过五日,乙方有权单方解除合同。</p>
<p style="text-indent:2em;">2、乙方逾期发货的,每逾期一日需支付甲方合同金额1%的违约金,逾期超过五日,甲方有权单方解除合同。</p>
<p style="text-indent:2em;">乙方逾期发货的,每逾期一日需支付甲方合同金额1%的违约金,逾期超过三十日,甲方有权单方解除合同。</p>
</p>
<p>
十一、合同效力:
十一、保密协议:
<p style="text-indent:2em;">1、除非为本订单所必须,乙方对因本订单的履行而获知的另一方的商业秘密、技术信息等以及本订单内容和订单签订过程的一切细节信息均负有保密义务,不得向任何第三方泄露,但中国现行法律另有规定或经另一方书面同意的除外。</p>
</p>
<p>
十二、合同效力:
<p style="text-indent:2em;">1、本合同自双方代表签字并加盖公司公章或合同专用章后生效;</p>
<p style="text-indent:2em;">2、双方未约定内容可另行签署补充协议作为本合同附件,与本协议效力相同。</p>
</p>
<p>
、争议解决
、争议解决
<p style="text-indent:2em;">因履行本合同发生争议,由当事人协商解决,协商不成的,可依法向甲方所在地人民法院提起诉讼。</p>
</p>
<p>
、本合同一式两份,双方各执一份,效力相同。
、本合同一式两份,双方各执一份,效力相同。
</p>
</div>
<div class="row unovo-report-purchase-footer">
......
......@@ -39,6 +39,7 @@
<button name="%(purchase_separate_wizard)d" type="action" states="purchase" string="分批账单" class="oe_highlight" groups="purchase.group_purchase_user"/>
<button name="update_newinfo" string="更新产品信息" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
<button name="fresh_merge_line" string="合并重复产品" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
<button name="check_before_qty" string="数量校对" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
<button name="confirm" string="提交审批" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
<button name="pomanager" string="采购经理审批" type="object" states="confirm" class="oe_highlight" groups="acct_base.acc_commerce_manager_group"/>
<button name="boss_accept" string="管理部审批" type="object" states="pomanager" class="oe_highlight" groups="acct_base.acc_manage_info_group"/>
......
......@@ -26,7 +26,8 @@
<field name="sale_order_id" readonly="1"/>
<field name="demand_purchase_id" readonly="1"/>
<field name="is_excipients" readonly="1"/>
<field name="po_number" />
<!-- <field name="po_number" /> -->
<field name="purchase_order_ids" widget="many2many_tags" options="{'color_field': 'color','no_create_edit': True}"/>
<field name="delivery_address"/>
</group>
<group>
......
......@@ -86,31 +86,30 @@ class AccCrmLead(models.Model):
@api.model
def create(self,vals):
res = super(AccCrmLead, self).create(vals)
if vals.get('user_id'):
toaddrs = []
toaddrs.append(res.user_id.login)
toaddrs.append(self.env['res.users'].browse(self._uid).login)
# toaddrs = ['jie.dong@neotel-technology.com']
subjects = "商机{}创建".format(res.name)
message = "商机“{}”,关联客户“{}”,销售员“{}”,已在系统创建,详细信息请在erp系统中查看".format(res.name,res.partner_id.name,res.user_id.partner_id.name)
self.env['acc.tools'].send_report_email(subjects,message,toaddrs)
# create = True
self.sent(vals,res,create=True)
# if vals.get('user_id'):
# toaddrs = []
# toaddrs.append(res.user_id.login)
# toaddrs.append(self.env['res.users'].browse(self._uid).login)
# # toaddrs = ['jie.dong@neotel-technology.com']
# subjects = "商机{}创建".format(res.name)
# message = "商机“{}”,关联客户“{}”,销售员“{}”,已在系统创建,详细信息请在erp系统中查看".format(res.name,res.partner_id.name,res.user_id.partner_id.name)
# self.env['acc.tools'].send_report_email(subjects,message,toaddrs)
# # create = True
# self.sent(vals,res,create=True)
return res
@api.multi
def write(self, vals):
# _logger.debug('===========%s===============',res)
if vals.get('user_id'):
changeuser = self.env['res.users'].browse(vals.get('user_id'))
toaddrs = []
toaddrs.append(changeuser.login)
toaddrs.append(self.env['res.users'].browse(self._uid).login)
# toaddrs = ['jie.dong@neotel-technology.com']
# subjects = "采购单{}管理部已审批完成,请及时确认".format(self.name)
# message = "采购单{}<br><br>标题:{}<br><br>供应商:{}<br><br>支付条款:{}<br><br>总价:{}<br><br><br>管理部审批完成,请及时处理<br><br><br>谢谢".format(self.name,self.title,self.partner_id.name,self.payment_rule,self.amount_total)
subjects = "商机{}变更提醒".format(self.name)
message = "商机“{}”,关联客户“{}”,销售员已变更为“{}”,详细信息请在erp系统中查看".format(self.name,self.partner_id.name,changeuser.partner_id.name)
message = "关联客户名称:{}<br><br>联系人名称:{}<br><br>电话:{}<br><br>手机:{}<br><br>邮箱:{}<br><br>销售员:{}".format(self.partner_id.name,self.contact_id.name,self.contact_id.phone,self.contact_id.mobile,self.contact_id.email,changeuser.partner_id.name)
self.env['acc.tools'].send_report_email(subjects,message,toaddrs)
# create = False
self.sent(vals,res=True,create=False)
res = super(AccCrmLead, self).write(vals)
return res
......
......@@ -89,6 +89,7 @@ class AccSaleOrder(models.Model):
po_number = fields.Char(string='关联的采购单',readonly=True,copy=False)
before_purchase_id = fields.Many2one('before.purchase',string='待确认生成询价单',copy=False)
origin_sale_order_id = fields.Many2one('sale.order',string='源销售单',copy=False)
sale_order_id = fields.Many2one('sale.order',string='借用销售订单',copy=False)
acc_quotation_id = fields.Many2one('acc.quotation',string='关联报价单',copy=False)
quo_amount_untaxed = fields.Float(string='未含税金额', store=True, readonly=True, compute='_amount_quo_all', track_visibility='always')
quo_amount_tax = fields.Float(string='税', store=True, readonly=True, compute='_amount_quo_all')
......@@ -164,6 +165,7 @@ class AccSaleOrder(models.Model):
pass
else:
order.send_status = 'no'
else:
if order.send_status == 'part':
pass
......@@ -341,7 +343,7 @@ class AccSaleOrder(models.Model):
po_name = self.get_poname(p)
p_str = '物料名称:' + p['product_id'] + ' ' + '型号:' + p['product_model'] + ' ' + '品牌:' + p['brand'] + ' ' + '编码:' + p['acc_code'] + ' ' + '移除数量:' + str(p['qty']) + '采购单号:' + po_name + '<br>'
remove_products.append(p_str)
toaddrs = ['luna.zhang@neotel-technology.com','coco.ma@neotel-technology.com','fiona.wu@neotel-technology.com']
toaddrs = ['luna.zhang@neotel-technology.com','xue.zhang@neotel.tech','fiona.wu@neotel-technology.com','tina.dong@neotel.tech']
toaddrs.append(self.purchase_charge_person.login)
# toaddrs = ['jie.dong@acctronics.cn']
subjects = "源单据{}所申请物料清单有变动,请及时处理".format(self.name)
......@@ -372,7 +374,7 @@ class AccSaleOrder(models.Model):
'order_line':new_res_line
}
bp_obj = self.env['before.purchase'].create(vals)
toaddrs = ['luna.zhang@neotel-technology.com','coco@neotel-technology.com']
toaddrs = ['luna.zhang@neotel-technology.com','xue.zhang@neotel.tech']
# toaddrs.append(bp_obj.charge_person.login)
subjects = "待确认询价单{}".format(bp_obj.name)
message = "待确认询价单{}已生成,请及时处理".format(bp_obj.name)
......@@ -384,6 +386,7 @@ class AccSaleOrder(models.Model):
# for remove_id in remove_ids:
# 删除的东西怎么处理?
self.change_bom_record()
self.env.user.notify_success(message='变更成功')
# self.write({'before_purchase_id':bp_obj.id})
#
#
......@@ -510,6 +513,53 @@ class AccSaleOrder(models.Model):
message = "待确认询价单{}已生成,请及时处理".format(bp_obj.name)
self.env['acc.tools'].send_report_email(subjects,message,toaddrs)
return True
# def log_field(self):
# 额外重新生成待确认询价单流程
@api.multi
def re_create_before_po(self,sale_order_id,product,qty):
res_line = []
mrp_bom = self.env['mrp.bom'].search([('product_tmpl_id', '=', product.product_tmpl_id.id),('active', '=', True)])
if mrp_bom:
mrp_vals = self.make_mrp_vals(mrp_bom,qty)
res_line += mrp_vals
vals = {
'sale_order_id':sale_order_id.id,
'charge_person':self.purchase_charge_person.id,
'delivery_address':self.delivery_address.id,
'purchase_company':self.sale_company.id,
'order_line':res_line
}
bp_obj = self.env['before.purchase'].create(vals)
self.write({'before_purchase_id':bp_obj.id})
toaddrs = []
toaddrs.append(bp_obj.charge_person.login)
subjects = "待确认询价单{}".format(bp_obj.name)
message = "待确认询价单{}已生成,请及时处理".format(bp_obj.name)
self.env['acc.tools'].send_report_email(subjects,message,toaddrs)
body = "重新生成待确认询价单: %s" % (bp_obj.name)
sale_order_id.message_post(body=body, message_type='comment')
return True
@api.multi
def make_sale_purchase(self,sent_product,sale_order_id):
for product in sent_product:
mrp_production = self.env['mrp.production'].search([('product_id', '=', product.id),('origin', '=', sale_order_id.name)])
if mrp_production:
done_qty = sum([m.qty_done for m in mrp_production.finished_move_line_ids])
trans_qty = self.env['sale.order.line'].search([('order_id', '=', self.id),('product_id', '=', product.id)]).product_uom_qty
if trans_qty > done_qty:
raise ValidationError('借用数量超过借用销售订单的<{}>生产完成数量!!'.format(product.product_tmpl_id.name))
else:
self.re_create_before_po(sale_order_id,product,trans_qty)
new_mrp_production = self.env['mrp.production'].search([('product_id', '=', product.id),('origin', '=', self.name)])
new_mrp_production.write({'origin':sale_order_id.name})
body = "重新生成生产单: %s" % (new_mrp_production.name)
sale_order_id.message_post(body=body, message_type='comment')
else:
raise ValidationError('未找到借用销售单关联的生产单!!')
@api.multi
......@@ -517,6 +567,19 @@ class AccSaleOrder(models.Model):
res = super(AccSaleOrder, self).action_confirm()
if self.is_makepo == True:
self.create_before_po()
sale_order_id = self.sale_order_id
if sale_order_id:
move_product_ids = []
sale_product_ids = []
for move_line in self.sale_order_id.order_line:
move_product_ids.append(move_line.product_id)
for sale_line in self.order_line:
sale_product_ids.append(sale_line.product_id)
sent_product = [x for x in move_product_ids if x in sale_product_ids]
if sent_product:
self.make_sale_purchase(sent_product,sale_order_id)
else:
raise ValidationError('借用销售单中不存在要借用产品,请确认')
return res
@api.multi
......@@ -534,6 +597,7 @@ class AccSaleOrder(models.Model):
subjects = "销售单{}已提交需要您确认,请及时处理".format(self.name)
message = "销售单{}已提交需要您确认,请及时处理".format(self.name)
self.env['acc.tools'].send_report_email(subjects,message,toaddrs)
self.env.user.notify_success(message='提交成功')
return True
# @api.multi
......@@ -698,6 +762,8 @@ class AccQuotation(models.Model):
crm_lead_id = fields.Many2one('crm.lead',string='商机',readonly=True)
# is_makepo = fields.Boolean(string='是否生成采购单',default=True)
purchase_charge_person = fields.Many2one('res.users',string='采购负责人',required=True)
note1 = fields.Char(string='附注1',placeholder="填写格式如: 以上价格为人民币价格,含13.0%增值税")
note4 = fields.Char(string='备注')
# is_purchasing = fields.Boolean(string='是否开始采购',readonly=True)
# purchase_date = fields.Datetime(string='开始采购时间',readonly=True)
# is_send = fields.Boolean(string='是否发货',readonly=True)
......
......@@ -194,6 +194,15 @@
<table cellspacing="3" style="width:20%;" align="right">
<tr>
<th>
税金(<span t-field="o.pricelist_id.currency_id.name"/>)
</th>
<td>
<!-- <span t-esc="o.amount_total - o.discount_amount - o.ship_fee" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> -->
<span t-esc="o.amount_tax" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<tr>
<th>
合计(<span t-field="o.pricelist_id.currency_id.name"/>)
</th>
<td>
......
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="acct_report_quotation">
<template id="acct_report_quotation">
<t t-call="web.basic_layout">
<t t-foreach="docs" t-as="o">
<style tyle="text/css">
.unovo-report-purchase-title {
<style type="text/css">
.unovo-report-purchase-title {
font-family:"DengXian";
font-size: 25px;
font-weight: bold;
text-align:center;
line-height:40px;
}
.unovo-report-purchase-header {
font-family:"DengXian";
line-height:22px;
font-size:16px;
text-align:right;
}
.unovo-report-purchase-name{
font-family:"DengXian";
font-size: 25px;
font-weight: bold;
text-align:center;
line-height:40px;
}
.unovo-report-purchase-header {
font-family:"DengXian";
line-height:22px;
font-size:16px;
text-align:right;
}
.unovo-report-purchase-table {
}
.unovo-report-purchase-table {
vertical-align: middle;
font-family:"DengXian";
border:1px solid #ccc;
width:100%;
border-collapse:collapse;
border:1px solid #ccc;
background:#FFF
}
.unovo-report-purchase-table th{
font-weight:bold;
text-align:left;
height:20px;
font-size:14px;
border:1px solid #ccc;
}
.unovo-report-purchase-table td{
height:20px;
font-size:14px;
border:1px solid #ccc;
background:#FFF;
text-align: left;
}
.unovo-report-purchase-table p {
margin:5px 0px;
}
.unovo-report-purchase-total {
line-height:20px;
font-size:16px;
}
.unovo-report-purchase-content {
font-family:"DengXian";
line-height:22px;
font-size:16px;
}
.unovo-report-purchase-address {
font-size: 14px;margin: 7px 0 35px;
font-family:"DengXian";
font-size:14px;
}
.unovo-report-purchase-content p {
margin:5px 0px;
}
.unovo-report-purchase-footer {
font-family:"DengXian";
line-height:22px;
font-size:16px;
}
.unovo-report-purchase-about{
vertical-align: middle;
font-family:"DengXian";
border:1px solid #ccc;
width:100%;
border-collapse:collapse;
border:1px solid #ccc;
background:#FFF
}
.unovo-report-purchase-table th{
font-weight:bold;
text-align:center;
height:20px;
font-size:16px;
border:1px solid #ccc;
}
.unovo-report-purchase-table td{
height:20px;
font-size:16px;
border:1px solid #ccc;
background:#FFF
text-align: center;
}
.unovo-report-purchase-table p {
margin:5px 0px;
}
.unovo-report-purchase-total {
line-height:20px;
font-size:16px;
}
.unovo-report-purchase-content {
font-family:"DengXian";
line-height:22px;
font-size:16px;
}
.unovo-report-purchase-content p {
margin:5px 0px;
}
.unovo-report-purchase-footer {
font-family:"DengXian";
line-height:22px;
font-size:16px;
}
background:#FFF;
font-size: 14px;
}
.new-page-css{
min-width: 600px;
padding: 0 20px;
}
.title_position{
min-width: 80px;
text-align: left;position: relative;
}
.quotationcss{
max-height: 70px;position: absolute;right: 0;bottom: -15px;font-size: 30px;
}
.unovo-report-purchase-footer .text_right{
width: 100%;text-align: right;
}
.text_linehaight{
padding: 0 5px;line-height: 22px;
}
.font14{
font-size: 14px;
}
.padd5{
padding: 0 5px;
}
.connaction{
display: inline-block;width: 20%;margin-left: 10%;
}
.xcode{
display: inline-block;position: absolute;bottom: -5px;right:40px;
}
.imgCss{
max-height: 110px;width:170px
}
.total-css{
min-width:170px;font-size: 14px;
}
.interested-css{
width: 70%;background:#f8f8f8;border: 1px solid #f2f2f2;text-align:center;padding: 5px 0;
}
.weixinCss{
width: 125px;
padding:10px;
background:#f8f8f8 !important;border: 1px solid #f2f2f2 !important;
}
.text_indent{
text-indent:2em;
}
.code2{
max-height: 104px;width:104px
}
</style>
<div class="page">
<div class="page new-page-css">
<!-- <div class="header">
<div class="row">
<div class="col-xs-3">
......@@ -70,165 +137,138 @@
</div>
</div>
</div> -->
<div class="row unovo-report-purchase-title">
<div class="col-xs-6" style="width: 50%;text-align: left;">
<div class="" style="position: absolute;">
<!-- <img t-att-src="'data:image/jpg;base64,%s' % o.purchase_company.logo" style="max-height: 45px;"/> -->
<img t-att-src="'data:image/png;base64,%s' % logo" style="max-height: 110px;width:170px"/>
</div>
<div class="col-xs-6" style="width: 50%;text-align: right;color:#3d85c6;">
<strong style="max-height: 70px;width:250px">QUOTATION</strong>
</div>
<!-- <img class="imgCss" src="./image001.png"/> -->
</div>
<div class="row unovo-report-purchase-footer">
<div class="col-xs-6" style="width: 100%;text-align: right;">
<p>报价单编号:<span t-field="o.name"/></p>
<div class="row unovo-report-purchase-footer" style="padding-top: 50px;">
<div class="col-xs-6 text_right">
<strong style="font-size: 25px;">QUOTATION</strong>
<div>报价单编号:<span t-field="o.name"/></div>
</div>
</div>
<br/>
<div class="unovo-report-purchase-title"><span t-field="o.sale_company.name"/></div>
<div class="unovo-report-purchase-content">
<p>
<p>全国免费电话:400-088-1622</p>
<p>上海市闵行区联航路1588号中心大道西路18号楼 邮编:201112</p>
<p>电话:+86-21-62208085 +86-21-62208090 传真:+86-21-51026636</p>
</p>
<div class="unovo-report-purchase-name"><span t-field="o.sale_company.name"/></div>
<div class="unovo-report-purchase-address ">
<div>
<div> <a href="WWW.NEOTEL-TECHNOLOGY.COM">WWW.NEOTEL-TECHNOLOGY.COM</a></div>
<div style="margin-top:5px;">全国免费电话:400-088-1622</div>
<div style="margin-top:25px;">上海:上海市闵行区联航路1588号中心大道西路18号楼 邮编:201112</div>
<div style="margin-top:5px;">苏州:苏州市工业园区归家巷48号1幢101室 邮编:215021</div>
</div>
</div>
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<th class="text-center" >
<strong>报价日期</strong>
<th class="padd5" style="width: 18%;">
<strong class="font14" >报价日期</strong>
</th>
<th class="text-center" >
<strong>公司名称</strong>
<th class="padd5" style="width: 30%;">
<strong class="font14" >公司名称</strong>
</th>
<th class="text-center" >
<strong>联系人</strong>
<th class="padd5" style="width: 11%;">
<strong class="font14" >联系人</strong>
</th>
<th class="text-center">
<strong>电话</strong>
<th class="padd5" style="width: 20%;">
<strong class="font14" >电话</strong>
</th>
<th class="text-center">
<strong>运输</strong>
<th class="padd5" style="width: 10%;">
<strong class="font14">运输</strong>
</th>
<th class="text-center">
<strong>交货期</strong>
<th class="padd5" style="width: 10%;">
<strong class="font14">交货期</strong>
</th>
</tr>
<tr>
<td class="text-center">
<span t-field="o.last_date"/>
<td class="text_linehaight">
<span t-field="o.last_date" />
</td>
<td class="text-center">
<span t-field="o.partner_id.name"/>
<td class="text_linehaight">
<span t-field="o.partner_id.name" />
</td>
<td class="text-center">
<td class="text_linehaight">
<span t-esc="o.contact_id.name"/>
</td>
<td class="text-center">
<span t-field="o.contact_id.phone"/>
<td class="text_linehaight">
<span t-field="o.contact_id.phone" />
</td>
<td class="text-center">
<td class="text_linehaight">
<span t-field="o.transaction_mode.name"/>
</td>
<td class="text-center">
<td class="text_linehaight">
<span t-field="o.delivery_time"/>
</td>
</tr>
</table>
<br/>
<br/>
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<th class="text-center">
<strong>负责人</strong>
</th>
<th class="text-center" >
<strong>联系方式</strong>
</th>
<th class="text-center" >
<strong>邮箱</strong>
</th>
</tr>
<tr>
<td class="text-center">
<span t-field="o.user_id.name"/>
</td>
<td class="text-center">
<span t-field="o.user_id.phone"/>
</td>
<td class="text-center">
<span t-field="o.user_id.email"/>
</td>
</tr>
</table>
<br/>
<br/>
<div class="unovo-report-purchase-content">
<div class="unovo-report-purchase-content" style="padding:10px 0;">
<p>
报价产品信息:
<strong class="font14">报价内容:</strong>
</p>
</div>
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<th class="text-center" style="width:15%;">
<strong>产品编码</strong>
<th class="padd5" style="width: 15%;">
<strong class="font14">产品型号</strong>
</th>
<th class="text-center" style="width:15%;">
<strong>产品名称</strong>
<th class="padd5" style="width: 15%;">
<strong class="font14">产品名称</strong>
</th>
<th class="text-center" style="width:45%;">
<strong>产品描述</strong>
<th class="padd5" style="width:34%">
<strong class="font14" >产品描述</strong>
</th>
<th class="text-center" style="width:5%;">
<strong>数量</strong>
<th class="padd5" style="width: 8%;">
<strong class="font14" >数量</strong>
</th>
<th class="text-center" style="width:5%;">
<strong>单位</strong>
<th class="padd5" style="width: 8%;">
<strong class="font14" >单位</strong>
</th>
<th class="text-center" style="width:10%;">
<strong>单价</strong>
<th class="padd5" style="width: 10%;">
<strong class="font14">单价</strong>
</th>
<th class="text-center" style="width:5%;">
<strong>小计</strong>
<th class="padd5" style="width: 10%;">
<strong class="font14" >小计</strong>
</th>
</tr>
<tr t-foreach="o.accquotation_line" t-as="line">
<td class="text-center">
<span t-field="line.product_id.product_tmpl_id.product_model"/>
<td class="text_linehaight" >
<span t-field="line.product_id.product_tmpl_id.product_model" />
</td>
<td class="text-center">
<td class="text_linehaight" >
<span t-field="line.product_id.product_tmpl_id.name"/>
</td>
<td style="text-align:left;">
<span t-field="line.product_id.product_tmpl_id.product_describe_cn"/>
<td class="text_linehaight">
<span t-field="line.product_id.product_tmpl_id.product_describe_cn" />
</td>
<td class="text-center">
<td class="text_linehaight">
<span t-field="line.product_qty"/>
</td>
<td class="text-center">
<td class="text_linehaight">
<span t-field="line.product_uom.name"/>
</td>
<td class="text-center">
<td class="text_linehaight">
<span t-field="line.price_unit" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
<!-- <td class="text-center">
<span t-esc="', '.join(map(lambda x: x.name, line.taxes_id))"/>
</td> -->
<td class="text-center">
<td class="text_linehaight">
<!-- <span t-esc="'{:.2f}'.format(round(line.price_unit*line.product_qty,2))" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> -->
<span t-esc="line.price_unit*line.product_qty" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
</table>
<table cellspacing="3" style="width:25%;" align="right">
<br/>
<table cellspacing="3" class="total-css" align="right">
<tr>
<td style="width:50%;">
小计(<span t-field="o.currency_id.name"/>):
小计(<span t-field="o.currency_id.name" />):
</td>
<td >
<span t-esc="o.amount_untaxed" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
<span t-esc="o.amount_untaxed" style="min-width:80px;" t-options='{"widget": "monetary", "display_currency": o.currency_id}' />
</td>
</tr>
<tr>
......@@ -274,51 +314,65 @@
</p>
</td>
</tr>
</table>
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
</table>
<table class="unovo-report-purchase-about" cellspacing="0" cellpadding="0">
<!-- <tr>
<th colspan="3" class="text-center">
<strong>Other Comments or Special Instructions</strong>
</th>
</tr> -->
<tr>
<td>
<p style="text-align:center">谢谢你的询价。以上为您所感兴趣的产品价格信息。如果您还需要我公司的其他产品信息或者资料</p>
<p style="text-align:center">请浏览我公司网站:</p>
<p style="text-align:center">http://www.neotel-technology.com</p>
<td style="width: 15%;"></td>
<td class="interested-css">
<div style="text-align:center;line-height: 20px;">以上是您感兴趣的产品资料,希望对您的工作带来方便,您还可以浏览</div>
<div style="text-align:center;line-height: 20px;"><a href="">http://www.neotel-technology.com</a> 获取其他产品信息。</div>
</td>
<td style="width: 15%;"></td>
</tr>
</table>
<br/>
<br/>
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<!-- <tr>
<th colspan="3" class="text-center">
<strong>Other Comments or Special Instructions</strong>
</th>
</tr> -->
<tr>
<td>
<p>附注:</p>
<p style="text-indent:2em;">1、 以上价格为人民币价格,含<span t-field="o.tax_id.amount"/>%增值税</p>
<p style="text-indent:2em;">2、 交货周期为收到预付款后<span t-field="o.delivery_time"/></p>
<p style="text-indent:2em;">3、 付款方式:<span t-field="o.transaction_rule"/></p>
</td>
</tr>
</table>
<div style="position: relative;">
<div style="width: 45%;display: inline-block;font-size: 14px;">
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<td>
<p style="padding-left:5px;">附注:</p>
<div style="padding:0 20px 5px;line-height: 20px;">
<div class="">1、 以上价格为<span t-field="o.note1"/></div>
<div class="">2、 交货周期为收到预付款后<span t-field="o.delivery_time"/></div>
<div class="">3、 付款方式:<span t-field="o.transaction_rule"/></div>
<div class=""><span t-field="o.note4"/></div>
</div>
</td>
</tr>
</table>
</div>
<div style="display: inline-block;font-size: 14px;position: absolute;right:120px;top: 5px;">
<table style="width: 110px;" class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<td>
<div class="" style="background: #f8f8f8;padding: 2px 4px;" >
<p style="font-size: 14px;font-family:'DengXian';line-height: 20px;" class="">如果您对报价单有任何问题,可以直接联系微信客服:</p>
</div>
</td>
</tr>
</table>
</div>
<div style="display: inline-block;font-size: 14px;position: absolute;right: 0;">
<img t-att-src="'data:image/png;base64,%s' % qr_code" class="code2"/>
<!-- <img src="./code.png" class="code2"/> -->
</div>
</div>
<br/>
<br/>
<br/>
<!-- <div class="row unovo-report-purchase-title">
<div class="col-xs-6" style="width: 100%;text-align: center;">
<img t-att-src="'data:image/png;base64,%s' % qr_code" style="max-height: 2100px;width:210px"/>
</div>
</div> -->
<div class="footer">
<!-- <div class="footer">
<div class="col-xs-6" style="width: 100%;text-align: right;">
<img t-att-src="'data:image/png;base64,%s' % qr_code" style="max-height: 70px;width:70px"/>
</div>
</div>
</div> -->
</div>
<div style="page-break-after:always;"></div>
</t>
......
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="acct_report_quotation">
<t t-call="web.basic_layout">
<t t-foreach="docs" t-as="o">
<style tyle="text/css">
.unovo-report-purchase-title {
font-family:"DengXian";
font-size: 25px;
font-weight: bold;
text-align:center;
line-height:40px;
}
.unovo-report-purchase-header {
font-family:"DengXian";
line-height:22px;
font-size:16px;
text-align:right;
}
.unovo-report-purchase-table {
vertical-align: middle;
font-family:"DengXian";
border:1px solid #ccc;
width:100%;
border-collapse:collapse;
border:1px solid #ccc;
background:#FFF
}
.unovo-report-purchase-table th{
font-weight:bold;
text-align:center;
height:20px;
font-size:16px;
border:1px solid #ccc;
}
.unovo-report-purchase-table td{
height:20px;
font-size:16px;
border:1px solid #ccc;
background:#FFF
text-align: center;
}
.unovo-report-purchase-table p {
margin:5px 0px;
}
.unovo-report-purchase-total {
line-height:20px;
font-size:16px;
}
.unovo-report-purchase-content {
font-family:"DengXian";
line-height:22px;
font-size:16px;
}
.unovo-report-purchase-content p {
margin:5px 0px;
}
.unovo-report-purchase-footer {
font-family:"DengXian";
line-height:22px;
font-size:16px;
}
</style>
<div class="page">
<!-- <div class="header">
<div class="row">
<div class="col-xs-3">
<span t-field="o.purchase_company.name"/>
</div>
</div>
</div> -->
<div class="row unovo-report-purchase-title">
<div class="col-xs-6" style="width: 50%;text-align: left;">
<!-- <img t-att-src="'data:image/jpg;base64,%s' % o.purchase_company.logo" style="max-height: 45px;"/> -->
<img t-att-src="'data:image/png;base64,%s' % logo" style="max-height: 110px;width:170px"/>
</div>
<div class="col-xs-6" style="width: 50%;text-align: right;color:#3d85c6;">
<strong style="max-height: 70px;width:250px">QUOTATION</strong>
</div>
</div>
<div class="row unovo-report-purchase-footer">
<div class="col-xs-6" style="width: 100%;text-align: right;">
<p>报价单编号:<span t-field="o.name"/></p>
</div>
</div>
<br/>
<div class="unovo-report-purchase-title"><span t-field="o.sale_company.name"/></div>
<div class="unovo-report-purchase-content">
<p>
<p>全国免费电话:400-088-1622</p>
<p>上海市闵行区联航路1588号中心大道西路18号楼 邮编:201112</p>
<p>电话:+86-21-62208085 +86-21-62208090 传真:+86-21-51026636</p>
</p>
</div>
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<th class="text-center" >
<strong>报价日期</strong>
</th>
<th class="text-center" >
<strong>公司名称</strong>
</th>
<th class="text-center" >
<strong>联系人</strong>
</th>
<th class="text-center">
<strong>电话</strong>
</th>
<th class="text-center">
<strong>运输</strong>
</th>
<th class="text-center">
<strong>交货期</strong>
</th>
</tr>
<tr>
<td class="text-center">
<span t-field="o.last_date"/>
</td>
<td class="text-center">
<span t-field="o.partner_id.name"/>
</td>
<td class="text-center">
<span t-esc="o.contact_id.name"/>
</td>
<td class="text-center">
<span t-field="o.contact_id.phone"/>
</td>
<td class="text-center">
<span t-field="o.transaction_mode.name"/>
</td>
<td class="text-center">
<span t-field="o.delivery_time"/>
</td>
</tr>
</table>
<br/>
<br/>
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<th class="text-center">
<strong>负责人</strong>
</th>
<th class="text-center" >
<strong>联系方式</strong>
</th>
<th class="text-center" >
<strong>邮箱</strong>
</th>
</tr>
<tr>
<td class="text-center">
<span t-field="o.user_id.name"/>
</td>
<td class="text-center">
<span t-field="o.user_id.phone"/>
</td>
<td class="text-center">
<span t-field="o.user_id.email"/>
</td>
</tr>
</table>
<br/>
<br/>
<div class="unovo-report-purchase-content">
<p>
报价产品信息:
</p>
</div>
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<th class="text-center" style="width:15%;">
<strong>产品编码</strong>
</th>
<th class="text-center" style="width:15%;">
<strong>产品名称</strong>
</th>
<th class="text-center" style="width:45%;">
<strong>产品描述</strong>
</th>
<th class="text-center" style="width:5%;">
<strong>数量</strong>
</th>
<th class="text-center" style="width:5%;">
<strong>单位</strong>
</th>
<th class="text-center" style="width:10%;">
<strong>单价</strong>
</th>
<th class="text-center" style="width:5%;">
<strong>小计</strong>
</th>
</tr>
<tr t-foreach="o.accquotation_line" t-as="line">
<td class="text-center">
<span t-field="line.product_id.product_tmpl_id.product_model"/>
</td>
<td class="text-center">
<span t-field="line.product_id.product_tmpl_id.name"/>
</td>
<td style="text-align:left;">
<span t-field="line.product_id.product_tmpl_id.product_describe_cn"/>
</td>
<td class="text-center">
<span t-field="line.product_qty"/>
</td>
<td class="text-center">
<span t-field="line.product_uom.name"/>
</td>
<td class="text-center">
<span t-field="line.price_unit" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
<!-- <td class="text-center">
<span t-esc="', '.join(map(lambda x: x.name, line.taxes_id))"/>
</td> -->
<td class="text-center">
<!-- <span t-esc="'{:.2f}'.format(round(line.price_unit*line.product_qty,2))" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> -->
<span t-esc="line.price_unit*line.product_qty" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
</table>
<br/>
<table cellspacing="3" style="width:25%;" align="right">
<tr>
<td style="width:50%;">
小计(<span t-field="o.currency_id.name"/>):
</td>
<td >
<span t-esc="o.amount_untaxed" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<tr>
<td>
税费(<span t-field="o.currency_id.name"/>):
</td>
<td>
<span t-esc="o.amount_tax" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<tr>
<td>
折扣(<span t-field="o.currency_id.name"/>):
</td>
<td >
<span t-esc="o.discount" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<tr>
<td>
运费(<span t-field="o.currency_id.name"/>):
</td>
<td >
<span t-esc="o.ship_fee" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<tr>
<td>
合计(<span t-field="o.currency_id.name"/>):
</td>
<td>
<!-- <span t-esc="o.amount_total - o.discount_amount - o.ship_fee" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> -->
<span t-esc="o.amount_total" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<tr>
<th>
<p>
</p>
</th>
<td>
<p>
</p>
</td>
</tr>
</table>
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<!-- <tr>
<th colspan="3" class="text-center">
<strong>Other Comments or Special Instructions</strong>
</th>
</tr> -->
<tr>
<td>
<p style="text-align:center">谢谢你的询价。以上为您所感兴趣的产品价格信息。如果您还需要我公司的其他产品信息或者资料</p>
<p style="text-align:center">请浏览我公司网站:</p>
<p style="text-align:center">http://www.neotel-technology.com</p>
</td>
</tr>
</table>
<br/>
<br/>
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<!-- <tr>
<th colspan="3" class="text-center">
<strong>Other Comments or Special Instructions</strong>
</th>
</tr> -->
<tr>
<td>
<p>附注:</p>
<p style="text-indent:2em;">1、 <span t-field="o.note1"/></p>
<p style="text-indent:2em;">2、 交货周期为收到预付款后<span t-field="o.delivery_time"/></p>
<p style="text-indent:2em;">3、 付款方式:<span t-field="o.transaction_rule"/></p>
<p style="text-indent:2em;"><span t-field="o.note4"/></p>
</td>
</tr>
</table>
<br/>
<br/>
<br/>
<!-- <div class="row unovo-report-purchase-title">
<div class="col-xs-6" style="width: 100%;text-align: center;">
<img t-att-src="'data:image/png;base64,%s' % qr_code" style="max-height: 2100px;width:210px"/>
</div>
</div> -->
<div class="footer">
<div class="col-xs-6" style="width: 100%;text-align: right;">
<img t-att-src="'data:image/png;base64,%s' % qr_code" style="max-height: 70px;width:70px"/>
</div>
</div>
</div>
<div style="page-break-after:always;"></div>
</t>
<t t-foreach="docs" t-as="doc">
<t t-set="doc" t-value="doc.with_context({'lang':doc.partner_id.lang})"/>
</t>
</t>
</template>
<!-- <template id="unovo_report_purchaseorder">
<t t-call="report.html_container">
<t t-foreach="doc_ids" t-as="doc_id">
<t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'unovo_report.unovo_report_purchaseorder_document')"/>
</t>
</t>
</template> -->
</data>
</odoo>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="acct_report_quotation">
<t t-call="web.basic_layout">
<t t-foreach="docs" t-as="o">
<style type="text/css">
.unovo-report-purchase-title {
font-family:"DengXian";
font-size: 25px;
font-weight: bold;
text-align:center;
line-height:40px;
}
.unovo-report-purchase-header {
font-family:"DengXian";
line-height:22px;
font-size:16px;
text-align:right;
}
.unovo-report-purchase-name{
font-family:"DengXian";
font-size: 25px;
font-weight: bold;
line-height:40px;
}
.unovo-report-purchase-table {
vertical-align: middle;
font-family:"DengXian";
border:1px solid #ccc;
width:100%;
border-collapse:collapse;
border:1px solid #ccc;
background:#FFF
}
.unovo-report-purchase-table th{
font-weight:bold;
text-align:left;
height:20px;
font-size:14px;
border:1px solid #ccc;
}
.unovo-report-purchase-table td{
height:20px;
font-size:14px;
border:1px solid #ccc;
background:#FFF;
text-align: left;
}
.unovo-report-purchase-table p {
margin:5px 0px;
}
.unovo-report-purchase-total {
line-height:20px;
font-size:16px;
}
.unovo-report-purchase-content {
font-family:"DengXian";
line-height:22px;
font-size:16px;
}
.unovo-report-purchase-address {
font-size: 14px;margin: 7px 0 35px;
font-family:"DengXian";
font-size:14px;
}
.unovo-report-purchase-content p {
margin:5px 0px;
}
.unovo-report-purchase-footer {
font-family:"DengXian";
line-height:22px;
font-size:16px;
}
.unovo-report-purchase-about{
vertical-align: middle;
font-family:"DengXian";
width:100%;
background:#FFF;
font-size: 14px;
}
.new-page-css{
min-width: 721px;
padding: 0 20px;
}
.title_position{
min-width: 80px;
text-align: left;position: relative;
}
.quotationcss{
max-height: 70px;position: absolute;right: 0;bottom: -15px;font-size: 30px;
}
.unovo-report-purchase-footer .text_right{
width: 100%;text-align: right;
}
.text_linehaight{
padding: 0 5px;line-height: 22px;
}
.font14{
font-size: 14px;
}
.padd5{
padding: 0 5px;
}
.connaction{
display: inline-block;width: 20%;margin-left: 10%;
}
.xcode{
display: inline-block;position: absolute;bottom: -5px;right:40px;
}
.imgCss{
max-height: 110px;width:170px
}
.total-css{
min-width:170px;font-size: 14px;
}
.interested-css{
width: 70%;background:#f8f8f8;border: 1px solid #f2f2f2;text-align:center;padding: 5px 0;
}
.weixinCss{
width: 125px;
padding:10px;
background:#f8f8f8 !important;border: 1px solid #f2f2f2 !important;
}
.text_indent{
text-indent:2em;
}
.code2{
max-height: 104px;width:104px
}
</style>
<div class="page new-page-css">
<!-- <div class="header">
<div class="row">
<div class="col-xs-3">
<span t-field="o.purchase_company.name"/>
</div>
</div>
</div> -->
<div class="" style="position: absolute;">
<!-- <img t-att-src="'data:image/jpg;base64,%s' % o.purchase_company.logo" style="max-height: 45px;"/> -->
<img t-att-src="'data:image/png;base64,%s' % logo" style="max-height: 110px;width:170px"/>
<!-- <img class="imgCss" src="./image001.png"/> -->
</div>
<div class="row unovo-report-purchase-footer" style="padding-top: 50px;">
<div class="col-xs-6 text_right">
<strong style="font-size: 25px;">QUOTATION</strong>
<div>报价单编号:<span t-field="o.name"/></div>
</div>
</div>
<br/>
<div class="unovo-report-purchase-name"><span t-field="o.sale_company.name"/></div>
<div class="unovo-report-purchase-address ">
<div>
<div> <a href="WWW.NEOTEL-TECHNOLOGY.COM">WWW.NEOTEL-TECHNOLOGY.COM</a></div>
<div style="margin-top:5px;">全国免费电话:400-088-1622</div>
<div style="margin-top:25px;">上海:上海市闵行区联航路1588号中心大道西路18号楼 邮编:201112</div>
<div style="margin-top:5px;">苏州:苏州市工业园区归家巷48号1幢101室 邮编:215021</div>
</div>
</div>
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<th class="padd5" style="min-width:120px;">
<strong class="font14" >报价日期</strong>
</th>
<th class="padd5" style="min-width:195px;">
<strong class="font14" >公司名称</strong>
</th>
<th class="padd5" style="min-width:70px;">
<strong class="font14" >联系人</strong>
</th>
<th class="padd5" style="min-width:130px;">
<strong class="font14" >电话</strong>
</th>
<th class="padd5" style="min-width:65px;">
<strong class="font14">运输</strong>
</th>
<th class="padd5" style="min-width:65px;">
<strong class="font14">交货期</strong>
</th>
</tr>
<tr>
<td class="text_linehaight">
<span t-field="o.last_date" />
</td>
<td class="text_linehaight">
<span t-field="o.partner_id.name" />
</td>
<td class="text_linehaight">
<span t-esc="o.contact_id.name"/>
</td>
<td class="text_linehaight">
<span t-field="o.contact_id.phone" />
</td>
<td class="text_linehaight">
<span t-field="o.transaction_mode.name"/>
</td>
<td class="text_linehaight">
<span t-field="o.delivery_time"/>
</td>
</tr>
</table>
<div class="unovo-report-purchase-content" style="padding:10px 0;">
<p>
<strong class="font14">报价内容:</strong>
</p>
</div>
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<th class="padd5" style="min-width:75px;">
<strong class="font14">产品编码</strong>
</th>
<th class="padd5" style="min-width:95px;">
<strong class="font14">产品名称</strong>
</th>
<th class="padd5" style="min-width:270px;">
<strong class="font14" >产品描述</strong>
</th>
<th class="padd5" style="min-width:30px;">
<strong class="font14" >数量</strong>
</th>
<th class="padd5" style="min-width:30px;">
<strong class="font14" >单位</strong>
</th>
<th class="padd5" style="min-width:70px;">
<strong class="font14">单价</strong>
</th>
<th class="padd5" style="min-width:65px;">
<strong class="font14" >小计</strong>
</th>
</tr>
<tr t-foreach="o.accquotation_line" t-as="line">
<td class="text_linehaight" >
<span t-field="line.product_id.product_tmpl_id.product_model" />
</td>
<td class="text_linehaight" >
<span t-field="line.product_id.product_tmpl_id.name"/>
</td>
<td class="text_linehaight">
<span t-field="line.product_id.product_tmpl_id.product_describe_cn" />
</td>
<td class="text_linehaight">
<span t-field="line.product_qty"/>
</td>
<td class="text_linehaight">
<span t-field="line.product_uom.name"/>
</td>
<td class="text_linehaight">
<span t-field="line.price_unit" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
<!-- <td class="text-center">
<span t-esc="', '.join(map(lambda x: x.name, line.taxes_id))"/>
</td> -->
<td class="text_linehaight">
<!-- <span t-esc="'{:.2f}'.format(round(line.price_unit*line.product_qty,2))" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> -->
<span t-esc="line.price_unit*line.product_qty" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
</table>
<br/>
<table cellspacing="3" class="total-css" align="right">
<tr>
<td style="width:50%;">
小计(<span t-field="o.currency_id.name" />):
</td>
<td >
<span t-esc="o.amount_untaxed" style="min-width:80px;" t-options='{"widget": "monetary", "display_currency": o.currency_id}' />
</td>
</tr>
<tr>
<td>
税费(<span t-field="o.currency_id.name"/>):
</td>
<td>
<span t-esc="o.amount_tax" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<tr>
<td>
折扣(<span t-field="o.currency_id.name"/>):
</td>
<td >
<span t-esc="o.discount" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<tr>
<td>
运费(<span t-field="o.currency_id.name"/>):
</td>
<td >
<span t-esc="o.ship_fee" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<tr>
<td>
合计(<span t-field="o.currency_id.name"/>):
</td>
<td>
<!-- <span t-esc="o.amount_total - o.discount_amount - o.ship_fee" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> -->
<span t-esc="o.amount_total" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<tr>
<th>
<p>
</p>
</th>
<td>
<p>
</p>
</td>
</tr>
</table>
<table class="unovo-report-purchase-about" cellspacing="0" cellpadding="0">
<!-- <tr>
<th colspan="3" class="text-center">
<strong>Other Comments or Special Instructions</strong>
</th>
</tr> -->
<tr>
<td style="width: 15%;"></td>
<td class="interested-css">
<div style="text-align:center;line-height: 20px;">以上是您感兴趣的产品资料,希望对您的工作带来方便,您还可以浏览</div>
<div style="text-align:center;line-height: 20px;"><a href="">http://www.neotel-technology.com</a> 获取其他产品信息。</div>
</td>
<td style="width: 15%;"></td>
</tr>
</table>
<br/>
<br/>
<div style="position: relative;">
<div style="width: 45%;display: inline-block;font-size: 14px;">
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<td>
<p style="padding-left:5px;">附注:</p>
<p class="text_indent">1、 以上价格为<span t-field="o.note1"/></p>
<p class="text_indent">2、 交货周期为收到预付款后<span t-field="o.delivery_time"/></p>
<p class="text_indent">3、 付款方式:<span t-field="o.transaction_rule"/></p>
<p class="text_indent">4、<span t-field="o.note4"/></p>
</td>
</tr>
</table>
</div>
<div style="display: inline-block;font-size: 14px;position: absolute;right:120px;top: 5px;">
<table style="width: 110px;" class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<td>
<div class="" style="background: #f8f8f8;padding: 2px 4px;" >
<p style="font-size: 14px;font-family:'DengXian';line-height: 20px;" class="">如果您对报价单有任何问题,可以直接联系微信客服:</p>
</div>
</td>
</tr>
</table>
</div>
<div style="display: inline-block;font-size: 14px;position: absolute;right: 0;">
<img t-att-src="'data:image/png;base64,%s' % qr_code" class="code2"/>
<!-- <img src="./code.png" class="code2"/> -->
</div>
</div>
<br/>
<br/>
<br/>
<!-- <div class="footer">
<div class="col-xs-6" style="width: 100%;text-align: right;">
<img t-att-src="'data:image/png;base64,%s' % qr_code" style="max-height: 70px;width:70px"/>
</div>
</div> -->
</div>
<div style="page-break-after:always;"></div>
</t>
<t t-foreach="docs" t-as="doc">
<t t-set="doc" t-value="doc.with_context({'lang':doc.partner_id.lang})"/>
</t>
</t>
</template>
<!-- <template id="unovo_report_purchaseorder">
<t t-call="report.html_container">
<t t-foreach="doc_ids" t-as="doc_id">
<t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'unovo_report.unovo_report_purchaseorder_document')"/>
</t>
</t>
</template> -->
</data>
</odoo>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="acct_report_quotation">
<t t-call="web.basic_layout">
<t t-foreach="docs" t-as="o">
<style type="text/css">
.unovo-report-purchase-title {
font-family:"DengXian";
font-size: 25px;
font-weight: bold;
text-align:center;
line-height:40px;
}
.unovo-report-purchase-header {
font-family:"DengXian";
line-height:22px;
font-size:16px;
text-align:right;
}
.unovo-report-purchase-name{
font-family:"DengXian";
font-size: 25px;
font-weight: bold;
line-height:40px;
}
.unovo-report-purchase-table {
vertical-align: middle;
font-family:"DengXian";
border:1px solid #ccc;
width:100%;
border-collapse:collapse;
border:1px solid #ccc;
background:#FFF
}
.unovo-report-purchase-table th{
font-weight:bold;
text-align:left;
height:20px;
font-size:14px;
border:1px solid #ccc;
}
.unovo-report-purchase-table td{
height:20px;
font-size:14px;
border:1px solid #ccc;
background:#FFF;
text-align: left;
}
.unovo-report-purchase-table p {
margin:5px 0px;
}
.unovo-report-purchase-total {
line-height:20px;
font-size:16px;
}
.unovo-report-purchase-content {
font-family:"DengXian";
line-height:22px;
font-size:16px;
}
.unovo-report-purchase-address {
font-size: 14px;margin: 7px 0 35px;
font-family:"DengXian";
font-size:14px;
}
.unovo-report-purchase-content p {
margin:5px 0px;
}
.unovo-report-purchase-footer {
font-family:"DengXian";
line-height:22px;
font-size:16px;
}
.unovo-report-purchase-about{
vertical-align: middle;
font-family:"DengXian";
width:100%;
background:#FFF;
font-size: 14px;
}
.new-page-css{
min-width: 600px;
padding: 0 20px;
}
.title_position{
min-width: 80px;
text-align: left;position: relative;
}
.quotationcss{
max-height: 70px;position: absolute;right: 0;bottom: -15px;font-size: 30px;
}
.unovo-report-purchase-footer .text_right{
width: 100%;text-align: right;
}
.text_linehaight{
padding: 0 5px;line-height: 22px;
}
.font14{
font-size: 14px;
}
.padd5{
padding: 0 5px;
}
.connaction{
display: inline-block;width: 20%;margin-left: 10%;
}
.xcode{
display: inline-block;position: absolute;bottom: -5px;right:40px;
}
.imgCss{
max-height: 110px;width:170px
}
.total-css{
min-width:170px;font-size: 14px;
}
.interested-css{
width: 70%;background:#f8f8f8;border: 1px solid #f2f2f2;text-align:center;padding: 5px 0;
}
.weixinCss{
width: 125px;
padding:10px;
background:#f8f8f8 !important;border: 1px solid #f2f2f2 !important;
}
.text_indent{
text-indent:2em;
}
.code2{
max-height: 104px;width:104px
}
</style>
<div class="page new-page-css">
<!-- <div class="header">
<div class="row">
<div class="col-xs-3">
<span t-field="o.purchase_company.name"/>
</div>
</div>
</div> -->
<div class="" style="position: absolute;">
<!-- <img t-att-src="'data:image/jpg;base64,%s' % o.purchase_company.logo" style="max-height: 45px;"/> -->
<img t-att-src="'data:image/png;base64,%s' % logo" style="max-height: 110px;width:170px"/>
<!-- <img class="imgCss" src="./image001.png"/> -->
</div>
<div class="row unovo-report-purchase-footer" style="padding-top: 50px;">
<div class="col-xs-6 text_right">
<strong style="font-size: 25px;">QUOTATION</strong>
<div>报价单编号:<span t-field="o.name"/></div>
</div>
</div>
<br/>
<div class="unovo-report-purchase-name"><span t-field="o.sale_company.name"/></div>
<div class="unovo-report-purchase-address ">
<div>
<div> <a href="WWW.NEOTEL-TECHNOLOGY.COM">WWW.NEOTEL-TECHNOLOGY.COM</a></div>
<div style="margin-top:5px;">全国免费电话:400-088-1622</div>
<div style="margin-top:25px;">上海:上海市闵行区联航路1588号中心大道西路18号楼 邮编:201112</div>
<div style="margin-top:5px;">苏州:苏州市工业园区归家巷48号1幢101室 邮编:215021</div>
</div>
</div>
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<th class="padd5" style="width: 18%;">
<strong class="font14" >报价日期</strong>
</th>
<th class="padd5" style="width: 30%;">
<strong class="font14" >公司名称</strong>
</th>
<th class="padd5" style="width: 11%;">
<strong class="font14" >联系人</strong>
</th>
<th class="padd5" style="width: 20%;">
<strong class="font14" >电话</strong>
</th>
<th class="padd5" style="width: 10%;">
<strong class="font14">运输</strong>
</th>
<th class="padd5" style="width: 10%;">
<strong class="font14">交货期</strong>
</th>
</tr>
<tr>
<td class="text_linehaight">
<span t-field="o.last_date" />
</td>
<td class="text_linehaight">
<span t-field="o.partner_id.name" />
</td>
<td class="text_linehaight">
<span t-esc="o.contact_id.name"/>
</td>
<td class="text_linehaight">
<span t-field="o.contact_id.phone" />
</td>
<td class="text_linehaight">
<span t-field="o.transaction_mode.name"/>
</td>
<td class="text_linehaight">
<span t-field="o.delivery_time"/>
</td>
</tr>
</table>
<div class="unovo-report-purchase-content" style="padding:10px 0;">
<p>
<strong class="font14">报价内容:</strong>
</p>
</div>
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<th class="padd5" style="width: 15%;">
<strong class="font14">产品型号</strong>
</th>
<th class="padd5" style="width: 15%;">
<strong class="font14">产品名称</strong>
</th>
<th class="padd5" style="width:34%">
<strong class="font14" >产品描述</strong>
</th>
<th class="padd5" style="width: 8%;">
<strong class="font14" >数量</strong>
</th>
<th class="padd5" style="width: 8%;">
<strong class="font14" >单位</strong>
</th>
<th class="padd5" style="width: 10%;">
<strong class="font14">单价</strong>
</th>
<th class="padd5" style="width: 10%;">
<strong class="font14" >小计</strong>
</th>
</tr>
<tr t-foreach="o.accquotation_line" t-as="line">
<td class="text_linehaight" >
<span t-field="line.product_id.product_tmpl_id.product_model" />
</td>
<td class="text_linehaight" >
<span t-field="line.product_id.product_tmpl_id.name"/>
</td>
<td class="text_linehaight">
<span t-field="line.product_id.product_tmpl_id.product_describe_cn" />
</td>
<td class="text_linehaight">
<span t-field="line.product_qty"/>
</td>
<td class="text_linehaight">
<span t-field="line.product_uom.name"/>
</td>
<td class="text_linehaight">
<span t-field="line.price_unit" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
<!-- <td class="text-center">
<span t-esc="', '.join(map(lambda x: x.name, line.taxes_id))"/>
</td> -->
<td class="text_linehaight">
<!-- <span t-esc="'{:.2f}'.format(round(line.price_unit*line.product_qty,2))" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> -->
<span t-esc="line.price_unit*line.product_qty" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
</table>
<br/>
<table cellspacing="3" class="total-css" align="right">
<tr>
<td style="width:50%;">
小计(<span t-field="o.currency_id.name" />):
</td>
<td >
<span t-esc="o.amount_untaxed" style="min-width:80px;" t-options='{"widget": "monetary", "display_currency": o.currency_id}' />
</td>
</tr>
<tr>
<td>
税费(<span t-field="o.currency_id.name"/>):
</td>
<td>
<span t-esc="o.amount_tax" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<tr>
<td>
折扣(<span t-field="o.currency_id.name"/>):
</td>
<td >
<span t-esc="o.discount" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<tr>
<td>
运费(<span t-field="o.currency_id.name"/>):
</td>
<td >
<span t-esc="o.ship_fee" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<tr>
<td>
合计(<span t-field="o.currency_id.name"/>):
</td>
<td>
<!-- <span t-esc="o.amount_total - o.discount_amount - o.ship_fee" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> -->
<span t-esc="o.amount_total" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<tr>
<th>
<p>
</p>
</th>
<td>
<p>
</p>
</td>
</tr>
</table>
<table class="unovo-report-purchase-about" cellspacing="0" cellpadding="0">
<!-- <tr>
<th colspan="3" class="text-center">
<strong>Other Comments or Special Instructions</strong>
</th>
</tr> -->
<tr>
<td style="width: 15%;"></td>
<td class="interested-css">
<div style="text-align:center;line-height: 20px;">以上是您感兴趣的产品资料,希望对您的工作带来方便,您还可以浏览</div>
<div style="text-align:center;line-height: 20px;"><a href="">http://www.neotel-technology.com</a> 获取其他产品信息。</div>
</td>
<td style="width: 15%;"></td>
</tr>
</table>
<br/>
<br/>
<div style="position: relative;">
<div style="width: 45%;display: inline-block;font-size: 14px;">
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<td>
<p style="padding-left:5px;">附注:</p>
<p class="text_indent">1、 以上价格为<span t-field="o.note1"/></p>
<p class="text_indent">2、 交货周期为收到预付款后<span t-field="o.delivery_time"/></p>
<p class="text_indent">3、 付款方式:<span t-field="o.transaction_rule"/></p>
<p class="text_indent"><span t-field="o.note4"/></p>
</td>
</tr>
</table>
</div>
<div style="display: inline-block;font-size: 14px;position: absolute;right:120px;top: 5px;">
<table style="width: 110px;" class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<td>
<div class="" style="background: #f8f8f8;padding: 2px 4px;" >
<p style="font-size: 14px;font-family:'DengXian';line-height: 20px;" class="">如果您对报价单有任何问题,可以直接联系微信客服:</p>
</div>
</td>
</tr>
</table>
</div>
<div style="display: inline-block;font-size: 14px;position: absolute;right: 0;">
<img t-att-src="'data:image/png;base64,%s' % qr_code" class="code2"/>
<!-- <img src="./code.png" class="code2"/> -->
</div>
</div>
<br/>
<br/>
<br/>
<!-- <div class="footer">
<div class="col-xs-6" style="width: 100%;text-align: right;">
<img t-att-src="'data:image/png;base64,%s' % qr_code" style="max-height: 70px;width:70px"/>
</div>
</div> -->
</div>
<div style="page-break-after:always;"></div>
</t>
<t t-foreach="docs" t-as="doc">
<t t-set="doc" t-value="doc.with_context({'lang':doc.partner_id.lang})"/>
</t>
</t>
</template>
<!-- <template id="unovo_report_purchaseorder">
<t t-call="report.html_container">
<t t-foreach="doc_ids" t-as="doc_id">
<t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'unovo_report.unovo_report_purchaseorder_document')"/>
</t>
</t>
</template> -->
</data>
</odoo>
\ No newline at end of file
......@@ -291,9 +291,10 @@
<tr>
<td>
<p>附注:</p>
<p style="text-indent:2em;">1、 以上价格为人民币价格,含<span t-field="o.tax_id.amount"/>%增值税</p>
<p style="text-indent:2em;">1、 <span t-field="o.note1"/></p>
<p style="text-indent:2em;">2、 交货周期为收到预付款后<span t-field="o.delivery_time"/></p>
<p style="text-indent:2em;">3、 付款方式:<span t-field="o.transaction_rule"/></p>
<p style="text-indent:2em;"><span t-field="o.note4"/></p>
</td>
</tr>
</table>
......
......@@ -313,7 +313,7 @@
<p style="text-indent:2em;">1 All prices in <span t-field="o.currency_id.name"/></p>
<p style="text-indent:2em;">2 Delivery terms: <span t-field="o.transaction_mode.name"/></p>
<p style="text-indent:2em;">3 Lead time: <span t-field="o.delivery_time"/> after prepayment </p>
<p style="text-indent:2em;">4 Payment term:<span t-field="o.transaction_rule"/></p>
<p style="text-indent:2em;">4 Payment terms<span t-field="o.transaction_rule"/></p>
</td>
</tr>
</table>
......
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- 商机视图 -->
<record id="view_crm_lead_form_inherit" model="ir.ui.view">
<field name="name">crm.lead.inherit</field>
<field name="model">crm.lead</field>
......@@ -26,6 +26,20 @@
</field>
</record>
<!-- 线索视图 -->
<record id="view_crm_xiansuo_form_inherit" model="ir.ui.view">
<field name="name">crm.lead1.inherit</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_form_view_leads"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='partner_name']" position="before">
<field name="partner_id"/>
<field name="contact_id"/>
<field name="last_contact"/>
</xpath>
</field>
</record>
<menuitem id="menu_zhijing_acc_sale_quotation"
action="action_acc_quotation1"
parent="crm.crm_menu_sales"
......
......@@ -72,7 +72,7 @@
<field name="before_purchase_id" readonly="1"/>
<field name="acc_quotation_id" readonly="1"/>
<field name="origin_sale_order_id"/>
<!-- <field name="is_send"/> -->
<field name="sale_order_id"/>
<field name="send_date"/>
<field name="is_pay"/>
<field name="send_status"/>
......@@ -343,6 +343,8 @@
<field name="is_createso"/>
<field name="discount" />
<field name="ship_fee"/>
<field name="note1"/>
<field name="note4"/>
<!-- <field name="transaction_rule"/> -->
</group>
</group>
......
......@@ -60,29 +60,45 @@ class AccStockPicking(models.Model):
# readonly=True, required=True,
# states={'draft': [('readonly', False)]})
title = fields.Char(string='项目号')
# actual_location_id = fields.Many2one('stock.location',string='实际存放库位')
sale_order_id = fields.Many2one('sale.order',string='借用销售订单')
# @api.multi
# def button_validate(self):
# res = super(AccStockPicking,self).button_validate()
# po_name = self.origin
# po_obj = self.env['purchase.order'].search([('name', '=', po_name)])
# qty_received = []
# product_qty = []
# if po_obj:
# for line in po_obj.order_line:
# qty_received.append(line.qty_received)
# product_qty.append(line.product_qty)
# _logger.debug('===========%s===============', qty_received)
# _logger.debug('===========%s===============', product_qty)
# if sum(qty_received) == 0:
# po_obj.write({'product_state':'new'})
# elif sum(qty_received) < sum(product_qty) and sum(qty_received) != 0:
# po_obj.write({'product_state':'part'})
# sale_order_id = self.sale_order_id
# if sale_order_id:
# sale_order_id = self.sale_order_id
# move_product_ids = []
# sale_product_ids = []
# for move_line in self.move_ids_without_package:
# move_product_ids.append(move_line.product_id)
# for sale_line in self.sale_order_id.order_line:
# sale_product_ids.append(sale_line.product_id)
# sent_product = [x for x in move_product_ids if x in sale_product_ids]
# if sent_product:
# self.make_sale_purchase(sent_product,sale_order_id)
# else:
# po_obj.write({'product_state':'all'})
# raise ValidationError('借用销售单中不存在交货产品,请确认')
# return res
@api.multi
def make_sale_purchase(self,sent_product,sale_order_id):
for product in sent_product:
mrp_production = self.env['mrp.production'].search([('product_id', '=', product.id),('origin', '=', sale_order_id.name)])
if mrp_production:
done_qty = sum([m.qty_done for m in mrp_production.finished_move_line_ids])
trans_qty = self.env['stock.move'].search([('picking_id', '=', self.id),('product_id', '=', product.id)]).product_uom_qty
if trans_qty > done_qty:
raise ValidationError('交货数量超过借用销售订单的生产完成数量!!')
else:
sale_order_id.re_create_before_po(product,trans_qty)
new_mrp_production = self.env['mrp.production'].search([('product_id', '=', product.id),('origin', '=', self.origin)])
new_mrp_production.write({'origin':sale_order_id.name})
body = "重新生成生产单: %s" % (new_mrp_production.name)
sale_order_id.message_post(body=body, message_type='comment')
else:
raise ValidationError('未找到借用销售单关联的生产单!!')
@api.one
@api.depends('move_lines.date_expected')
def _compute_scheduled_date(self):
......@@ -269,6 +285,10 @@ class ExcipientsProduct(models.Model):
is_active = fields.Boolean(string='有效',default=True)
@api.multi
def draft_button(self):
self.env.user.notify_success(message='变更成功')
@api.onchange('product_id')
def onchange_product_id(self):
if self.product_id:
......@@ -296,7 +316,7 @@ class ExcipientsProduct(models.Model):
AND product_id = %s """%(location_id, p_id)
# now_qty = cr.execute(now_qty_sql, (location_id,p_id))
cr.execute(now_qty_sql)
result = request.cr.dictfetchall()
result = cr.dictfetchall()
if result[0]['theory_qty']:
now_qty = result[0]['theory_qty']
else:
......@@ -350,7 +370,7 @@ class ExcipientsProduct(models.Model):
AND product_id = %s """%(location_id, p_id)
# now_qty = cr.execute(now_qty_sql, (location_id,p_id))
cr.execute(now_qty_sql)
result = request.cr.dictfetchall()
result = cr.dictfetchall()
if result[0]['theory_qty']:
now_qty = result[0]['theory_qty']
else:
......
......@@ -72,183 +72,126 @@
</div> -->
<div class="row unovo-report-purchase-title">
<div class="col-xs-6" style="width: 50%;text-align: left;">
<!-- <img t-att-src="'data:image/jpg;base64,%s' % o.purchase_company.logo" style="max-height: 45px;"/> -->
<img t-att-src="'data:image/png;base64,%s' % logo" style="max-height: 110px;width:170px"/>
<br/>
<img t-att-src="'data:image/png;base64,%s' % logo" style="max-height: 2000px;width:170px"/>
</div>
<!-- <div class="col-xs-6" style="width: 50%;text-align: right;color:#3d85c6;">
<strong style="max-height: 70px;width:250px">QUOTATION</strong>
</div> -->
</div>
<!-- <div class="row unovo-report-purchase-footer">
<div class="col-xs-6" style="width: 100%;text-align: right;">
<p>报价单编号:<span t-field="o.name"/></p>
<div class="col-xs-6" style="width: 50%;text-align: left;">
<div class="unovo-report-purchase-content">
<p>
<p><span t-field="o.so_obj.sale_company.name"/></p>
<p>上海市闵行区联航路1588号中心大道西路18栋</p>
<p>电话: 0086-21-6220 8090</p>
<p>传真:0086-21-5102 6636</p>
<p>邮箱: info@neotel-technology.com</p>
</p>
</div>
</div>
</div> -->
</div>
<br/>
<div class="unovo-report-purchase-title">出货单</div>
<br/>
<div class="unovo-report-purchase-content">
<p>
<p><span t-field="so_obj.sale_company.name"/></p>
<p>上海市闵行区联航路1588号中心大道西路18栋</p>
<p>Tel: 0086-21-6220 8090</p>
<p>Fax:0086-21-5102 6636</p>
<p>Email: info@neotel-technology.com</p>
客户订单号:<span t-field="so_obj.partner_ponumber"/>
</p>
<p>
SO:<span t-field="so_obj.name"/>
</p>
<p>
出货日期:<span t-esc="partner_info.get('now_date', '')"/>
</p>
</div>
<div class="unovo-report-purchase-title">出货单</div>
<br/>
<div class="unovo-report-purchase-content">
<p>
开单日期:<span t-esc="partner_info.get('now_date', '')"/>
</p>
<div style="text-align:left">
<span style="float:left;width:50%">
出货公司:<span t-field="so_obj.sale_company"/>
</span>
<span style="float:left;width:50%">
收货公司:<span t-field="o.partner_id.name"/>
</span>
<span style="float:left;width:50%">
联系人:<span t-field="so_obj.user_id.name"/>
</span>
<span style="float:left;width:50%">
联系人:
</span>
<span style="float:left;width:50%">
联系电话:<span t-field="so_obj.user_id.phone"/>
</span>
<span style="float:left;width:50%">
联系电话:
</span>
<span style="float:left;width:50%">
&amp;nbsp;
</span>
<span style="float:left;width:50%">
收货地址:<span t-field="o.partner_id.street"/>
</span>
</div>
</div>
<table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
<tr>
<td rowspan="3" class="text-center" style="width:15%;">
购货单位
</td>
<td class="text-center" style="width:15%;">
名称
</td>
<td colspan="2" class="text-center" style="width:25%;">
<span t-field="so_obj.partner_id.name"/>
</td>
<td class="text-center" style="width:25%;">
税务登记号
</td>
<td class="text-center" style="width:20%;">
<!-- <span t-field="so_obj.partner_id.name"/> -->
</td>
</tr>
<tr>
<td class="text-center">
联系人
</td>
<td colspan="2" class="text-center">
<span t-field="so_obj.contact_id.name"/>
</td>
<td class="text-center">
<!-- 税务登记号 -->
</td>
<td class="text-center">
<!-- <span t-field="so_obj.partner_id.name"/> -->
</td>
</tr>
<tr>
<td class="text-center">
电话
</td>
<td colspan="2" class="text-center">
<span t-field="so_obj.partner_id.phone"/>
</td>
<td class="text-center">
开户银行及账号
</td>
<td class="text-center">
<span t-esc="partner_info.get('bank_number', '')"/> <span t-esc="partner_info.get('bank_number', '')"/>
</td>
</tr>
<tr>
<th>
订单日期
<th class="text-center" style="width:15%;">
<strong>产品名称</strong>
</th>
<th class="text-center" style="width:15%;">
<strong>产品型号</strong>
</th>
<!-- <th>
<strong>物料编码</strong>
</th> -->
<th>
订单号
<th class="text-center" style="width:35%;">
<strong>描述</strong>
</th>
<th colspan="2">
料号/描述
<th class="text-center" style="width:10%;">
<strong>数量</strong>
</th>
<th>
数量
<th class="text-center" style="width:10%;">
<strong>包装方式</strong>
</th>
<th>
单位
<th class="text-center" style="width:10%;">
<strong>包装数量</strong>
</th>
</tr>
<tr t-foreach="so_obj.quotation_line" t-as="line">
<td class="text-center">
<span t-esc="partner_info.get('now_date', '')"/>
</td>
<td class="text-center">
<span t-esc="so_obj.partner_ponumber"></span>
</td>
<td colspan="2" class="text-center">
<span t-esc="line.product_id.product_tmpl_id.product_model"></span>
</td>
<td class="text-center">
<span t-esc="line.product_qty"></span>
</td>
<td class="text-center">
<span t-esc="line.product_uom.name"></span>
</td>
</tr>
<tr>
<td rowspan="3" class="text-center">
销货单位
</td>
<td class="text-center">
名称
</td>
<td colspan="2" class="text-center">
<span t-field="so_obj.sale_company.name"/>
</td>
<td class="text-center">
税务登记号
</td>
<td class="text-center">
<!-- <span t-field="so_obj.partner_id.name"/> -->
</td>
</tr>
<tr>
<td class="text-center">
联系人
</td>
<td colspan="2" class="text-center">
<span t-field="so_obj.charge_person.name"/>
<span t-field="line.product_id.product_tmpl_id.name"/>
</td>
<td class="text-center">
<!-- 税务登记号 -->
<span t-field="line.product_id.product_tmpl_id.product_model"/>
</td>
<td class="text-center">
<!-- <span t-field="so_obj.partner_id.name"/> -->
<td style="text-align:left;">
<span t-field="line.product_id.product_tmpl_id.product_describe_cn"/>
</td>
</tr>
<tr>
<td class="text-center">
电话
</td>
<td colspan="2" class="text-center">
86-21-62208085 86-21-62208090
<span t-field="line.product_qty"/>
</td>
<td class="text-center">
开户银行及账号
<span t-field="line.product_uom.name"/>
</td>
<td class="text-center">
<span t-field="so_obj.sale_company.bank"/><span t-field="so_obj.sale_company.bank_number"/>
<span t-field="line.product_uom.name"/>
</td>
</tr>
</table>
<br/>
<br/>
<div class="unovo-report-purchase-content" style="text-align:right">
<div class="unovo-report-purchase-content" >
<p>
<p>客户签名:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</p>
<p>公司盖章:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</p>
<p>日期:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</p>
运输方式:
</p>
<p>
物流单号:
</p>
<br/>
<br/>
<p>
客户签字:
</p>
<br/>
<p>
日期:
</p>
</div>
<!-- <div class="row unovo-report-purchase-title">
<div class="col-xs-6" style="width: 100%;text-align: center;">
<img t-att-src="'data:image/png;base64,%s' % qr_code" style="max-height: 2100px;width:210px"/>
</div>
</div> -->
<!-- <div class="footer">
<div class="col-xs-6" style="width: 100%;text-align: right;">
<img t-att-src="'data:image/png;base64,%s' % qr_code" style="max-height: 70px;width:70px"/>
</div>
</div> -->
</div>
<div style="page-break-after:always;"></div>
</t>
......
......@@ -85,6 +85,7 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='origin']" position="after">
<field name="title"/>
<!-- <field name="sale_order_id" attrs="{'invisible': [('picking_type_code', '=', 'incoming')]}"/> -->
</xpath>
</field>
</record>
......
......@@ -8,6 +8,9 @@
<field name="model">excipients.product</field>
<field name="arch" type="xml">
<form string="excipients product" version="12.0">
<header>
<button name="draft_button" string="确认生成" type="object"/>
</header>
<sheet>
<!-- <div class="oe_title">
<h1><field name="name" readonly="1"/></h1>
......
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# from . import choose_move
from . import choose_move
# from . import import_contact_data
# from . import import_product_data
# from . import import_purchase_data
......
......@@ -10,26 +10,26 @@ class ChooseMove(models.TransientModel):
stock_moves = fields.Many2many('stock.move', string='moves')
# flag_order = fields.Char('Flag Order')
@api.multi
def select_products(self):
if self.flag_order == 'so':
order_id = self.env['sale.order'].browse(self._context.get('active_id', False))
for product in self.product_ids:
self.env['sale.order.line'].create({
'product_id': product.id,
'product_uom': product.uom_id.id,
'price_unit': product.lst_price,
'order_id': order_id.id
})
elif self.flag_order == 'po':
order_id = self.env['purchase.order'].browse(self._context.get('active_id', False))
for product in self.product_ids:
self.env['purchase.order.line'].create({
'product_id': product.id,
'name': product.name,
'date_planned': order_id.date_planned,
'product_uom': product.uom_id.id,
'price_unit': product.lst_price,
'product_qty': 1.0,
'order_id': order_id.id
})
\ No newline at end of file
# @api.multi
# def select_products(self):
# if self.flag_order == 'so':
# order_id = self.env['sale.order'].browse(self._context.get('active_id', False))
# for product in self.product_ids:
# self.env['sale.order.line'].create({
# 'product_id': product.id,
# 'product_uom': product.uom_id.id,
# 'price_unit': product.lst_price,
# 'order_id': order_id.id
# })
# elif self.flag_order == 'po':
# order_id = self.env['purchase.order'].browse(self._context.get('active_id', False))
# for product in self.product_ids:
# self.env['purchase.order.line'].create({
# 'product_id': product.id,
# 'name': product.name,
# 'date_planned': order_id.date_planned,
# 'product_uom': product.uom_id.id,
# 'price_unit': product.lst_price,
# 'product_qty': 1.0,
# 'order_id': order_id.id
# })
\ No newline at end of file
......@@ -18,14 +18,14 @@ except ImportError:
import time
import base64
import socket
import paramiko
# import paramiko
try:
import paramiko
except ImportError:
raise ImportError(
'This module needs paramiko to automatically write backups to the FTP through SFTP. Please install paramiko on your system. (sudo pip3 install paramiko)')
# try:
# import paramiko
# except ImportError:
# raise ImportError(
# 'This module needs paramiko to automatically write backups to the FTP through SFTP. Please install paramiko on your system. (sudo pip3 install paramiko)')
def execute(connector, method, *args):
......@@ -147,7 +147,8 @@ class DbBackup(models.Model):
for rec in conf_ids:
db_list = self.get_db_list(rec.host, rec.port)
print (db_list)
print (rec.folder)
if rec.name in db_list:
try:
if not os.path.isdir(rec.folder):
......
# -*- coding: utf-8 -*-
from . import controllers
\ No newline at end of file
# -*- coding: utf-8 -*-
{
'name': "Document Preview",
'summary': """
Document Preview allows users to preview a document without downloading it that leads to saving
time and storage of users.
""",
'description': """
Best Odoo Document Preview Apps
Odoo Document Preview Apps
Document Preview Apps
Odoo Documents Preview Apps
Documents Preview Apps
Odoo Preview Document Apps
Preview Document Apps
View Document Apps
Odoo View Document Apps
Document View Apps
Display Document Preview Apps
Odoo Display Document Preview Apps
PDF Document Preview Apps
Odoo PDF Document Preview Apps
Video Document Preview Apps
Odoo Video Document Preview Apps
Image Document Preview Apps
Show Document Apps
Binary Preview Apps
Binary File Preview Apps
File Preview Apps
Show File Document
Display Birany Files
Show Attachment Files
Display Attachment Files
Display Files
Check PDF Files
Check File
Check Image
Document Checker
File Checker
Report Preview
Odoo Report Preview
Document Management System
Document Management Portal
Document Preview Portal
Document Views In Website Portal
Document Version
Document Extension
Document Viewer PDF
MuK Documents View
Asset Documents Management
""",
'author': "Ksolves India Pvt. Ltd.",
'license': 'LGPL-3',
'website': "https://www.ksolves.com",
'category': 'Tools',
'support': 'sales@ksolves.com',
'images': ['static/description/banners/banner1.gif'],
'version': '12.0.1.0.0',
'depends': ['base', 'web', 'mail'],
'data': [
'views/ks_preview_templates.xml',
],
'qweb': ['static/src/xml/ks_binary_preview.xml',
],
}
\ No newline at end of file
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>)
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# License URL : https://store.webkul.com/license.html/
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>
#################################################################################
from . import main
\ No newline at end of file
# -*- coding: utf-8 -*-
from odoo import fields, http, _
from odoo.http import request
class ks_file_preview(http.Controller):
# Controller: Get the file details
@http.route(['/get/record/details'], type='json', auth="public", methods=['POST'], website=True)
def GetRecordData(self,res_id, model, size, res_field, **kw):
data_file = {}
data = request.env['ir.attachment'].sudo().search([('res_model', '=', model), ('res_id', '=', res_id), ('res_field', '=', res_field)])
div = 2014
if size[-2:] == 'Kb' or size[-2:] == 'kb':
div = 1024
elif size[-2:] == 'Mb' or size[-2:] == 'mb':
div = 1024*1024
elif size[-5:] == 'bytes' or size[-5:] == 'Bytes':
div = 1
size = size[:-3]
for d in data:
if float(size[:-3]) == round(d.file_size/div, 2):
data_file = {
'name': d.name or d.dispay_name,
'id': d.id,
'type': d.mimetype,
}
break
return data_file
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * ks_binary_file_preview
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-30 13:34+0000\n"
"PO-Revision-Date: 2019-08-30 13:34+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: ks_binary_file_preview
#. openerp-web
#: code:addons/ks_binary_file_preview/static/src/xml/ks_binary_preview.xml:3
#, python-format
msgid "Preview"
msgstr ""
<?xml version="1.0" encoding="UTF-8"?>
<svg width="475px" height="403px" viewBox="0 0 475 403" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55.1 (78136) - https://sketchapp.com -->
<title>check</title>
<desc>Created with Sketch.</desc>
<g id="Page-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Artboard" transform="translate(-455.000000, -400.000000)" fill-rule="nonzero">
<g id="check" transform="translate(455.000000, 400.000000)">
<path d="M396.283,221.097 C395.143,220.522 394.001,220.235 392.85,220.235 C390.372,220.235 388.189,221.186 386.287,223.092 L368.013,241.363 C366.305,243.078 365.447,245.169 365.447,247.646 L365.447,320.159 C365.447,332.724 360.984,343.473 352.032,352.423 C343.087,361.368 332.331,365.841 319.768,365.841 L82.226,365.841 C69.662,365.841 58.907,361.368 49.962,352.423 C41.015,343.474 36.544,332.725 36.544,320.159 L36.544,82.622 C36.544,70.06 41.015,59.306 49.962,50.358 C58.907,41.412 69.662,36.94 82.226,36.94 L319.77,36.94 C323.958,36.94 328.24,37.511 332.617,38.654 C333.76,39.032 334.616,39.225 335.18,39.225 C337.658,39.225 339.848,38.276 341.75,36.373 L355.74,22.383 C358.022,20.102 358.882,17.34 358.306,14.107 C357.735,11.061 356.02,8.871 353.165,7.54 C342.893,2.788 331.753,0.401 319.762,0.401 L82.226,0.401 C59.576,0.401 40.208,8.443 24.124,24.527 C8.042,40.613 0,59.978 0,82.629 L0,320.172 C0,342.819 8.042,362.186 24.125,378.27 C40.209,394.358 59.577,402.4 82.227,402.4 L319.768,402.4 C342.415,402.4 361.785,394.358 377.869,378.27 C393.954,362.186 402.003,342.82 402.003,320.172 L402.003,229.375 C402.003,225.381 400.088,222.623 396.283,221.097 Z" id="Path" fill="#F7B500"></path>
<path d="M467.95,57.216 L436.541,25.807 C431.973,21.24 426.545,18.956 420.262,18.956 C413.987,18.956 408.555,21.24 403.991,25.807 L219.265,210.532 L144.181,135.443 C139.612,130.873 134.186,128.592 127.907,128.592 C121.627,128.592 116.203,130.873 111.633,135.443 L80.228,166.848 C75.66,171.416 73.374,176.842 73.374,183.125 C73.374,189.405 75.66,194.829 80.228,199.399 L202.995,322.166 C207.564,326.737 212.99,329.017 219.269,329.017 C225.548,329.017 230.973,326.738 235.543,322.166 L467.947,89.763 C472.512,85.196 474.801,79.769 474.801,73.489 C474.801,67.209 472.518,61.783 467.95,57.216 Z" id="Path" fill="#040404"></path>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 180"><defs><style>.cls-1{fill:#e92727;}.cls-2,.cls-5{fill:#fff;stroke-miterlimit:10;}.cls-2{stroke:#e8e8e8;}.cls-3{fill:#c82128;}.cls-4{fill:#e72728;}.cls-5{stroke:#e92727;stroke-width:1.5px;}.cls-6{fill:#444;}.cls-6,.cls-7{fill-rule:evenodd;}.cls-7{fill:#e32235;}</style></defs><title>Ads Layout2</title><path class="cls-1" d="M108.25,66.8h0a46.86,46.86,0,0,1,93.71,0h3a49.9,49.9,0,0,0-99.79,0h3Z"/><path class="cls-2" d="M283.34,180H16C7.37,180,.32,172.72.32,163.82V82.6C.32,73.7,7.37,66.41,16,66.41H283.34C292,66.41,299,73.7,299,82.6v81.22C299,172.72,292,180,283.34,180Z"/><path class="cls-3" d="M284,180H24.1C10.84,180,0,172.74,0,163.88V82.47C0,73,3,64,22.15,66.35Z"/><path class="cls-4" d="M299,78.86v86.26s-.76,12.11-14.41,14.88H13.07A17.4,17.4,0,0,1,0,166.3V154.78Z"/><circle class="cls-5" cx="155.11" cy="65.75" r="33.39"/><path class="cls-6" d="M155.59,50.89V80.58a1.63,1.63,0,0,1-2.5,1.4c-1-.57-18.13-13.84-19.83-14.82a1.61,1.61,0,0,1-.64-2.16,1.63,1.63,0,0,1,.64-.66c1.22-.71,18.44-14,19.88-14.84A1.62,1.62,0,0,1,155.59,50.89Z"/><path id="Shape_3_copy" data-name="Shape 3 copy" class="cls-6" d="M178,58.59V72.9a.88.88,0,0,1-.86.91.8.8,0,0,1-.49-.14c-.53-.31-9.79-6.6-10.7-7.14a.9.9,0,0,1-.34-1.21A.92.92,0,0,1,166,65c.66-.39,10-6.72,10.73-7.16a.87.87,0,0,1,1.2.31A.93.93,0,0,1,178,58.59Z"/><path id="Shape_3_copy_2" data-name="Shape 3 copy 2" class="cls-7" d="M161.47,44.31V58.63a.88.88,0,0,0,.85.91.91.91,0,0,0,.49-.14c.54-.31,9.79-6.61,10.71-7.15a.88.88,0,0,0,.33-1.2.86.86,0,0,0-.33-.35c-.66-.39-10-6.72-10.74-7.16a.86.86,0,0,0-1.19.31A.83.83,0,0,0,161.47,44.31Z"/><path id="Shape_3_copy_3" data-name="Shape 3 copy 3" class="cls-7" d="M161.47,72.86V87.18a.88.88,0,0,0,.86.91.9.9,0,0,0,.48-.14c.54-.31,9.79-6.6,10.71-7.14a.9.9,0,0,0,0-1.55c-.66-.4-10-6.72-10.74-7.16a.85.85,0,0,0-1.19.31A.78.78,0,0,0,161.47,72.86Z"/></svg>
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="459px" height="459px" viewBox="0 0 459 459" style="enable-background:new 0 0 459 459;" xml:space="preserve">
<g>
<g id="share">
<path d="M459,216.75L280.5,38.25v102c-178.5,25.5-255,153-280.5,280.5C63.75,331.5,153,290.7,280.5,290.7v104.55L459,216.75z" fill="#000"/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="459px" height="459px" viewBox="0 0 459 459" style="enable-background:new 0 0 459 459;" xml:space="preserve">
<g>
<g id="share">
<path d="M459,216.75L280.5,38.25v102c-178.5,25.5-255,153-280.5,280.5C63.75,331.5,153,290.7,280.5,290.7v104.55L459,216.75z" fill="#007bff"/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M10 12c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM6 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12-8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-4 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm4-4c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-4-4c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-4-4c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>
\ No newline at end of file
<svg height="512" viewBox="0 0 64 64" width="512" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="New_Gradient_Swatch_1" gradientUnits="userSpaceOnUse" x1="32" x2="32" y1="8.462" y2="55.216"><stop offset="0" stop-color="#fff33b"/><stop offset=".014" stop-color="#fee72e"/><stop offset=".042" stop-color="#fed51b"/><stop offset=".07" stop-color="#fdca10"/><stop offset=".1" stop-color="#fdc70c"/><stop offset=".4" stop-color="#f3903f"/><stop offset=".8" stop-color="#ed683c"/><stop offset="1" stop-color="#e93e3a"/></linearGradient><linearGradient id="New_Gradient_Swatch_1-2" x1="36" x2="36" xlink:href="#New_Gradient_Swatch_1" y1="8.462" y2="55.216"/><linearGradient id="New_Gradient_Swatch_1-3" x1="18" x2="18" xlink:href="#New_Gradient_Swatch_1" y1="8.462" y2="55.216"/><linearGradient id="New_Gradient_Swatch_1-5" x1="22" x2="22" xlink:href="#New_Gradient_Swatch_1" y1="8.462" y2="55.216"/><g id="Mail-6" data-name="Mail"><path d="m57 10h-50a5.006 5.006 0 0 0 -5 5v34a5.006 5.006 0 0 0 5 5h50a5.006 5.006 0 0 0 5-5v-34a5.006 5.006 0 0 0 -5-5zm-50 2h50a3 3 0 0 1 3 3v.46l-28 18.345-28-18.345v-.46a3 3 0 0 1 3-3zm53 5.851v27.383l-21.817-13.09zm-34.183 14.293-21.817 13.09v-27.383zm31.183 19.856h-50a3 3 0 0 1 -3-3v-1.434l23.675-14.2 3.777 2.474a1 1 0 0 0 1.1 0l3.777-2.474 23.671 14.2v1.434a3 3 0 0 1 -3 3z" fill="url(#New_Gradient_Swatch_1)"/><path d="m22 48h28v2h-28z" fill="url(#New_Gradient_Swatch_1-2)"/><path d="m16 48h4v2h-4z" fill="url(#New_Gradient_Swatch_1-3)"/><path d="m26 44h20v2h-20z" fill="url(#New_Gradient_Swatch_1-2)"/><path d="m20 44h4v2h-4z" fill="url(#New_Gradient_Swatch_1-5)"/></g></svg>
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<path style="fill:black;" d="M256,512C114.844,512,0,397.156,0,256S114.844,0,256,0s256,114.844,256,256S397.156,512,256,512z" fill="black"/>
<path style="fill:black;" d="M375.467,426.667c-141.156,0-256-114.844-256-256c0-59.087,20.318-113.41,54.071-156.783
C72.768,48.311,0,143.72,0,256c0,141.156,114.844,256,256,256c82.069,0,155.049-38.974,201.929-99.217
C432.012,421.638,404.342,426.667,375.467,426.667z"/>
<path style="fill:#FFFFFF;" d="M203.034,388.414c-4.518,0-9.038-1.725-12.483-5.173L84.62,277.31
c-6.897-6.892-6.897-18.073,0-24.966c6.888-6.897,18.078-6.897,24.966,0l93.449,93.444l181.724-181.72
c6.888-6.897,18.078-6.897,24.966,0c6.897,6.892,6.897,18.073,0,24.966L215.517,383.241
C212.073,386.689,207.552,388.414,203.034,388.414z"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 52 52" style="enable-background:new 0 0 52 52;" xml:space="preserve">
<path d="M26,0C11.664,0,0,11.663,0,26s11.664,26,26,26s26-11.663,26-26S40.336,0,26,0z M38.5,28H28v11c0,1.104-0.896,2-2,2
s-2-0.896-2-2V28H13.5c-1.104,0-2-0.896-2-2s0.896-2,2-2H24V14c0-1.104,0.896-2,2-2s2,0.896,2,2v10h10.5c1.104,0,2,0.896,2,2
S39.604,28,38.5,28z"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
<svg id="Layer_1" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg" data-name="Layer 1"><path d="m466.17 363.03v69.65h-154.45-111.44-154.45v-69.65z" fill="#00efd1"/><path d="m466.17 97.26v265.77h-420.34v-265.77h90.28l-1.01 185.81s85.71.01 144.77.01a61.835 61.835 0 1 0 55.2-89.71c-.16 0-.33 0-.49.01v-96.12z" fill="#fedb41"/><path d="m390.03 40.81v31.65h-55.45v-31.65a27.668 27.668 0 0 1 27.63-27.72h.1a27.662 27.662 0 0 1 27.72 27.63z" fill="#f4b844"/><path d="m284.14 220.14a61.691 61.691 0 0 1 50.44-26.76c.16-.01.33-.01.49-.01a61.828 61.828 0 1 1 -50.93 26.77z" fill="#00efd1"/><path d="m136.11 97.26.31-58.1a26.2 26.2 0 0 1 26.4-26.07h199.39a27.668 27.668 0 0 0 -27.63 27.72v152.57a61.844 61.844 0 0 0 -54.71 89.7c-59.06 0-144.77-.01-144.77-.01zm147.68-2.95a49.545 49.545 0 1 0 -49.54 49.54 49.54 49.54 0 0 0 49.54-49.54z" fill="#00acea"/><path d="m311.72 432.68 18.57 66.23h-148.58l18.57-66.23z" fill="#00acea"/><path d="m234.25 44.77a49.54 49.54 0 1 1 -49.55 49.54 49.54 49.54 0 0 1 49.55-49.54z" fill="#00efd1"/><g fill="#083863"><path d="m466.17 91h-125.17v-13h49.03c3.313 0 5.97-2.227 5.97-5.54v-31.748a33.714 33.714 0 0 0 -33.729-33.712h-199.451a32.2 32.2 0 0 0 -32.4 31.953l-.278 52.047h-84.312a6.085 6.085 0 0 0 -5.83 6.26v335.42c0 3.314 2.516 6.32 5.83 6.32h146.536l-15.205 54h-26.591a6 6 0 1 0 0 12h210.86a6 6 0 1 0 0-12h-26.591l-15.2-54h146.531c3.314 0 5.83-3.006 5.83-6.32v-335.42a6.085 6.085 0 0 0 -5.83-6.26zm-186.93 164.2a55.433 55.433 0 0 1 9.7-31.441c.1-.131.193-.264.281-.4a56.03 56.03 0 0 1 45.4-24.162c.107 0 .17-.194.278-.194h.169a55.969 55.969 0 1 1 -49.846 81.325v.023a55.139 55.139 0 0 1 -5.982-25.151zm83.082-236.2h.043a21.715 21.715 0 0 1 21.635 21.81v25.19h-43v-25.2a21.312 21.312 0 0 1 21.323-21.71l-.061-6.045zm-220.212 78.292.31-58.177a20.3 20.3 0 0 1 20.4-20.115h173.667c-5.129 6-7.487 13.779-7.487 21.81v146.88a59.615 59.615 0 0 0 -15.058 3.151 6.458 6.458 0 0 0 -4.542-1.841h-149.13a6 6 0 1 0 0 12h134.076a76.664 76.664 0 0 0 -13.257 13h-120.819a6 6 0 1 0 0 12h113.5a73.584 73.584 0 0 0 -4.652 13h-108.848a6 6 0 1 0 0 12h107.092c-.073 2-.122 2.743-.122 4.045a67.808 67.808 0 0 0 3.606 21.955c-48.62 0-110.419.031-129.713.029zm180.266 395.708h-132.752l15.205-54h102.342zm137.624-66h-408v-58h408zm-408-70v-254h78.077l-.977 179.907a6.151 6.151 0 0 0 1.746 4.329 6.03 6.03 0 0 0 4.254 1.8s82.325.026 141.206.027a67.514 67.514 0 0 0 58.764 33.958c37.4 0 68.04-30.424 68.04-67.826 0-35.545-28.11-64.767-62.11-67.583v-84.612h119v254z"/><path d="m234.25 149.85a55.54 55.54 0 1 0 -55.55-55.54 55.6 55.6 0 0 0 55.55 55.54zm0-99.08a43.54 43.54 0 1 1 -43.55 43.54 43.589 43.589 0 0 1 43.55-43.54z"/><path d="m234.25 113.02a5.622 5.622 0 0 1 -5.62-5.61 6 6 0 1 0 -12 0 17.621 17.621 0 0 0 10.37 16.032v2.558a6 6 0 0 0 12 0v-1.649a17.6 17.6 0 0 0 -4.75-34.551 5.615 5.615 0 1 1 5.61-5.62 6 6 0 0 0 12 0 17.627 17.627 0 0 0 -11.86-16.627v-2.553a6 6 0 0 0 -12 0v2.735a17.6 17.6 0 0 0 6.25 34.065 5.61 5.61 0 1 1 0 11.22z"/><path d="m160.27 176h149.13a6 6 0 0 0 0-12h-149.13a6 6 0 1 0 0 12z"/><path d="m324.737 273.222a6 6 0 0 0 4.248 1.778h.015a6 6 0 0 0 4.243-1.757l27.61-27.61a6 6 0 1 0 -8.486-8.486l-23.346 23.347-11.228-11.336a6 6 0 0 0 -8.526 8.444z"/></g></svg>
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 966.653 966.653" style="enable-background:new 0 0 966.653 966.653;" xml:space="preserve">
<g>
<g id="smartphone_1_">
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="483.3267" y1="995.5009" x2="483.3267" y2="-20.2906" gradientTransform="matrix(1 0 0 -1 0 949.7782)">
<stop offset="0" style="stop-color:#FFF33B"/>
<stop offset="0.014" style="stop-color:#FEE72E"/>
<stop offset="0.042" style="stop-color:#FED51B"/>
<stop offset="0.07" style="stop-color:#FDCA10"/>
<stop offset="0.1" style="stop-color:#FDC70C"/>
<stop offset="0.4" style="stop-color:#F3903F"/>
<stop offset="0.8" style="stop-color:#ED683C"/>
<stop offset="1" style="stop-color:#E93E3A"/>
</linearGradient>
<path style="fill:url(#SVGID_1_);" d="M694.718,0H271.936c-25.606,0.027-46.357,20.778-46.383,46.383V920.27
c0.027,25.606,20.778,46.357,46.383,46.383h422.782c25.606-0.027,46.357-20.778,46.383-46.383V46.383
C741.074,20.778,720.323,0.027,694.718,0z M271.936,32.222h422.782c7.814,0.018,14.144,6.348,14.161,14.161v50.282H257.774V46.383
C257.792,38.569,264.122,32.24,271.936,32.222z M708.879,128.887v708.879H257.774V128.887H708.879z M694.718,934.432H271.936
c-7.814-0.018-14.144-6.348-14.161-14.161v-50.282h451.105v50.282C708.861,928.084,702.531,934.414,694.718,934.432z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="483.3267" y1="994.5021" x2="483.3267" y2="5.2613" gradientTransform="matrix(1 0 0 -1 0 949.7782)">
<stop offset="0" style="stop-color:#FFF33B"/>
<stop offset="0.014" style="stop-color:#FEE72E"/>
<stop offset="0.042" style="stop-color:#FED51B"/>
<stop offset="0.07" style="stop-color:#FDCA10"/>
<stop offset="0.1" style="stop-color:#FDC70C"/>
<stop offset="0.4" style="stop-color:#F3903F"/>
<stop offset="0.8" style="stop-color:#ED683C"/>
<stop offset="1" style="stop-color:#E93E3A"/>
</linearGradient>
<rect x="434.994" y="48.333" style="fill:url(#SVGID_2_);" width="96.665" height="32.222"/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="676.6573" y1="998.7875" x2="676.6573" y2="-11.0591" gradientTransform="matrix(1 0 0 -1 0 949.7782)">
<stop offset="0" style="stop-color:#FFF33B"/>
<stop offset="0.014" style="stop-color:#FEE72E"/>
<stop offset="0.042" style="stop-color:#FED51B"/>
<stop offset="0.07" style="stop-color:#FDCA10"/>
<stop offset="0.1" style="stop-color:#FDC70C"/>
<stop offset="0.4" style="stop-color:#F3903F"/>
<stop offset="0.8" style="stop-color:#ED683C"/>
<stop offset="1" style="stop-color:#E93E3A"/>
</linearGradient>
<rect x="660.546" y="48.333" style="fill:url(#SVGID_3_);" width="32.222" height="32.222"/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="483.3267" y1="978.3428" x2="483.3267" y2="-21.08" gradientTransform="matrix(1 0 0 -1 0 949.7782)">
<stop offset="0" style="stop-color:#FFF33B"/>
<stop offset="0.014" style="stop-color:#FEE72E"/>
<stop offset="0.042" style="stop-color:#FED51B"/>
<stop offset="0.07" style="stop-color:#FDCA10"/>
<stop offset="0.1" style="stop-color:#FDC70C"/>
<stop offset="0.4" style="stop-color:#F3903F"/>
<stop offset="0.8" style="stop-color:#ED683C"/>
<stop offset="1" style="stop-color:#E93E3A"/>
</linearGradient>
<rect x="451.105" y="886.099" style="fill:url(#SVGID_4_);" width="64.444" height="32.222"/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
<svg height="512" viewBox="0 0 58 58" width="512" xmlns="http://www.w3.org/2000/svg"><g id="024---Star" fill="none"><path id="Shape" d="m40.01 35.73 17.82-14.73h-57.65l17.81 14.73z" fill="#e57e25"/><path id="Shape" d="m11.36 58 17.64-13.83 17.64 13.83c-13.06-44.58-9.09-31.62-17.64-58-11.26 34.76-2.18 6.09-17.64 58z" fill="#f0c419"/><path id="Shape" d="m46.64 58-17.64-13.83v-44.17c8.56 26.44 4.63 13.6 17.64 58z" fill="#f29c1f"/></g></svg>
\ No newline at end of file
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve" width="512px" height="512px"><g><g>
<g>
<path d="M256,0c-49.629,0-90,41.371-90,91c0,49.629,40.371,90,90,90c49.629,0,90-40.371,90-90C346,41.371,305.629,0,256,0z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#FAB446"/>
</g>
</g><g>
<g>
<path d="M286,181h-30h-30c-21.158,0-41.603,5.469-60.19,14.773c31.569,8.518,61.293,20.786,90.19,37.372 c28.898-16.586,58.621-28.854,90.19-37.372C327.603,186.469,307.158,181,286,181z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#FAB446"/>
</g>
</g><g>
<g>
<path d="M482,271c-16.569,0-30,13.431-30,30v60c0,16.567,13.431,30,30,30c16.569,0,30-13.433,30-30v-60 C512,284.431,498.569,271,482,271z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#FAB446"/>
</g>
</g><g>
<g>
<path d="M30,271c-16.569,0-30,13.431-30,30v60c0,16.567,13.431,30,30,30c16.569,0,30-13.433,30-30v-60 C60,284.431,46.569,271,30,271z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#FAB446"/>
</g>
</g><g>
<g>
<path d="M45,211c-8.291,0-15,6.709-15,15v15c33.091,0,60,26.909,60,60v60c0,33.091-26.909,60-60,60v15c0,8.291,6.709,15,15,15 c76.901,0,138.39,24.286,196,61V259.594C183.13,226.414,120.903,211,45,211z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#FAB446"/>
</g>
</g><g>
<g>
<path d="M482,241v-15c0-8.291-6.709-15-15-15c-75.903,0-138.13,15.414-196,48.594V512c57.61-36.714,119.099-61,196-61 c8.291,0,15-6.709,15-15v-15c-33.091,0-60-26.909-60-60v-60C422,267.909,448.909,241,482,241z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#FAB446"/>
</g>
</g></g> </svg>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Odoo</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"
integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap" rel="stylesheet">
</head>
<!-- odoo description page css -->
<style>
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
font-weight: 400;
line-height: 1.1;
color: #21272b;
}
ul {
color: #222020;
}
.oe_styling_v8 a.btn {
color: white;
}
:root {
--primary: #00A09D;
}
</style>
<body>
<div class="container">
<!-- Floating Menu -->
<!-- <div aria-controls="floating_div_red" aria-expanded="true" class="for_open" data-toggle="collapse" href="#floating_div_red" role="button" style="width: 50px;-->
<!-- height: 50px;-->
<!-- background: #e32235;-->
<!-- color: white;-->
<!-- border-radius: 50%;-->
<!-- display: flex;-->
<!-- align-items: center;-->
<!-- justify-content: center;-->
<!-- font-weight: 100;-->
<!-- font-size: 20px;-->
<!-- position: fixed;-->
<!-- bottom: 40px;-->
<!-- left: 40px;-->
<!-- z-index: 1000;-->
<!-- box-shadow: 1px 2px 11px rgba(0, 0, 0, 0.3), -5px 7px 12px rgba(0, 0, 0, 0.22);-->
<!-- cursor: pointer;background-image: radial-gradient( circle farthest-corner at 10% 20%, rgb(235, 36, 39) 0%, rgb(200, 33, 40) 100.4% );">-->
<!-- <i class="fa fa-bars"></i>-->
<!-- </div>-->
<!-- <div class="collapse show" id="floating_div_red" style="position: fixed;-->
<!-- bottom: 20px;-->
<!-- left: 20px;-->
<!-- z-index: 1001;">-->
<!-- <div aria-controls="floating_div_red" aria-expanded="true" class="for_close" data-toggle="collapse" href="#floating_div_red" role="button" style="width: 25px;-->
<!-- height: 25px;-->
<!-- background: #e32235;-->
<!-- color: white;-->
<!-- border-radius: 50%;-->
<!-- display: flex;-->
<!-- align-items: center;-->
<!-- justify-content: center;-->
<!-- font-weight: 100;-->
<!-- margin-left: auto;-->
<!-- font-size: 12px;-->
<!-- margin-bottom: -24px;position: relative;-->
<!-- z-index: 1000;-->
<!-- cursor: pointer;background-image: radial-gradient( circle farthest-corner at 10% 20%, rgb(235, 36, 39) 0%, rgb(200, 33, 40) 100.4% );">-->
<!-- <i class="fa fa-times"></i>-->
<!-- </div>-->
<!-- <div class="ks_box_outer">-->
<!-- <div class="ks_logo">-->
<!-- <img alt="" src="images/floating-menu/bg-float.svg" style="width: calc(100% + 1px);">-->
<!-- </div>-->
<!-- <div class="ks_box_items" style=" margin-top: -32px;-->
<!-- background: #eb2427;-->
<!-- border-radius: 0 0 10px 10px;-->
<!-- padding-bottom: 10px;-->
<!-- position: relative;-->
<!-- ">-->
<!-- <div class="ks_box_items_inner d-flex justify-content-center" style="padding: 10px;">-->
<!--&lt;!&ndash; <a class="d-flex flex-column align-items-center text-white font-weight-light" href="https://forms.gle/3AikiJR7YBLyrmCi8" style="text-decoration: none;font-size: 14px;margin-right: 15px;" target="_blank">&ndash;&gt;-->
<!--&lt;!&ndash; <img alt="" src="images/floating-menu/Film.gif" style="width: 40px;">&ndash;&gt;-->
<!--&lt;!&ndash; <span class="pt-2 font-weight-bold">Request Demo</span>&ndash;&gt;-->
<!--&lt;!&ndash; </a>&ndash;&gt;-->
<!-- <a class="d-flex flex-column align-items-center text-white font-weight-light" href="https://apps.odoo.com/apps/modules/browse?search=ksolves" style="text-decoration: none;font-size: 14px;margin-right: 18px;" target="_blank">-->
<!-- <img alt="" src="images/floating-menu/Files.gif" style="height: 60px;margin-top: -20px;">-->
<!-- <span class="pt-2 font-weight-bold">All Apps</span>-->
<!-- </a>-->
<!--&lt;!&ndash; <a class="d-flex flex-column align-items-center text-white font-weight-light" href="https://demokinetik.kappso.com/ar_AA/" style="text-decoration: none;font-size: 14px;" target="_blank">&ndash;&gt;-->
<!--&lt;!&ndash; <img alt="" src="images/floating-menu/Film.gif" style="width: 40px;">&ndash;&gt;-->
<!--&lt;!&ndash; <span class="pt-2 font-weight-bold">RTL Demo Server</span>&ndash;&gt;-->
<!--&lt;!&ndash; </a>&ndash;&gt;-->
<!-- &lt;!&ndash; <a href="" style="text-decoration: none;font-size: 14px;" class="d-flex flex-column align-items-center text-white font-weight-light">&ndash;&gt;-->
<!-- &lt;!&ndash; <img src="images/floating-menu/Youtube.gif" style="width: 34px;margin-top: 7px;" alt="">&ndash;&gt;-->
<!-- &lt;!&ndash; <span class="pt-2 font-weight-bold">Youtube</span>&ndash;&gt;-->
<!-- &lt;!&ndash; </a>&ndash;&gt;-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- Floating Menu Ends -->
<!-- Header -->
<div class="row justify-content-md-between justify-content-center border-bottom align-items-center py-2 mx-0">
<div class="text-center mr-lg-5 mb-3 mb-lg-0">
<a class="btn p-0">
<img src="https://apps.odoo.com/apps/modules/12.0/ks_dashboard_ninja/images/ksolves-logo.png"
alt="ksolves-logo">
</a>
</div>
<div class="d-flex flex-wrap justify-content-center py-2">
<div class="text-center">
<a class="btn-outline-primary ml-1 mb-2 mb-lg-0 px-3 py-2 mr-2"
style="box-shadow: rgba(0, 0, 0, 0.18) -1px 2px 3px;border-radius: 0;border: 1px solid var(--primary);transition: 0.2s ease-in-out;"
href="https://apps.odoo.com/apps/modules/browse?search=ksolves" target="_blank"><i
class="fa fa-list-alt mr-1"></i> <span class="d-none d-sm-inline">Ksolves</span> All Apps
</a>
<!-- <a class="btn-outline-primary mr-1 mb-2 mb-lg-0 px-3 py-2"-->
<!-- style="box-shadow: rgba(0, 0, 0, 0.18) -1px 2px 3px;border-radius: 0;border: 1px solid var(&#45;&#45;primary);transition: 0.2s ease-in-out;"-->
<!-- href="https://forms.gle/3AikiJR7YBLyrmCi8" target="_blank"><i class="fa fa-desktop mr-1"></i> Request-->
<!-- a Free Demo-->
<!-- </a>-->
</div>
</div>
<div class="mt-md-0 mt-4 mb-3 mb-lg-0">
<a href="#" class="btn-outline-primary btn-sm mb-2 mb-lg-0"
style="font-size: 13px;position: relative;overflow: hidden;padding: 10px 4px;line-height: 0px;border-radius: 0;border: 1px solid var(--primary);transition: 0.2s ease-in-out;"><i
class="fa fa-check"></i> Community</a>
<a href="#" class="btn-outline-primary btn-sm mb-2 mb-lg-0"
style="font-size: 13px;position: relative;overflow: hidden;padding: 10px 4px;line-height: 0px;border-radius: 0;border: 1px solid var(--primary);transition: 0.2s ease-in-out;"><i
class="fa fa-check"></i> Enterprise</a>
<!-- <a class="btn btn-outline-success btn-sm mb-2 mb-lg-0" style="font-size: 13px;border-radius: 4px !important;position: relative;overflow: hidden;color: #585e64;padding: 10px 4px;line-height: 0px;"><i class="fa fa-check"></i> Odoo.sh</a>-->
</div>
</div>
<!-- Hero Description -->
<div class="row align-items-center justify-content-center py-3 mx-0">
<!-- <div class="col-12 col-sm mb-2 mb-lg-0 text-center text-sm-left">-->
<!-- <a href="https://www.facebook.com/Ksolves.India" class="btn btn-sm px-0"-->
<!-- style="border: none; font-size: 10px; width: 30px;color: #3b5999;"> <i class="fa fa-facebook fa-2x"></i>-->
<!-- </a>-->
<!-- <a href="https://www.linkedin.com/company/ksolves" class="btn btn-sm px-0"-->
<!-- style="font-size: 10px;border: none; width: 30px;color:#0077B5;"> <i class="fa fa-linkedin fa-2x"></i>-->
<!-- </a>-->
<!-- <a href="https://www.youtube.com/channel/UCplv9V47g9VidekGN6Wp1ew" class="btn btn-sm px-0"-->
<!-- style="font-size: 10px;border: none; width: 30px;color: #c4302b;"> <i-->
<!-- class="fa fa-youtube-play fa-2x"></i> </a>-->
<!-- <a href="https://twitter.com/ksolves_india" class="btn btn-sm px-0"-->
<!-- style="font-size: 10px;border: none; width: 30px;color: #00acee;"> <i class="fa fa-twitter fa-2x"></i>-->
<!-- </a>-->
<!-- </div>-->
<div class="text-justify py-4">
<h1 class="text-center" style="padding: 0 20px 5px;
font-family: Montserrat;">
Document Preview
</h1>
<p style="font-size: 18px;border-width: 3px;border-style: solid;border-image: linear-gradient(to bottom, #fa6100, rgba(0, 0, 0, 0)) 1 100%;font-family:Roboto;"
class="px-sm-4 p-2 pt-4">
Document Preview saves time and storage of users as it allows them to preview
the document without downloading it. This app can be used in all Odoo modules to display
documents like PDF, image, text, video file format. </p>
<h1 class="heading-title text-center display-4" style="font-size: 2.2rem; word-break: break-all;">
Problems/Solutions</h1>
</div>
<div style="font-size: 14px;line-height: 20px;">
<div class="row no-gutters mb-4">
<div class="col-sm-6 pr-sec p-3 bg-white border border-right-0">
<i class="fa fa-circle" style="position: absolute; color: #e32235; top:-8px; left: -5px;"></i>
<h5 class="text-uppercase mt-0" style="font-size: 16px;">PROBLEM:</h5>
<p style="font-size: 16px;">With the Odoo Module, no preview is available.
</p>
</div>
<div class="col-sm-6 p-3 border border-left-0" style="background: #f1f0f0;">
<i class="fa fa-circle text-success" style="position: absolute; top:-8px; left:-5px;"></i>
<h5 class="text-uppercase mt-0" style="font-size: 16px;">SOLUTION:</h5>
<p style="color: #212829;font-size: 16px;">Document Preview offers a range of file formats such as
image,
text, PDF, audio, and Video to be displayed as a Preview.
</p>
</div>
</div>
<div class="row no-gutters mb-4">
<div class="col-sm-6 pr-sec p-3 bg-white border border-right-0">
<i class="fa fa-circle" style="position: absolute; color: #e32235; top:-8px; left: -5px;"></i>
<h5 class="text-uppercase mt-0" style="font-size: 16px;">PROBLEM:</h5>
<p style="font-size: 16px;">The user had to view the preview in the Attachment (Technical) module.
</p>
</div>
<div class="col-sm-6 p-3 border border-left-0" style="background: #f1f0f0;">
<i class="fa fa-circle text-success" style="position: absolute; top:-8px; left:-5px;"></i>
<h5 class="text-uppercase mt-0" style="font-size: 16px;">SOLUTION:</h5>
<p style="color: #212829;font-size: 16px;">This app lets the user preview in all Odoo modules.
</p>
</div>
</div>
<div class="my-4">
<div class="text-center p-2 d-flex justify-content-center align-items-center col-lg-9" style="background-color: #FF9A8B;
background-image: linear-gradient(90deg, #FF9A8B 0%, #FF6A88 55%, #FF99AC 100%);
box-shadow: 1px 2px 11px rgba(0, 0, 0, 0), 1px 11px 12px rgba(0, 0, 0, 0.22);margin: auto;">
<h3 class="font-weight-bold mb-0 mr-3 text-light">Note: </h3>
<h5 class="mb-0 text-light" style="margin-top: 2px;">
Extensively Tested on Odoo Vanilla with Ubuntu OS
</h5>
</div>
</div>
</div>
</div>
<div class="suggested-app">
<div class="row pt-4 px-3">
<div class="w-100">
<!-- Nav tabs -->
<ul class="nav nav-tabs mb-4 justify-content-center bg-transparent">
<li class="nav-item ml-4"
style="border-radius:0;margin: 0 10px 10px 10px;background-color: #FBAB7E;background-image: linear-gradient(62deg, #fbd69d 0%, #f9c36f 100%);">
<a class="nav-link active"
style="border-radius: 0;transition: 0.3s ease-in-out;border-color:#fdc6a3;color: #000;font-family: Roboto;font-weight: 500;"
data-toggle="tab" href="#pills-home">FEATURES</a>
</li>
<li class="nav-item"
style="border-radius:0;margin: 0 10px 10px 10px;background-color: #FBAB7E;background-image: linear-gradient(62deg, #fbd69d 0%, #f9c36f 100%);">
<a class="nav-link "
style="border-radius: 0;transition: 0.3s ease-in-out;border-color:#fdc6a3;color: #000;font-family: Roboto;font-weight: 500;"
data-toggle="tab" href="#pills-kinetik">WHY CHOOSE US</a>
</li>
<li class="nav-item"
style="border-radius:0;margin: 0 10px 10px 10px;background-color: #FBAB7E;background-image: linear-gradient(62deg, #fbd69d 0%, #f9c36f 100%);">
<a class="nav-link "
style="border-radius: 0;transition: 0.3s ease-in-out;border-color:#fdc6a3;color: #000;font-family: Roboto;font-weight: 500;"
data-toggle="tab" href="#pills-set_up">HOW IT WORKS</a>
</li>
<li class="nav-item"
style="border-radius:0;margin: 0 10px 10px 10px;background-color: #FBAB7E;background-image: linear-gradient(62deg, #fbd69d 0%, #f9c36f 100%);">
<a class="nav-link"
style="border-radius: 0;transition: 0.3s ease-in-out;border-color:#fdc6a3;color: #000;font-family: Roboto;font-weight: 500;"
data-toggle="tab" href="#pills-faqs">FAQs</a>
</li>
</ul>
<div class="tab-content" id="pills-tabContent">
<div class="tab-pane fade show active" id="pills-home">
<div class="mb-4">
</div>
<div class="text-left py-4">
<h2 class="mb-3 display-4" style="font-size: 2.6rem; ">
<span style="color: #e32235;">Key</span> Features</h2>
</div>
<div class="card p-4 p-lg-5 mb-4 border-0"
style="border-radius: .25rem;box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); color: #002966;">
<div class="row">
<div class="col-12 col-lg-6">
<ul class="list-unstyled" style="font-size:16px;color: #222020;">
<li class="d-flex align-items-baseline mb-3">
<div><img src="images/forward-arrow.svg" alt="arrow"
style="width:15px;margin-right:10px"></div>
<span>Supports Multiple Files such as images, texts, PDFs, and Videos.</span>
</li>
<li class="d-flex align-items-baseline mb-3">
<div><img src="images/forward-arrow.svg" alt="arrow"
style="width:15px;margin-right:10px"></div>
<span>Preview Files from Anywhere Inside the Odoo Module.</span>
</li>
<li class="d-flex align-items-baseline mb-3">
<div><img src="images/forward-arrow.svg" alt="arrow"
style="width:15px;margin-right:10px"></div>
<span>Document Preview enables support to preview binary files directly in Odoo.</span>
</li>
</ul>
</div>
</div>
</div>
<!-- <div>-->
<!-- <ul class="list-unstyled pl-0 bg-white" style="font-size:15px;">-->
<!-- <li class="d-flex align-items-baseline p-4 font-weight-bold" style="border-radius: 10px;font-size: 16px;">-->
<!-- <h2 style="border-width: 3px;-->
<!-- border-style: solid;-->
<!-- border-image: linear-gradient( to bottom, #fa6100, rgba(0, 0, 0, 0) ) 0 0 100%;-->
<!-- display: inline-block;-->
<!-- padding: 0 20px 5px;-->
<!-- font-family: Montserrat;margin: auto;">-->
<!-- WEBHOOK-->
<!-- </h2>-->
<!-- </li>-->
<!-- <li>-->
<!-- <img alt="arrow" class="my-4" src="preview_images/img/webhook.jpg" style="max-width:100%;">-->
<!-- </li>-->
<!-- </ul>-->
<!-- </div>-->
</div>
<div class="tab-pane fade" id="pills-kinetik">
<div class="tab-pane">
<div>
<ul class="list-unstyled px-lg-5 px-2">
<li class="d-flex align-items-center flex-wrap font-weight-bold py-3">
<img src="images/star.svg"
style="width:20px;height:20px;margin-right: 10px;"/>
Works with custom binary fields.
</li>
<li class="d-flex align-items-center flex-wrap font-weight-bold py-3">
<img src="images/star.svg"
style="width:20px;height:20px;margin-right: 10px;"/>
Support Multiple File Formats.
<ul class="list-unstyled w-100 font-weight-normal pl-4">
<li class="pt-2">- File formats such as Pdf, txt, jpeg, mp4, etc.</li>
</ul>
</li>
<li class="d-flex align-items-center flex-wrap font-weight-bold py-3">
<img src="images/star.svg"
style="width:20px;height:20px;margin-right: 10px;"/>
No setup required.
</li>
</ul>
</div>
</div>
</div>
<div class="tab-pane fade" id="pills-set_up">
<div class="tab-pane text-center">
<span class="text-center my-4" style="font-size: 20px;font-weight: 400;color: #8482b2;"><b>HOW IT WORKS</b></span>
</div>
<div class="tab-pane">
<div>
<ul class="list-unstyled pl-0 bg-white" style="font-size:15px;">
<li class="d-flex align-items-baseline mb-2 p-3">
<span>
<img src="images/forward-arrow01.svg" alt="arrow"
style="width:15px;margin-right:10px">
If you’re adding the Binary Field to a new code or already working code,
then add <b>attachmnt=True</b> in python model wherever you
wish to add the field.<br>
<img src="preview_images/1.0.png" alt="arrow" style="max-width:100%;"
class="my-4 border">
</span>
</li>
</ul>
<ul class="list-unstyled pl-0 bg-white" style="font-size:15px;">
<li class="d-flex align-items-baseline mb-2 p-3">
<span>
<img src="images/forward-arrow01.svg" alt="arrow"
style="width:15px;margin-right:10px">
A button like(
<i class="fa fa-file-text-o" style="padding: 0px 2px; color: #7C7BAD;"
title="Sample Button"></i>
) will be visible beside the all binary field like shown in the below image.
<br>
<img src="preview_images/1.1.png" alt="arrow" style="max-width:100%;"
class="my-4 border">
</span>
</li>
</ul>
</div>
</div>
</div>
<div class="tab-pane fade" id="pills-faqs">
<ul class="list-unstyled mt-5 px-5">
<li class="mb-3 d-flex align-items-baseline bg-white"
style="border-radius: 10px; padding: 15px;border-left: 11px solid #ff6f88;border-right: 11px solid #ff6f88;box-shadow: 0px 0px 7px 1px #c7c5c5;">
<img src="images/forward-arrow.svg" alt="arrow"
style="width:15px;margin-right:10px">
<div class="">
<h6 class="font-weight-bold">Is this app compatible with Odoo Enterprise?</h6>
<span style="font-size:13px;">Yes, our app works with Odoo Enterprise as well as Community.</span>
</div>
</li>
<li class="mb-3 d-flex align-items-baseline bg-white"
style="border-radius: 10px; padding: 15px;border-left: 11px solid #ff6f88;border-right: 11px solid #ff6f88;box-shadow: 0px 0px 7px 1px #c7c5c5;">
<img src="images/forward-arrow.svg" alt="arrow"
style="width:15px;margin-right:10px">
<div class="">
<h6 class="font-weight-bold">Does the preview works with custom binary fields?</h6>
<span style="font-size:13px;">Yes , but you have to make the field Attachment = True.</span>
</div>
</li>
<li class="mb-3 d-flex align-items-baseline bg-white"
style="border-radius: 10px; padding: 15px;border-left: 11px solid #ff6f88;border-right: 11px solid #ff6f88;box-shadow: 0px 0px 7px 1px #c7c5c5;">
<img src="images/forward-arrow.svg" alt="arrow"
style="width:15px;margin-right:10px">
<div class="">
<h6 class="font-weight-bold">What type of files does it support for preview?</h6>
<span style="font-size:13px;">It supports most of the file formats like Pdf, txt, jpg, mp4.</span>
</div>
</li>
<li class="mb-3 d-flex align-items-baseline bg-white"
style="border-radius: 10px; padding: 15px;border-left: 11px solid #ff6f88;border-right: 11px solid #ff6f88;box-shadow: 0px 0px 7px 1px #c7c5c5;">
<img src="images/forward-arrow.svg" alt="arrow"
style="width:15px;margin-right:10px">
<div class="">
<h6 class="font-weight-bold">Need some customization in this app, whom to
contact?</h6>
<span style="font-size:13px;">Please drop email at sales@ksolves.com or raise a
ticket through Odoo store itself.</span>
</div>
</li>
<!-- <li class="mb-3 d-flex align-items-baseline bg-white"-->
<!-- style="border-radius: 10px; padding: 15px;border-left: 11px solid #ff6f88;border-right: 11px solid #ff6f88;box-shadow: 0px 0px 7px 1px #c7c5c5;">-->
<!-- <img src="images/forward-arrow.svg" alt="arrow"-->
<!-- style="width:15px;margin-right:10px">-->
<!-- <div class="">-->
<!-- <h6 class="font-weight-bold">Do you provide any free support?</h6>-->
<!-- <span style="font-size:13px;">Yes, we do provide free support for 90 days for-->
<!-- any queries or any bug/issue fixing.</span>-->
<!-- </div>-->
<!-- </li>-->
</ul>
</div>
</div>
</div>
</div>
<!-- Popular Apps -->
<div class="row pb-sm-5">
<h2 class="w-100 text-center mb-3" style="font-weight: 400;">Ksolves Suggested Apps</h2>
<div class="text-center w-100 mb-1">
<img src="images/line.png" alt="ksolves">
</div>
<div id="demo" class="carousel slide pb-5 col-12 col-lg-8 mx-auto" data-ride="carousel">
<!-- Indicators -->
<ul class="carousel-indicators">
<li data-target="#demo" style="background-color: #9d7092;" data-slide-to="0"
class="active"></li>
<li data-target="#demo" style="background-color: #9d7092;" data-slide-to="1"></li>
</ul>
<!-- The slideshow -->
<div class="carousel-inner pt-4 pt-lg-5 ">
<div class="carousel-item px-4 active">
<div class="row pb-sm-4 no-lg-gutters">
<div class="col-6 col-sm-3 text-center">
<a href="https://apps.odoo.com/apps/modules/12.0/ks_dashboard_ninja/"
class="d-block" target="_blank" style="text-decoration: none;">
<img src="images/app-logo/dashboard-ninja.png" alt="dashboard-ninja">
<div class="card-body text-center p-0 mt-3 mb-3 mb-lg-0">
<h5 class="card-text m-0" style="font-size: 16px; font-weight: 600">
Dashboard <br> Ninja</h5>
</div>
</a>
</div>
<div class="col-6 col-sm-3 text-center">
<a href="https://apps.odoo.com/apps/modules/12.0/ks_list_view_manager/"
target="_blank" style="text-decoration: none;">
<img src="images/app-logo/list-view-manager.png" alt="list-view-manager">
<div class="card-body text-center p-0 mt-3 mb-3 mb-lg-0">
<h5 class="card-text m-0" style="font-size: 16px; font-weight: 600">List
View <br> Manager</h5>
</div>
</a>
</div>
<div class="col-6 col-sm-3 text-center">
<a href="https://apps.odoo.com/apps/modules/13.0/ks_leaderboard/" class="d-block"
target="_blank" style="text-decoration: none;">
<img src="images/app-logo/leaderboard.png" alt="Leaderboard-Ninja">
<div class="card-body text-center p-0 mt-3 mb-3 mb-lg-0">
<h5 class="card-text m-0" style="font-size: 16px; font-weight: 600">
Leaderboard <br>Ninja</h5>
</div>
</a>
</div>
<div class="col-6 col-sm-3 text-center">
<a href="https://apps.odoo.com/apps/modules/11.0/ks_oneclick_sale_purchase/"
target="_blank" style="text-decoration: none;">
<img src="images/app-logo/one-click-sale.png" alt="list-view-manager">
<div class="card-body text-center p-0 mt-3 mb-3 mb-lg-0">
<h5 class="card-text m-0" style="font-size: 16px; font-weight: 600">One
Click <br>Sale/Purchase</h5>
</div>
</a>
</div>
</div>
<div class="row pt-3 pb-4 no-gutters">
<div class="col-6 col-sm-3 text-center">
<a href="https://apps.odoo.com/apps/modules/12.0/ks_theme_base/" target="_blank"
style="text-decoration: none;">
<img src="images/app-logo/ksolves-theme-base.png" alt="ksolves-theme-base">
<div class="card-body text-center p-0 mt-3 mb-3 mb-lg-0">
<h5 class="card-text m-0" style="font-size: 16px; font-weight: 600">Ksolves
<br>Theme Base</h5>
</div>
</a>
</div>
<div class="col-6 col-sm-3 text-center">
<a href="https://apps.odoo.com/apps/modules/12.0/ks_pos_order_notes/"
class="d-block" target="_blank" style="text-decoration: none;">
<img src="images/app-logo/pos-per-item.png" alt="pos-per-item">
<div class="card-body text-center p-0 mt-3 mb-3 mb-lg-0">
<h5 class="card-text m-0" style="font-size: 16px; font-weight: 600">POS Per
Item <br>& Order Note</h5>
</div>
</a>
</div>
<div class="col-6 col-sm-3 text-center">
<a href="https://apps.odoo.com/apps/modules/12.0/ks_pos_dashboard_ninja/"
target="_blank" style="text-decoration: none;">
<img src="images/app-logo/pos_dashboard_ninja.png" alt="pos_dashboard_ninja">
<div class="card-body text-center p-0 mt-3 mb-3 mb-lg-0">
<h5 class="card-text m-0" style="font-size: 16px; font-weight: 600">POS <br>Dashboard
Ninja</h5>
</div>
</a>
</div>
<div class="col-6 col-sm-3 text-center">
<a href="https://apps.odoo.com/apps/modules/12.0/web_listview_sticky_header/"
class="d-block" target="_blank" style="text-decoration: none;">
<img src="images/app-logo/listview_sticky_header.png"
alt="listview_sticky_header">
<div class="card-body text-center p-0 mt-3 mb-3 mb-lg-0">
<h5 class="card-text m-0" style="font-size: 16px; font-weight: 600">List
View <br>Sticky Header</h5>
</div>
</a>
</div>
</div>
</div>
<div class="carousel-item px-4">
<div class="row pb-sm-4 no-gutters">
<div class="col-6 col-sm-3 text-center">
<a href="https://apps.odoo.com/apps/modules/12.0/ks_pos_low_stock_alert/"
target="_blank" style="text-decoration: none;">
<img src="images/app-logo/pos_low_stock_alert.png" alt="POS Low Stock Alert">
<div class="card-body text-center p-0 mt-3 mb-3 mb-lg-0">
<h5 class="card-text m-0" style="font-size: 16px; font-weight: 600">POS
Low<br>Stock Alert</h5>
</div>
</a>
</div>
<div class="col-6 col-sm-3 text-center">
<a href="https://apps.odoo.com/apps/modules/12.0/universal_discount/"
class="d-block" target="_blank" style="text-decoration: none;">
<img src="images/app-logo/universal_discount.png" alt="Universal Discount">
<div class="card-body text-center p-0 mt-3 mb-3 mb-lg-0">
<h5 class="card-text m-0" style="font-size: 16px; font-weight: 600">
Universal <br>Discount</h5>
</div>
</a>
</div>
<div class="col-6 col-sm-3 text-center">
<a href="https://apps.odoo.com/apps/modules/13.0/ks_custom_report/" target="_blank"
style="text-decoration: none;">
<img src="images/app-logo/report_mate.png" alt="ReportMate">
<div class="card-body text-center p-0 mt-3 mb-3 mb-lg-0">
<h5 class="card-text m-0" style="font-size: 16px; font-weight: 600">
ReportMate</h5>
</div>
</a>
</div>
<div class="col-6 col-sm-3 text-center">
<a href="https://apps.odoo.com/apps/modules/13.0/ks_woocommerce/" target="_blank"
style="text-decoration: none;">
<img src="images/app-logo/woocommerce_icon.png"
alt="odoo_woocommerce_connector">
<div class="card-body text-center p-0 mt-3 mb-3 mb-lg-0">
<h5 class="card-text m-0" style="font-size: 16px; font-weight: 600">Odoo
Woocommerce <br>Connector</h5>
</div>
</a>
</div>
</div>
<div class="row pt-3 pb-4 no-gutters">
<div class="col-6 col-sm-3 text-center">
<a href="https://apps.odoo.com/apps/modules/12.0/ks_office365_calendar/"
target="_blank" style="text-decoration: none;">
<img src="images/app-logo/office365_calendar.png"
alt="office365_calendar_connector">
<div class="card-body text-center p-0 mt-3 mb-3 mb-lg-0">
<h5 class="card-text m-0" style="font-size: 16px; font-weight: 600">
Office365 Calendar<br>Connector</h5>
</div>
</a>
</div>
<div class="col-6 col-sm-3 text-center">
<a href="https://apps.odoo.com/apps/modules/12.0/ks_office365_contacts/"
target="_blank" style="text-decoration: none;">
<img src="images/app-logo/office365_contact.png"
alt="office365_contacts_connector">
<div class="card-body text-center p-0 mt-3 mb-3 mb-lg-0">
<h5 class="card-text m-0" style="font-size: 16px; font-weight: 600">
Office365 Contacts<br>Connector</h5>
</div>
</a>
</div>
<div class="col-6 col-sm-3 text-center">
<a href="https://apps.odoo.com/apps/modules/12.0/odoo_paytm_gateway/"
target="_blank" style="text-decoration: none;">
<img src="images/app-logo/odoo_paytm_gateway.png" alt="odoo_paytm_gateway">
<div class="card-body text-center p-0 mt-3 mb-3 mb-lg-0">
<h5 class="card-text m-0" style="font-size: 16px; font-weight: 600">Odoo
Paytm <br>Gateway</h5>
</div>
</a>
</div>
<div class="col-6 col-sm-3 text-center">
<a href="https://apps.odoo.com/apps/modules/12.0/ks_low_stock_alert/"
class="d-block" target="_blank" style="text-decoration: none;">
<img src="images/app-logo/low_stock_alert.png" alt="low_stock_alert">
<div class="card-body text-center p-0 mt-3 mb-3 mb-lg-0">
<h5 class="card-text m-0" style="font-size: 16px; font-weight: 600">Low
Stock<br>Alert</h5>
</div>
</a>
</div>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo" data-slide="prev" style="left: -5%; width: 60px;">
<i class="fa fa-angle-left" style="font-size: 5vw;color: #333;"></i>
</a>
<a class="carousel-control-next" href="#demo" data-slide="next" style="right: -5%; width: 60px;">
<i class="fa fa-angle-right" style="font-size: 5vw;color: #333;"></i>
</a>
</div>
</div>
<!-- Ksolves Odoo Services -->
<div class="row pb-sm-5 px-1 pb-4">
<h2 class="w-100 text-center my-3" style="font-weight: 400;">Ksolves Odoo Services</h2>
<div class="text-center w-100 mb-4">
<img src="images/line.png" alt="ksolves">
</div>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card text-center"
style="min-height: 90px;background-color: #8BC6EC;background-image: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%);">
<div class="pt-4">
<img src="images/support.png" alt="support">
</div>
<div class="card-body">
<h5 class="card-title text-white" style="font-size: 19px; font-weight: 400;">Odoo
Implementation</h5>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card text-center"
style="min-height: 90px;background-color: #8BC6EC;background-image: linear-gradient(135deg, #949fe4 0%, #8cc3ec 100%);">
<div class="pt-4">
<img src="images/apps.png" style="min-height: 64px;" alt="apps">
</div>
<div class="card-body">
<h5 class="card-title text-white" style="font-size: 19px; font-weight: 400;">Odoo Community
Apps</h5>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card text-center"
style="min-height: 90pxbackground-color: #8BC6EC;background-image: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%);">
<div class="pt-4">
<img src="images/support2.png" alt="support2">
</div>
<div class="card-body">
<h5 class="card-title text-white" style="font-size: 19px; font-weight: 400;">Odoo Support
&amp; Maintenance</h5>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card text-center"
style="min-height: 90px;background-color: #8BC6EC;background-image: linear-gradient(135deg, #949fe4 0%, #8cc3ec 100%);">
<div class="pt-4">
<img src="images/custom.png" alt="custom">
</div>
<div class="card-body">
<h5 class="card-title text-white" style="font-size: 19px; font-weight: 400;">Odoo
Customization</h5>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card text-center"
style="min-height: 90px;background-color: #8BC6EC;background-image: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%);">
<div class="pt-4">
<img src="images/integrated.png" alt="integrated">
</div>
<div class="card-body">
<h5 class="card-title text-white" style="font-size: 19px; font-weight: 400;">Odoo
Integration Services</h5>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card text-center"
style="min-height: 90px;background-color: #8BC6EC;background-image: linear-gradient(135deg, #949fe4 0%, #8cc3ec 100%);">
<div class="pt-4">
<img src="images/develop.png" alt="develop">
</div>
<div class="card-body">
<h5 class="card-title text-white" style="font-size: 19px; font-weight: 400;">Odoo Developer
Outsourcing</h5>
</div>
</div>
</div>
</div>
<!-- Ksolves Footer -->
<div class="row mx-0 justify-content-sm-between justify-content-center"
style="border-top: 1px solid black;">
<div class="mb-sm-0 mb-3 d-flex align-items-center">
<img src="images/letter.svg" style="width: 35px;height: 35px;margin-right: 20px"/>
<span style="font-size: 18px;font-weight: 400;"
class="text-dark">sales@ksolves.com</span>
</div>
<div class="d-none d-sm-block">
<div class="bg-white" style="width: 50px;height: 1px;margin-top: -1px"></div>
<div
style="border-right: 1px solid black;height: 50px;transform: translateX(-50%);">
</div>
</div>
<div class="d-flex align-items-center">
<span style="font-size: 18px;font-weight: 400;" class="text-dark">+91
120-4299799‬</span>
<img src="images/smartphone.svg"
style="width: 35px;height: 35px;margin-left: 20px;"/>
</div>
</div>
<!-- container End -->
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
</body>
</html>
\ No newline at end of file
odoo.define('ks_binary_file_preview.ks_binary_preview', function(require){
var BasicFields = require('web.basic_fields');
var DocumentViewer = require('mail.DocumentViewer');
var core = require('web.core');
var ajax = require('web.ajax');
var ks_file_data = undefined;
BasicFields.FieldBinaryFile.include({
events: _.extend({}, BasicFields.FieldBinaryFile.prototype.events, {
'click .ks_binary_file_preview': "ks_onAttachmentView",
}),
_renderReadonly: function(){
var self = this;
self._super.apply(this,arguments);
if (!self.res_id) {
self.$el.css('cursor', 'not-allowed');
} else {
self.$el.css('cursor', 'pointer');
self.$el.attr('title', 'Download');
}
self.$el.append(core.qweb.render("ks_preview_button"));
},
ks_onAttachmentView: function(ev){
var self = this;
try {
ev.preventDefault();
ev.stopPropagation();
var ks_mimetype = this.recordData.mimetype;
function ks_docView(ks_file_data){
if(ks_file_data){
var ks_attachment = [{
filename: ks_file_data.name,
id: ks_file_data.id,
is_main: false,
mimetype: ks_file_data.type,
name: ks_file_data.name,
type: ks_file_data.type,
url: "/web/content/" + ks_file_data.id + "?download=true",
}]
var ks_activeAttachmentID = ks_file_data.id;
var ks_attachmentViewer = new DocumentViewer(self, ks_attachment, ks_activeAttachmentID);
ks_attachmentViewer.appendTo($('body'));
}
}
if(ks_mimetype){
ks_file_data = {
'id' : this.recordData.id,
'type' : this.recordData.mimetype || 'application/octet-stream',
'name' : this.recordData.name || this.recordData.display_name || "",
}
ks_docView(ks_file_data);
}
else{
var def = ajax.jsonRpc("/get/record/details", 'call',{
'res_id': this.res_id,
'model': this.model,
'size': this.value,
'res_field': this.field.string || this.name,
});
}
return $.when(def).then(function(vals){
if (vals){
ks_docView(vals);
}
});
}
catch(err) {
alert(err);
}
},
});
});
<template xml:spacer="preserve">
<t t-name="ks_preview_button">
<button type="button" class="ks_binary_file_preview btn btn-secondary fa fa-file-text-o" style="padding: 0px 4px; color: #7C7BAD;" title="Preview" aria-label="Preview"/>
</t>
</template>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="assets_backend" name="board assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/ks_binary_file_preview/static/src/js/ks_binary_preview.js"/>
</xpath>
</template>
</odoo>
\ No newline at end of file
==========
Web Notify
==========
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/12.0/web_notify
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_notify
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/162/12.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
Send instant notification messages to the user in live.
This technical module allows you to send instant notification messages from the server to the user in live.
Two kinds of notification are supported.
* Success: Displayed in a `success` theme color flying popup div
* Danger: Displayed in a `danger` theme color flying popup div
* Warning: Displayed in a `warning` theme color flying popup div
* Information: Displayed in a `info` theme color flying popup div
* Default: Displayed in a `default` theme color flying popup div
**Table of contents**
.. contents::
:local:
Installation
============
This module is based on the Instant Messaging Bus. To work properly, the server must be launched in gevent mode.
Usage
=====
To send a notification to the user you just need to call one of the new methods defined on res.users:
.. code-block:: python
self.env.user.notify_success(message='My success message')
or
.. code-block:: python
self.env.user.notify_danger(message='My danger message')
or
.. code-block:: python
self.env.user.notify_warning(message='My warning message')
or
.. code-block:: python
self.env.user.notify_info(message='My information message')
or
.. code-block:: python
self.env.user.notify_default(message='My default message')
.. figure:: https://raw.githubusercontent.com/OCA/web/12.0/web_notify/static/description/notifications_screenshot.png
:scale: 80 %
:alt: Sample notifications
You can test the behaviour of the notifications by installing this module in a demo database.
Access the users form through Settings -> Users & Companies. You'll see a tab called "Test web notify", here you'll find two buttons that'll allow you test the module.
.. figure:: https://raw.githubusercontent.com/OCA/web/12.0/web_notify/static/description/test_notifications_demo.png
:scale: 80 %
:alt: Sample notifications
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_notify%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* ACSONE SA/NV
* AdaptiveCity
Contributors
~~~~~~~~~~~~
* Laurent Mignon <laurent.mignon@acsone.eu>
* Serpent Consulting Services Pvt. Ltd.<jay.vora@serpentcs.com>
* Aitor Bouzas <aitor.bouzas@adaptivecity.com>
* Shepilov Vladislav <shepilov.v@protonmail.com>
Maintainers
~~~~~~~~~~~
This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
This module is part of the `OCA/web <https://github.com/OCA/web/tree/12.0/web_notify>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
# pylint: disable=missing-docstring
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import models
# pylint: disable=missing-docstring
# Copyright 2016 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Web Notify',
'summary': """
Send notification messages to user""",
'version': '12.0.1.0.0',
'license': 'AGPL-3',
'author': 'ACSONE SA/NV,'
'AdaptiveCity,'
'Odoo Community Association (OCA)',
'website': 'https://github.com/OCA/web',
'depends': [
'web',
'bus',
'base',
],
'data': [
'views/web_notify.xml'
],
'demo': [
'views/res_users_demo.xml'
],
'installable': True,
}
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_notify
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-02-12 17:13+0000\n"
"Last-Translator: Hans Henrik Gabelgaard <hhg@gabelgaard.org>\n"
"Language-Team: none\n"
"Language: da\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10\n"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:44
#, python-format
msgid "Danger"
msgstr "Fare"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:60
#, python-format
msgid "Default"
msgstr "Standard"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:54
#, python-format
msgid "Information"
msgstr "Information"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name
msgid "Notify Danger Channel Name"
msgstr ""
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name
msgid "Notify Default Channel Name"
msgstr ""
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name
msgid "Notify Info Channel Name"
msgstr ""
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name
msgid "Notify Success Channel Name"
msgstr ""
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name
msgid "Notify Warning Channel Name"
msgstr ""
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:75
#, python-format
msgid "Sending a notification to another user is forbidden."
msgstr "Afsendelse af notifikation til anden bruger er ikke tilladt."
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:38
#, python-format
msgid "Success"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test danger notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test default notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test info notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test success notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test warning notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test web notify"
msgstr ""
#. module: web_notify
#: model:ir.model,name:web_notify.model_res_users
msgid "Users"
msgstr "Brugere"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:50
#, python-format
msgid "Warning"
msgstr "Advarsel"
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_notify
#
# Translators:
# Niki Waibel <niki.waibel@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-03 01:37+0000\n"
"PO-Revision-Date: 2017-02-03 01:37+0000\n"
"Last-Translator: Niki Waibel <niki.waibel@gmail.com>, 2017\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:44
#, python-format
msgid "Danger"
msgstr ""
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:60
#, python-format
msgid "Default"
msgstr ""
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:54
#, python-format
msgid "Information"
msgstr "Information"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name
#, fuzzy
msgid "Notify Danger Channel Name"
msgstr "Name des Warnungen-Kanals"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name
#, fuzzy
msgid "Notify Default Channel Name"
msgstr "Name des Informationen-Kanals"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name
#, fuzzy
msgid "Notify Info Channel Name"
msgstr "Name des Informationen-Kanals"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name
#, fuzzy
msgid "Notify Success Channel Name"
msgstr "Name des Informationen-Kanals"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name
#, fuzzy
msgid "Notify Warning Channel Name"
msgstr "Name des Warnungen-Kanals"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:75
#, python-format
msgid "Sending a notification to another user is forbidden."
msgstr ""
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:38
#, python-format
msgid "Success"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test danger notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test default notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test info notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test success notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test warning notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test web notify"
msgstr ""
#. module: web_notify
#: model:ir.model,name:web_notify.model_res_users
msgid "Users"
msgstr "Benutzer"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:50
#, python-format
msgid "Warning"
msgstr "Warnung"
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_notify
#
# Translators:
# Pedro M. Baeza <pedro.baeza@gmail.com>, 2016
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-12-23 02:13+0000\n"
"PO-Revision-Date: 2020-07-09 18:19+0000\n"
"Last-Translator: claudiagn <claudia.gargallo@qubiq.es>\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10\n"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:44
#, python-format
msgid "Danger"
msgstr "Peligro"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:60
#, python-format
msgid "Default"
msgstr "Por defecto"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:54
#, python-format
msgid "Information"
msgstr "Información"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name
#, fuzzy
msgid "Notify Danger Channel Name"
msgstr "Nombre del canal de avisos notificados"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name
#, fuzzy
msgid "Notify Default Channel Name"
msgstr "Nombre del canal de información notificada"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name
#, fuzzy
msgid "Notify Info Channel Name"
msgstr "Nombre del canal de información notificada"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name
#, fuzzy
msgid "Notify Success Channel Name"
msgstr "Nombre del canal de información notificada"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name
#, fuzzy
msgid "Notify Warning Channel Name"
msgstr "Nombre del canal de avisos notificados"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:75
#, python-format
msgid "Sending a notification to another user is forbidden."
msgstr "Enviar una notificación a otro usuario está prohibido."
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:38
#, python-format
msgid "Success"
msgstr "Éxito"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test danger notification"
msgstr "Notificación test de peligro"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test default notification"
msgstr "Notificación test por defecto"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test info notification"
msgstr "Notificación test de info"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test success notification"
msgstr "Notificación test de éxito"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test warning notification"
msgstr "Notificación test de aviso"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test web notify"
msgstr "Test de notificación web"
#. module: web_notify
#: model:ir.model,name:web_notify.model_res_users
msgid "Users"
msgstr "Usuarios"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:50
#, python-format
msgid "Warning"
msgstr "Advertencia"
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_notify
#
# Translators:
# Bole <bole@dajmi5.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-28 18:03+0000\n"
"PO-Revision-Date: 2019-11-18 14:34+0000\n"
"Last-Translator: Bole <bole@dajmi5.com>\n"
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<="
"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 3.8\n"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:44
#, python-format
msgid "Danger"
msgstr "Opasnost"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:60
#, python-format
msgid "Default"
msgstr "Zadano"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:54
#, python-format
msgid "Information"
msgstr "Informacija"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name
msgid "Notify Danger Channel Name"
msgstr "Naziv kanala upozorenja"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name
msgid "Notify Default Channel Name"
msgstr "Naziv kanala informacija"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name
#, fuzzy
msgid "Notify Info Channel Name"
msgstr "Naziv kanala informacija"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name
#, fuzzy
msgid "Notify Success Channel Name"
msgstr "Naziv kanala informacija"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name
#, fuzzy
msgid "Notify Warning Channel Name"
msgstr "Naziv kanala upozorenja"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:75
#, python-format
msgid "Sending a notification to another user is forbidden."
msgstr "Slanje obavijesti drugom korisniku je zabranjeno."
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:38
#, python-format
msgid "Success"
msgstr "Uspješno"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test danger notification"
msgstr "Testiraj obavjesti o opasnosti"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test default notification"
msgstr "Testiraj zadane obavijesti"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test info notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test success notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test warning notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test web notify"
msgstr ""
#. module: web_notify
#: model:ir.model,name:web_notify.model_res_users
msgid "Users"
msgstr "Korisnici"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:50
#, python-format
msgid "Warning"
msgstr "Upozorenje"
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_notify
#
# Translators:
# Peter Hageman <hageman.p@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-13 16:07+0000\n"
"PO-Revision-Date: 2017-07-13 16:07+0000\n"
"Last-Translator: Peter Hageman <hageman.p@gmail.com>, 2017\n"
"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/"
"teams/23907/nl_NL/)\n"
"Language: nl_NL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:44
#, python-format
msgid "Danger"
msgstr ""
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:60
#, python-format
msgid "Default"
msgstr ""
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:54
#, python-format
msgid "Information"
msgstr "Informatie"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name
msgid "Notify Danger Channel Name"
msgstr ""
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name
msgid "Notify Default Channel Name"
msgstr ""
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name
msgid "Notify Info Channel Name"
msgstr ""
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name
msgid "Notify Success Channel Name"
msgstr ""
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name
msgid "Notify Warning Channel Name"
msgstr ""
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:75
#, python-format
msgid "Sending a notification to another user is forbidden."
msgstr ""
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:38
#, python-format
msgid "Success"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test danger notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test default notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test info notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test success notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test warning notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test web notify"
msgstr ""
#. module: web_notify
#: model:ir.model,name:web_notify.model_res_users
msgid "Users"
msgstr "Gebruikers"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:50
#, python-format
msgid "Warning"
msgstr "Waarschuwing"
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_notify
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-11-17 14:35+0000\n"
"Last-Translator: Pedro Castro Silva <pedrocs@exo.pt>\n"
"Language-Team: none\n"
"Language: pt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.8\n"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:44
#, python-format
msgid "Danger"
msgstr "Perigo"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:60
#, python-format
msgid "Default"
msgstr "Predefinido"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:54
#, python-format
msgid "Information"
msgstr "Informação"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name
msgid "Notify Danger Channel Name"
msgstr "Nome do Canal de Notificações de Perigo"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name
msgid "Notify Default Channel Name"
msgstr "Nome do Canal de Notificações Predefinidas"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name
msgid "Notify Info Channel Name"
msgstr "Nome do Canal de Notificações Info"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name
msgid "Notify Success Channel Name"
msgstr "Nome do Canal de Notificações de Sucesso"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name
msgid "Notify Warning Channel Name"
msgstr "Nome do Canal de Notificações de Aviso"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:75
#, python-format
msgid "Sending a notification to another user is forbidden."
msgstr "Enviar uma notificação a outro utilizador é proibido."
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:38
#, python-format
msgid "Success"
msgstr "Sucesso"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test danger notification"
msgstr "Testar notificação de perigo"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test default notification"
msgstr "Testar notificação predefinida"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test info notification"
msgstr "Testar notificação de info"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test success notification"
msgstr "Testar notificação de sucesso"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test warning notification"
msgstr "Testar notificação de aviso"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test web notify"
msgstr "Testar notificação web"
#. module: web_notify
#: model:ir.model,name:web_notify.model_res_users
msgid "Users"
msgstr "Utilizadores"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:50
#, python-format
msgid "Warning"
msgstr "Aviso"
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_notify
#
# Translators:
# Rodrigo de Almeida Sottomaior Macedo <rmsolucoeseminformatic4@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-22 08:27+0000\n"
"PO-Revision-Date: 2019-08-30 15:23+0000\n"
"Last-Translator: Rodrigo Macedo <rmsolucoeseminformatic4@gmail.com>\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/"
"23907/pt_BR/)\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.8\n"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:44
#, python-format
msgid "Danger"
msgstr "Perigo"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:60
#, python-format
msgid "Default"
msgstr "Padrão"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:54
#, python-format
msgid "Information"
msgstr "Informação"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name
msgid "Notify Danger Channel Name"
msgstr "Notificar o nome do canal de perigo"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name
msgid "Notify Default Channel Name"
msgstr "Notificar o nome do canal padrão"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name
msgid "Notify Info Channel Name"
msgstr "Notificar o nome do canal de informações"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name
msgid "Notify Success Channel Name"
msgstr "Notificar o nome do canal de sucesso"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name
msgid "Notify Warning Channel Name"
msgstr "Notificar o nome do canal de alerta"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:75
#, python-format
msgid "Sending a notification to another user is forbidden."
msgstr "É proibido enviar uma notificação para outro usuário."
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:38
#, python-format
msgid "Success"
msgstr "Sucesso"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test danger notification"
msgstr "Notificação de teste de perigo"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test default notification"
msgstr "Notificação de Teste padrão"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test info notification"
msgstr "Notificação de Teste informativo"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test success notification"
msgstr "Notificação de Teste de sucesso"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test warning notification"
msgstr "Notificação de Teste de alerta"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test web notify"
msgstr "Notificação de Web Teste"
#. module: web_notify
#: model:ir.model,name:web_notify.model_res_users
msgid "Users"
msgstr "Usuários"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:50
#, python-format
msgid "Warning"
msgstr "Alerta"
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_notify
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \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: web_notify
#: code:addons/web_notify/models/res_users.py:44
#, python-format
msgid "Danger"
msgstr ""
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:60
#, python-format
msgid "Default"
msgstr ""
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:54
#, python-format
msgid "Information"
msgstr ""
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name
msgid "Notify Danger Channel Name"
msgstr ""
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name
msgid "Notify Default Channel Name"
msgstr ""
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name
msgid "Notify Info Channel Name"
msgstr ""
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name
msgid "Notify Success Channel Name"
msgstr ""
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name
msgid "Notify Warning Channel Name"
msgstr ""
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:75
#, python-format
msgid "Sending a notification to another user is forbidden."
msgstr ""
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:38
#, python-format
msgid "Success"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test danger notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test default notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test info notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test success notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test warning notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test web notify"
msgstr ""
#. module: web_notify
#: model:ir.model,name:web_notify.model_res_users
msgid "Users"
msgstr ""
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:50
#, python-format
msgid "Warning"
msgstr ""
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_notify
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-09-01 12:52+0000\n"
"Last-Translator: 黎伟杰 <674416404@qq.com>\n"
"Language-Team: none\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 3.8\n"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:44
#, python-format
msgid "Danger"
msgstr "危险"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:60
#, python-format
msgid "Default"
msgstr "默认"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:54
#, python-format
msgid "Information"
msgstr "信息"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name
msgid "Notify Danger Channel Name"
msgstr "通知危险频道名称"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name
msgid "Notify Default Channel Name"
msgstr "通知默认频道名称"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name
msgid "Notify Info Channel Name"
msgstr "通知信息频道名称"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name
msgid "Notify Success Channel Name"
msgstr "通知成功频道名称"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name
msgid "Notify Warning Channel Name"
msgstr "通知警告频道名称"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:75
#, python-format
msgid "Sending a notification to another user is forbidden."
msgstr "禁止向其他用户发送通知。"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:38
#, python-format
msgid "Success"
msgstr "成功"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test danger notification"
msgstr "测试危险通知"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test default notification"
msgstr "测试默认通知"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test info notification"
msgstr "测试信息通知"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test success notification"
msgstr "测试成功通知"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test warning notification"
msgstr "测试警告通知"
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test web notify"
msgstr "测试网站通知"
#. module: web_notify
#: model:ir.model,name:web_notify.model_res_users
msgid "Users"
msgstr "用户"
#. module: web_notify
#: code:addons/web_notify/models/res_users.py:50
#, python-format
msgid "Warning"
msgstr "警告"
# pylint: disable=missing-docstring
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import res_users
# pylint: disable=missing-docstring
# Copyright 2016 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, exceptions, fields, models
DEFAULT_MESSAGE = "Default message"
SUCCESS = "success"
DANGER = "danger"
WARNING = "warning"
INFO = "info"
DEFAULT = "default"
class ResUsers(models.Model):
_inherit = "res.users"
@api.depends("create_date")
def _compute_channel_names(self):
for record in self:
res_id = record.id
record.notify_success_channel_name = "notify_success_%s" % res_id
record.notify_danger_channel_name = "notify_danger_%s" % res_id
record.notify_warning_channel_name = "notify_warning_%s" % res_id
record.notify_info_channel_name = "notify_info_%s" % res_id
record.notify_default_channel_name = "notify_default_%s" % res_id
notify_success_channel_name = fields.Char(compute="_compute_channel_names")
notify_danger_channel_name = fields.Char(compute="_compute_channel_names")
notify_warning_channel_name = fields.Char(compute="_compute_channel_names")
notify_info_channel_name = fields.Char(compute="_compute_channel_names")
notify_default_channel_name = fields.Char(compute="_compute_channel_names")
def notify_success(
self, message="Default message", title=None, sticky=False
):
title = title or _("Success")
self._notify_channel(SUCCESS, message, title, sticky)
def notify_danger(
self, message="Default message", title=None, sticky=False
):
title = title or _("Danger")
self._notify_channel(DANGER, message, title, sticky)
def notify_warning(
self, message="Default message", title=None, sticky=False
):
title = title or _("Warning")
self._notify_channel(WARNING, message, title, sticky)
def notify_info(self, message="Default message", title=None, sticky=False):
title = title or _("Information")
self._notify_channel(INFO, message, title, sticky)
def notify_default(
self, message="Default message", title=None, sticky=False
):
title = title or _("Default")
self._notify_channel(DEFAULT, message, title, sticky)
def _notify_channel(
self,
type_message=DEFAULT,
message=DEFAULT_MESSAGE,
title=None,
sticky=False,
):
# pylint: disable=protected-access
if not self.env.user._is_admin() and any(
user.id != self.env.uid for user in self
):
raise exceptions.UserError(
_("Sending a notification to another user is forbidden.")
)
channel_name_field = "notify_{}_channel_name".format(type_message)
bus_message = {
"type": type_message,
"message": message,
"title": title,
"sticky": sticky,
}
notifications = [
(record[channel_name_field], bus_message) for record in self
]
self.env["bus.bus"].sendmany(notifications)
* Laurent Mignon <laurent.mignon@acsone.eu>
* Serpent Consulting Services Pvt. Ltd.<jay.vora@serpentcs.com>
* Aitor Bouzas <aitor.bouzas@adaptivecity.com>
* Shepilov Vladislav <shepilov.v@protonmail.com>
Send instant notification messages to the user in live.
This technical module allows you to send instant notification messages from the server to the user in live.
Two kinds of notification are supported.
* Success: Displayed in a `success` theme color flying popup div
* Danger: Displayed in a `danger` theme color flying popup div
* Warning: Displayed in a `warning` theme color flying popup div
* Information: Displayed in a `info` theme color flying popup div
* Default: Displayed in a `default` theme color flying popup div
This module is based on the Instant Messaging Bus. To work properly, the server must be launched in gevent mode.
To send a notification to the user you just need to call one of the new methods defined on res.users:
.. code-block:: python
self.env.user.notify_success(message='My success message')
or
.. code-block:: python
self.env.user.notify_danger(message='My danger message')
or
.. code-block:: python
self.env.user.notify_warning(message='My warning message')
or
.. code-block:: python
self.env.user.notify_info(message='My information message')
or
.. code-block:: python
self.env.user.notify_default(message='My default message')
.. figure:: static/description/notifications_screenshot.png
:scale: 80 %
:alt: Sample notifications
You can test the behaviour of the notifications by installing this module in a demo database.
Access the users form through Settings -> Users & Companies. You'll see a tab called "Test web notify", here you'll find two buttons that'll allow you test the module.
.. figure:: static/description/test_notifications_demo.png
:scale: 80 %
:alt: Sample notifications
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Web Notify</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="web-notify">
<h1 class="title">Web Notify</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/12.0/web_notify"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_notify"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/162/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>Send instant notification messages to the user in live.</p>
<p>This technical module allows you to send instant notification messages from the server to the user in live.
Two kinds of notification are supported.</p>
<ul class="simple">
<li>Success: Displayed in a <cite>success</cite> theme color flying popup div</li>
<li>Danger: Displayed in a <cite>danger</cite> theme color flying popup div</li>
<li>Warning: Displayed in a <cite>warning</cite> theme color flying popup div</li>
<li>Information: Displayed in a <cite>info</cite> theme color flying popup div</li>
<li>Default: Displayed in a <cite>default</cite> theme color flying popup div</li>
</ul>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#installation" id="id1">Installation</a></li>
<li><a class="reference internal" href="#usage" id="id2">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id4">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id5">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="installation">
<h1><a class="toc-backref" href="#id1">Installation</a></h1>
<p>This module is based on the Instant Messaging Bus. To work properly, the server must be launched in gevent mode.</p>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
<p>To send a notification to the user you just need to call one of the new methods defined on res.users:</p>
<pre class="code python literal-block">
<span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">user</span><span class="o">.</span><span class="n">notify_success</span><span class="p">(</span><span class="n">message</span><span class="o">=</span><span class="s1">'My success message'</span><span class="p">)</span>
</pre>
<p>or</p>
<pre class="code python literal-block">
<span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">user</span><span class="o">.</span><span class="n">notify_danger</span><span class="p">(</span><span class="n">message</span><span class="o">=</span><span class="s1">'My danger message'</span><span class="p">)</span>
</pre>
<p>or</p>
<pre class="code python literal-block">
<span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">user</span><span class="o">.</span><span class="n">notify_warning</span><span class="p">(</span><span class="n">message</span><span class="o">=</span><span class="s1">'My warning message'</span><span class="p">)</span>
</pre>
<p>or</p>
<pre class="code python literal-block">
<span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">user</span><span class="o">.</span><span class="n">notify_info</span><span class="p">(</span><span class="n">message</span><span class="o">=</span><span class="s1">'My information message'</span><span class="p">)</span>
</pre>
<p>or</p>
<pre class="code python literal-block">
<span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">user</span><span class="o">.</span><span class="n">notify_default</span><span class="p">(</span><span class="n">message</span><span class="o">=</span><span class="s1">'My default message'</span><span class="p">)</span>
</pre>
<div class="figure">
<img alt="Sample notifications" src="https://raw.githubusercontent.com/OCA/web/12.0/web_notify/static/description/notifications_screenshot.png" />
</div>
<p>You can test the behaviour of the notifications by installing this module in a demo database.
Access the users form through Settings -&gt; Users &amp; Companies. You’ll see a tab called “Test web notify”, here you’ll find two buttons that’ll allow you test the module.</p>
<div class="figure">
<img alt="Sample notifications" src="https://raw.githubusercontent.com/OCA/web/12.0/web_notify/static/description/test_notifications_demo.png" />
</div>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_notify%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#id4">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id5">Authors</a></h2>
<ul class="simple">
<li>ACSONE SA/NV</li>
<li>AdaptiveCity</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id6">Contributors</a></h2>
<ul class="simple">
<li>Laurent Mignon &lt;<a class="reference external" href="mailto:laurent.mignon&#64;acsone.eu">laurent.mignon&#64;acsone.eu</a>&gt;</li>
<li>Serpent Consulting Services Pvt. Ltd.&lt;<a class="reference external" href="mailto:jay.vora&#64;serpentcs.com">jay.vora&#64;serpentcs.com</a>&gt;</li>
<li>Aitor Bouzas &lt;<a class="reference external" href="mailto:aitor.bouzas&#64;adaptivecity.com">aitor.bouzas&#64;adaptivecity.com</a>&gt;</li>
<li>Shepilov Vladislav &lt;<a class="reference external" href="mailto:shepilov.v&#64;protonmail.com">shepilov.v&#64;protonmail.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/12.0/web_notify">OCA/web</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
</div>
</body>
</html>
odoo.define('web_notify.WebClient', function (require) {
"use strict";
var WebClient = require('web.WebClient');
var base_bus = require('bus.Longpolling');
var session = require('web.session');
require('bus.BusService');
WebClient.include({
show_application: function () {
var res = this._super();
this.start_polling();
return res;
},
start_polling: function () {
this.channel_success = 'notify_success_' + session.uid;
this.channel_danger = 'notify_danger_' + session.uid;
this.channel_warning = 'notify_warning_' + session.uid;
this.channel_info = 'notify_info_' + session.uid;
this.channel_default = 'notify_default_' + session.uid;
this.all_channels = [
this.channel_success,
this.channel_danger,
this.channel_warning,
this.channel_info,
this.channel_default,
];
this.call('bus_service', 'addChannel', this.channel_success);
this.call('bus_service', 'addChannel', this.channel_danger);
this.call('bus_service', 'addChannel', this.channel_warning);
this.call('bus_service', 'addChannel', this.channel_info);
this.call('bus_service', 'addChannel', this.channel_default);
this.call(
'bus_service', 'on', 'notification',
this, this.bus_notification);
this.call('bus_service', 'startPolling');
},
bus_notification: function (notifications) {
var self = this;
_.each(notifications, function (notification) {
var channel = notification[0];
var message = notification[1];
if (
self.all_channels != null &&
self.all_channels.indexOf(channel) > -1
) {
self.on_message(message);
}
});
},
on_message: function (message) {
return this.call(
'notification', 'notify', {
type: message.type,
title: message.title,
message: message.message,
sticky: message.sticky,
className: message.className,
}
);
},
});
});
odoo.define('web_notify.Notification', function (require) {
"use strict";
var Notification = require('web.Notification');
Notification.include({
icon_mapping: {
'success': 'fa-thumbs-up',
'danger': 'fa-exclamation-triangle',
'warning': 'fa-exclamation',
'info': 'fa-info',
'default': 'fa-lightbulb-o',
},
init: function () {
this._super.apply(this, arguments);
// Delete default classes
this.className = this.className.replace(' o_error', '');
// Add custom icon and custom class
this.icon = (this.type in this.icon_mapping) ?
this.icon_mapping[this.type] :
this.icon_mapping['default'];
this.className += ' o_' + this.type;
},
});
});
.o_notification_manager {
.o_notification {
&.o_success {
color: white;
background-color: theme-color('success');
}
&.o_danger {
color: white;
background-color: theme-color('danger');
}
&.o_warning {
color: white;
background-color: theme-color('warning');
}
&.o_info {
color: white;
background-color: theme-color('info');
}
&.o_default {
color: black;
background-color: theme-color('default');
}
}
}
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import test_res_users
# Copyright 2016 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import json
import mock
from odoo import exceptions
from odoo.addons.bus.models.bus import json_dump
from ..models.res_users import SUCCESS, DANGER, WARNING, INFO, DEFAULT
from odoo.tests import common
class TestResUsers(common.TransactionCase):
def test_notify_success(self):
bus_bus = self.env["bus.bus"]
domain = [
(
"channel",
"=",
json_dump(self.env.user.notify_success_channel_name),
)
]
existing = bus_bus.search(domain)
test_msg = {"message": "message", "title": "title", "sticky": True}
self.env.user.notify_success(**test_msg)
news = bus_bus.search(domain) - existing
self.assertEqual(1, len(news))
test_msg.update({"type": SUCCESS})
self.assertDictEqual(test_msg, json.loads(news.message))
def test_notify_danger(self):
bus_bus = self.env["bus.bus"]
domain = [
(
"channel",
"=",
json_dump(self.env.user.notify_danger_channel_name),
)
]
existing = bus_bus.search(domain)
test_msg = {"message": "message", "title": "title", "sticky": True}
self.env.user.notify_danger(**test_msg)
news = bus_bus.search(domain) - existing
self.assertEqual(1, len(news))
test_msg.update({"type": DANGER})
self.assertDictEqual(test_msg, json.loads(news.message))
def test_notify_warning(self):
bus_bus = self.env["bus.bus"]
domain = [
(
"channel",
"=",
json_dump(self.env.user.notify_warning_channel_name),
)
]
existing = bus_bus.search(domain)
test_msg = {"message": "message", "title": "title", "sticky": True}
self.env.user.notify_warning(**test_msg)
news = bus_bus.search(domain) - existing
self.assertEqual(1, len(news))
test_msg.update({"type": WARNING})
self.assertDictEqual(test_msg, json.loads(news.message))
def test_notify_info(self):
bus_bus = self.env["bus.bus"]
domain = [
("channel", "=", json_dump(self.env.user.notify_info_channel_name))
]
existing = bus_bus.search(domain)
test_msg = {"message": "message", "title": "title", "sticky": True}
self.env.user.notify_info(**test_msg)
news = bus_bus.search(domain) - existing
self.assertEqual(1, len(news))
test_msg.update({"type": INFO})
self.assertDictEqual(test_msg, json.loads(news.message))
def test_notify_default(self):
bus_bus = self.env["bus.bus"]
domain = [
(
"channel",
"=",
json_dump(self.env.user.notify_default_channel_name),
)
]
existing = bus_bus.search(domain)
test_msg = {"message": "message", "title": "title", "sticky": True}
self.env.user.notify_default(**test_msg)
news = bus_bus.search(domain) - existing
self.assertEqual(1, len(news))
test_msg.update({"type": DEFAULT})
self.assertDictEqual(test_msg, json.loads(news.message))
def test_notify_many(self):
# check that the notification of a list of users is done with
# a single call to the bus
with mock.patch(
"odoo.addons.bus.models.bus.ImBus.sendmany"
) as mockedSendMany:
users = self.env.user.search([(1, "=", 1)])
self.assertTrue(len(users) > 1)
users.notify_warning(message="message")
self.assertEqual(1, mockedSendMany.call_count)
# call_args is a tuple with args (tuple) & kwargs (dict). We check
# positional arguments (args), hence the [0].
pos_call_args = mockedSendMany.call_args[0]
# Ensure the first positional argument is a list with as many
# elements as we had users.
first_pos_call_args = pos_call_args[0]
self.assertIsInstance(first_pos_call_args, list)
self.assertEqual(len(users), len(first_pos_call_args))
def test_notify_other_user(self):
other_user = self.env.ref("base.user_demo")
other_user_model = self.env["res.users"].sudo(other_user)
with self.assertRaises(exceptions.UserError):
other_user_model.browse(self.env.uid).notify_info(message="hello")
def test_notify_admin_allowed_other_user(self):
other_user = self.env.ref("base.user_demo")
other_user.notify_info(message="hello")
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2018 Aitor Bouzas <aitor.bouzas@adaptivecity.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="view_users_form_simple_modif_inherit" model="ir.ui.view">
<field name="name">res.users.form.simple.view.modif.inherit</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<xpath expr="//notebook/page[1]" position="after">
<page string="Test web notify" name="test_web_notify">
<group>
<group>
<button name="notify_success"
type="object"
string="Test success notification"
class="oe_highlight"/>
</group>
<group>
<button name="notify_danger"
type="object"
string="Test danger notification"
class="oe_highlight"/>
</group>
<group>
<button name="notify_warning"
type="object"
string="Test warning notification"
class="oe_highlight"/>
</group>
<group>
<button name="notify_info"
type="object"
string="Test info notification"
class="oe_highlight"/>
</group>
<group>
<button name="notify_default"
type="object"
string="Test default notification"
class="oe_highlight"/>
</group>
</group>
</page>
</xpath>
</field>
</record>
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="assets_backend" name="web_notify assets" inherit_id="web.assets_backend">
<link rel="stylesheet" type="text/scss" href="/web/static/src/scss/webclient.scss" position="after">
<link rel="stylesheet" type="text/scss" href="/web_notify/static/src/scss/webclient.scss"/>
</link>
<xpath expr="." position="inside">
<script type="text/javascript" src="/web_notify/static/src/js/web_client.js"/>
<script type="text/javascript" src="/web_notify/static/src/js/widgets/notification.js"/>
</xpath>
</template>
</odoo>
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!