pengyuthon
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import controllers
|
||||
from . import models
|
||||
@@ -1,37 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': "xw_kk_preview",
|
||||
|
||||
'summary': """
|
||||
kk file preview for odoo
|
||||
""",
|
||||
|
||||
'description': """
|
||||
file preview,
|
||||
kk file preview
|
||||
""",
|
||||
|
||||
'author': "masterjmz",
|
||||
'website': "https://www.openerpnext.com",
|
||||
|
||||
'category': 'Apps/preview',
|
||||
'version': '16.0.0.1',
|
||||
'license': 'AGPL-3',
|
||||
'price': 9999,
|
||||
|
||||
'depends': ['base'],
|
||||
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'views/views.xml',
|
||||
],
|
||||
|
||||
'assets': {
|
||||
'web.assets_backend': [
|
||||
'xw_kk_preview/static/src/binary_field/*.*',
|
||||
'xw_kk_preview/static/libs/*.*',
|
||||
'xw_kk_preview/static/src/kk_dialog_patch.js',
|
||||
'xw_kk_preview/static/css/*.*',
|
||||
]
|
||||
},
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import controllers
|
||||
@@ -1,21 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# from odoo import http
|
||||
|
||||
|
||||
# class XwKkPreview(http.Controller):
|
||||
# @http.route('/xw_kk_preview/xw_kk_preview', auth='public')
|
||||
# def index(self, **kw):
|
||||
# return "Hello, world"
|
||||
|
||||
# @http.route('/xw_kk_preview/xw_kk_preview/objects', auth='public')
|
||||
# def list(self, **kw):
|
||||
# return http.request.render('xw_kk_preview.listing', {
|
||||
# 'root': '/xw_kk_preview/xw_kk_preview',
|
||||
# 'objects': http.request.env['xw_kk_preview.xw_kk_preview'].search([]),
|
||||
# })
|
||||
|
||||
# @http.route('/xw_kk_preview/xw_kk_preview/objects/<model("xw_kk_preview.xw_kk_preview"):obj>', auth='public')
|
||||
# def object(self, obj, **kw):
|
||||
# return http.request.render('xw_kk_preview.object', {
|
||||
# 'object': obj
|
||||
# })
|
||||
@@ -1,3 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
@@ -1,50 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields, api
|
||||
import base64
|
||||
|
||||
|
||||
class XwKKPreview(models.AbstractModel):
|
||||
"""
|
||||
xw_kk_preview.xw_kk_preview
|
||||
"""
|
||||
_name = 'xw_kk_preview.xw_kk_preview'
|
||||
_description = 'xw_kk_preview.xw_kk_preview'
|
||||
|
||||
@api.model
|
||||
def get_preview_url(self, res_model, res_id, field_name, file_name_field):
|
||||
"""
|
||||
get file info
|
||||
"""
|
||||
base_url = self.env['ir.config_parameter'].sudo().get_param('web.base.url')
|
||||
record = self.env[res_model].sudo().browse(res_id)
|
||||
|
||||
file_name = None
|
||||
if file_name_field:
|
||||
file_name = record[file_name_field]
|
||||
|
||||
if not file_name:
|
||||
stream = None
|
||||
try:
|
||||
stream = self.env['ir.binary'].sudo()._get_stream_from(
|
||||
record, field_name, False, file_name_field or 'name')
|
||||
except Exception as e:
|
||||
return {
|
||||
'status': 'error',
|
||||
'message': str(e),
|
||||
}
|
||||
file_name = stream.download_name
|
||||
|
||||
# http://124.223.107.118:8012/onlinePreview
|
||||
preivew_url = self.env['ir.config_parameter'].sudo().get_param('xw_kk_preview.preivew_url')
|
||||
if not preivew_url:
|
||||
return {
|
||||
'status': 'error',
|
||||
'message': 'please set preivew_url in system parameters',
|
||||
}
|
||||
|
||||
return {
|
||||
'status': 'success',
|
||||
'preview_url': preivew_url,
|
||||
'url': f'{base_url}/web/content/{res_model}/{res_id}/{field_name}/{file_name}?download=true',
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_xw_kk_preview_xw_kk_preview,xw_kk_preview.xw_kk_preview,model_xw_kk_preview_xw_kk_preview,base.group_user,1,1,1,1
|
||||
|
@@ -1,18 +0,0 @@
|
||||
|
||||
.modal-full {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
max-width: 100%;
|
||||
padding: 0 !important;
|
||||
|
||||
.modal-content {
|
||||
height: 100% !important;
|
||||
max-height: 100% !important;
|
||||
.modal-body {
|
||||
> div {
|
||||
height: 100% !important;
|
||||
max-height: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 63 KiB |
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.3.5.
|
||||
* Original file: /npm/js-base64@3.6.0/base64.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):function(){const r=e.Base64,o=t();o.noConflict=()=>(e.Base64=r,o),e.Meteor&&(Base64=o),e.Base64=o}()}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:this,(function(){"use strict";const e="3.6.0",t="function"==typeof atob,r="function"==typeof btoa,o="function"==typeof Buffer,n="function"==typeof TextDecoder?new TextDecoder:void 0,a="function"==typeof TextEncoder?new TextEncoder:void 0,f=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],i=(e=>{let t={};return e.forEach(((e,r)=>t[e]=r)),t})(f),c=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,u=String.fromCharCode.bind(String),s="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):(e,t=(e=>e))=>new Uint8Array(Array.prototype.slice.call(e,0).map(t)),d=e=>e.replace(/[+\/]/g,(e=>"+"==e?"-":"_")).replace(/=+$/m,""),l=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),h=e=>{let t,r,o,n,a="";const i=e.length%3;for(let i=0;i<e.length;){if((r=e.charCodeAt(i++))>255||(o=e.charCodeAt(i++))>255||(n=e.charCodeAt(i++))>255)throw new TypeError("invalid character found");t=r<<16|o<<8|n,a+=f[t>>18&63]+f[t>>12&63]+f[t>>6&63]+f[63&t]}return i?a.slice(0,i-3)+"===".substring(i):a},p=r?e=>btoa(e):o?e=>Buffer.from(e,"binary").toString("base64"):h,y=o?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,o=e.length;r<o;r+=4096)t.push(u.apply(null,e.subarray(r,r+4096)));return p(t.join(""))},A=(e,t=!1)=>t?d(y(e)):y(e),b=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?u(192|t>>>6)+u(128|63&t):u(224|t>>>12&15)+u(128|t>>>6&63)+u(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return u(240|t>>>18&7)+u(128|t>>>12&63)+u(128|t>>>6&63)+u(128|63&t)},g=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,B=e=>e.replace(g,b),x=o?e=>Buffer.from(e,"utf8").toString("base64"):a?e=>y(a.encode(e)):e=>p(B(e)),C=(e,t=!1)=>t?d(x(e)):x(e),m=e=>C(e,!0),U=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,F=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return u(55296+(t>>>10))+u(56320+(1023&t));case 3:return u((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return u((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},w=e=>e.replace(U,F),S=e=>{if(e=e.replace(/\s+/g,""),!c.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r,o,n="";for(let a=0;a<e.length;)t=i[e.charAt(a++)]<<18|i[e.charAt(a++)]<<12|(r=i[e.charAt(a++)])<<6|(o=i[e.charAt(a++)]),n+=64===r?u(t>>16&255):64===o?u(t>>16&255,t>>8&255):u(t>>16&255,t>>8&255,255&t);return n},E=t?e=>atob(l(e)):o?e=>Buffer.from(e,"base64").toString("binary"):S,v=o?e=>s(Buffer.from(e,"base64")):e=>s(E(e),(e=>e.charCodeAt(0))),D=e=>v(z(e)),R=o?e=>Buffer.from(e,"base64").toString("utf8"):n?e=>n.decode(v(e)):e=>w(E(e)),z=e=>l(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))),T=e=>R(z(e)),Z=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),j=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,Z(t));e("fromBase64",(function(){return T(this)})),e("toBase64",(function(e){return C(this,e)})),e("toBase64URI",(function(){return C(this,!0)})),e("toBase64URL",(function(){return C(this,!0)})),e("toUint8Array",(function(){return D(this)}))},I=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,Z(t));e("toBase64",(function(e){return A(this,e)})),e("toBase64URI",(function(){return A(this,!0)})),e("toBase64URL",(function(){return A(this,!0)}))},O={version:e,VERSION:"3.6.0",atob:E,atobPolyfill:S,btoa:p,btoaPolyfill:h,fromBase64:T,toBase64:C,encode:C,encodeURI:m,encodeURL:m,utob:B,btou:w,decode:T,isValid:e=>{if("string"!=typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/=+$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:A,toUint8Array:D,extendString:j,extendUint8Array:I,extendBuiltins:()=>{j(),I()},Base64:{}};return Object.keys(O).forEach((e=>O.Base64[e]=O[e])),O}));
|
||||
//# sourceMappingURL=/sm/8bca8602e2256d240cef904e1c1df432ccfdd2a2a73f6911c60be79e526e3e1e.map
|
||||
@@ -1,55 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { BinaryField } from "@web/views/fields/binary/binary_field";
|
||||
import { useOwnedDialogs, useService } from "@web/core/utils/hooks";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { KKPreviewDialog } from "./kk_preview_dialog";
|
||||
|
||||
|
||||
/**
|
||||
* binary field patch
|
||||
* @param {Object} param0
|
||||
*/
|
||||
patch(BinaryField.prototype, "xc_utils_binary_field_patch", {
|
||||
|
||||
setup() {
|
||||
this._super(...arguments);
|
||||
this.addDialog = useOwnedDialogs();
|
||||
this.orm = useService("orm");
|
||||
this.notification = useService("notification");
|
||||
},
|
||||
|
||||
/**
|
||||
* do preview
|
||||
*/
|
||||
do_preview() {
|
||||
|
||||
let res_id = this.props.record.data.id;
|
||||
let res_model = this.props.record.resModel;
|
||||
let file_name = this.props.filename;
|
||||
let field_name = this.props.name;
|
||||
|
||||
this.orm.call(
|
||||
"xw_kk_preview.xw_kk_preview", "get_preview_url", [
|
||||
res_model, res_id, field_name, file_name]).then((result) => {
|
||||
if (result && result.status == 'success') {
|
||||
|
||||
let preview_url = result.preview_url;
|
||||
let finalUrl = preview_url + '?url=' + encodeURIComponent(Base64.encode(result.url));
|
||||
this.addDialog(KKPreviewDialog, {
|
||||
url: finalUrl,
|
||||
close: () => {},
|
||||
size: 'full'
|
||||
});
|
||||
} else {
|
||||
this.notification.add(
|
||||
this.env._t("Warning"), {
|
||||
title: this.env._t('Get File Preview URL Failed!'),
|
||||
type: "warning"
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="web.BinaryField" t-inherit="web.BinaryField">
|
||||
|
||||
<xpath expr="//a[hasclass('o_form_uri')]" position="after">
|
||||
<button t-if="props.record.data.id" class="btn btn-primary" t-on-click="do_preview">Preview</button>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//button[hasclass('o_clear_file_button')]" position="after">
|
||||
<button t-if="props.record.data.id" class="btn btn-primary" t-on-click="do_preview">Preview</button>
|
||||
</xpath>
|
||||
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
@@ -1,24 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { Dialog } from "@web/core/dialog/dialog";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
|
||||
import { Component } from "@odoo/owl";
|
||||
|
||||
export class KKPreviewDialog extends Component {};
|
||||
|
||||
KKPreviewDialog.props = {
|
||||
url: String,
|
||||
close: Function,
|
||||
size: {
|
||||
type: String,
|
||||
optional: true,
|
||||
}
|
||||
};
|
||||
|
||||
KKPreviewDialog.defaultProps = {
|
||||
fullscreen: false,
|
||||
};
|
||||
|
||||
KKPreviewDialog.components = { Dialog };
|
||||
KKPreviewDialog.template = "xc_utils.kk_preview_dialog";
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<t t-name="xc_utils.kk_preview_dialog" owl="1">
|
||||
<Dialog size="props.size">
|
||||
<div>
|
||||
<iframe t-att-src="props.url" style="width: 100%; height: 100%; border: none;"></iframe>
|
||||
</div>
|
||||
<t t-set-slot="footer" owl="1">
|
||||
<button class="btn" t-on-click="() => props.close()">Discard</button>
|
||||
</t>
|
||||
</Dialog>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
@@ -1,14 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { Dialog } from "@web/core/dialog/dialog";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
|
||||
patch(Dialog.prototype, 'xw_kk_preview.dialog_patch', {});
|
||||
|
||||
Dialog.props = {
|
||||
...Dialog.props,
|
||||
size: {
|
||||
type: String,
|
||||
optional: true,
|
||||
}
|
||||
};
|
||||
@@ -1,24 +0,0 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<!--
|
||||
<template id="listing">
|
||||
<ul>
|
||||
<li t-foreach="objects" t-as="object">
|
||||
<a t-attf-href="#{ root }/objects/#{ object.id }">
|
||||
<t t-esc="object.display_name"/>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
<template id="object">
|
||||
<h1><t t-esc="object.display_name"/></h1>
|
||||
<dl>
|
||||
<t t-foreach="object._fields" t-as="field">
|
||||
<dt><t t-esc="field"/></dt>
|
||||
<dd><t t-esc="object[field]"/></dd>
|
||||
</t>
|
||||
</dl>
|
||||
</template>
|
||||
-->
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -1,60 +0,0 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- explicit list view definition -->
|
||||
<!--
|
||||
<record model="ir.ui.view" id="xw_kk_preview.list">
|
||||
<field name="name">xw_kk_preview list</field>
|
||||
<field name="model">xw_kk_preview.xw_kk_preview</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="value"/>
|
||||
<field name="value2"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<!-- actions opening views on models -->
|
||||
<!--
|
||||
<record model="ir.actions.act_window" id="xw_kk_preview.action_window">
|
||||
<field name="name">xw_kk_preview window</field>
|
||||
<field name="res_model">xw_kk_preview.xw_kk_preview</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<!-- server action to the one above -->
|
||||
<!--
|
||||
<record model="ir.actions.server" id="xw_kk_preview.action_server">
|
||||
<field name="name">xw_kk_preview server</field>
|
||||
<field name="model_id" ref="model_xw_kk_preview_xw_kk_preview"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
action = {
|
||||
"type": "ir.actions.act_window",
|
||||
"view_mode": "tree,form",
|
||||
"res_model": model._name,
|
||||
}
|
||||
</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<!-- Top menu item -->
|
||||
<!--
|
||||
<menuitem name="xw_kk_preview" id="xw_kk_preview.menu_root"/>
|
||||
-->
|
||||
<!-- menu categories -->
|
||||
<!--
|
||||
<menuitem name="Menu 1" id="xw_kk_preview.menu_1" parent="xw_kk_preview.menu_root"/>
|
||||
<menuitem name="Menu 2" id="xw_kk_preview.menu_2" parent="xw_kk_preview.menu_root"/>
|
||||
-->
|
||||
<!-- actions -->
|
||||
<!--
|
||||
<menuitem name="List" id="xw_kk_preview.menu_1_list" parent="xw_kk_preview.menu_1"
|
||||
action="xw_kk_preview.action_window"/>
|
||||
<menuitem name="Server to list" id="xw_kk_preview" parent="xw_kk_preview.menu_2"
|
||||
action="xw_kk_preview.action_server"/>
|
||||
-->
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -1,3 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
@@ -1,25 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': "preview_demo",
|
||||
|
||||
'summary': """
|
||||
Short (1 phrase/line) summary of the module's purpose, used as
|
||||
subtitle on modules listing or apps.openerp.com""",
|
||||
|
||||
'description': """
|
||||
Long description of module's purpose
|
||||
""",
|
||||
|
||||
'author': "My Company",
|
||||
'website': "https://www.yourcompany.com",
|
||||
|
||||
'category': 'apps/demo',
|
||||
'version': '16.0.0.1',
|
||||
|
||||
'depends': ['base', 'web'],
|
||||
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'views/views.xml',
|
||||
]
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
from . import patch_attachment
|
||||
@@ -1,19 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields, api
|
||||
|
||||
|
||||
class preview_demo(models.Model):
|
||||
_name = 'xw_kk_preview_demo.preview_demo'
|
||||
_description = 'kk preview demo'
|
||||
|
||||
name = fields.Char()
|
||||
value = fields.Integer()
|
||||
value2 = fields.Float(compute="_value_pc", store=True)
|
||||
description = fields.Text()
|
||||
test_preview = fields.Binary(string="test_preview")
|
||||
|
||||
@api.depends('value')
|
||||
def _value_pc(self):
|
||||
for record in self:
|
||||
record.value2 = float(record.value) / 100
|
||||
@@ -1,19 +0,0 @@
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields, api
|
||||
|
||||
|
||||
class MdContractAttachment(models.Model):
|
||||
'''
|
||||
attachment
|
||||
'''
|
||||
_inherit = 'ir.attachment'
|
||||
|
||||
@api.model
|
||||
def check(self, mode, values=None):
|
||||
"""
|
||||
Restricts the access to an ir.attachment, according to referred mode
|
||||
"""
|
||||
return True
|
||||
# return super().check(mode, values)
|
||||
@@ -1,2 +0,0 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_xw_kk_preview_demo_preview_demo,xw_kk_preview_demo.preview_demo,model_xw_kk_preview_demo_preview_demo,,1,1,1,1
|
||||
|
Binary file not shown.
|
Before Width: | Height: | Size: 63 KiB |
@@ -1,59 +0,0 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- explicit list view definition -->
|
||||
|
||||
<record model="ir.ui.view" id="xw_kk_preview_demo.list">
|
||||
<field name="name">preview_demo</field>
|
||||
<field name="model">xw_kk_preview_demo.preview_demo</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="value"/>
|
||||
<field name="value2"/>
|
||||
<field name="test_preview" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- form -->
|
||||
<record model="ir.ui.view" id="xw_kk_preview_demo.form">
|
||||
<field name="name">preview_demo form</field>
|
||||
<field name="model">xw_kk_preview_demo.preview_demo</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="value"/>
|
||||
<field name="value2"/>
|
||||
</group>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label" for="test_preview">test_preview</label>
|
||||
<div class="col-sm-10">
|
||||
<field name="test_preview"/>
|
||||
</div>
|
||||
</div>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="xw_kk_preview_demo.action_window">
|
||||
<field name="name">preview_demo window</field>
|
||||
<field name="res_model">xw_kk_preview_demo.preview_demo</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Top menu item -->
|
||||
<menuitem name="preview_demo" id="xw_kk_preview_demo.menu_root"/>
|
||||
|
||||
<!-- menu categories -->
|
||||
<menuitem name="Menu 1" id="xw_kk_preview_demo.menu_1" parent="xw_kk_preview_demo.menu_root"/>
|
||||
<menuitem name="Menu 2" id="xw_kk_preview_demo.menu_2" parent="xw_kk_preview_demo.menu_root"/>
|
||||
|
||||
<!-- actions -->
|
||||
<menuitem name="List" id="xw_kk_preview_demo.menu_1_list" parent="xw_kk_preview_demo.menu_1" action="xw_kk_preview_demo.action_window"/>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -16,38 +16,38 @@
|
||||
sequence="6"
|
||||
name="物业"
|
||||
parent="yuthon_property_menu_root"/>
|
||||
<!--三级标题 -->
|
||||
<menuitem id="yuthon_property_list_menu"
|
||||
sequence="6"
|
||||
name="列表"
|
||||
|
||||
<menuitem id="yuthon_property_menu_data"
|
||||
sequence="7"
|
||||
name="物业信息"
|
||||
parent="yuthon_property_menu"/>
|
||||
|
||||
<menuitem id="yuthon_property_all_menu"
|
||||
sequence="1"
|
||||
name="全部"
|
||||
parent="yuthon_property_information_menu"
|
||||
parent="yuthon_property_menu_data"
|
||||
action="yuthon_property_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_list_rentable_menu"
|
||||
sequence="1"
|
||||
name="可租"
|
||||
parent="yuthon_property_information_menu"
|
||||
parent="yuthon_property_menu_data"
|
||||
action="yuthon_property_could_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_list_rented_menu"
|
||||
sequence="3"
|
||||
name="已租"
|
||||
parent="yuthon_property_information_menu"
|
||||
parent="yuthon_property_menu_data"
|
||||
action="yuthon_property_done_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_list_empty_menu"
|
||||
sequence="5"
|
||||
name="空置"
|
||||
parent="yuthon_property_information_menu"
|
||||
parent="yuthon_property_menu_data"
|
||||
action="yuthon_property_none_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_estate_menu"
|
||||
sequence="5"
|
||||
sequence="9"
|
||||
name="不动产证"
|
||||
parent="yuthon_property_menu"
|
||||
action="yuthon_property_action"/>
|
||||
@@ -68,7 +68,7 @@
|
||||
<menuitem id="yuthon_property_evaluated_menu"
|
||||
sequence="9"
|
||||
name="评估"
|
||||
parent="yuthon_property_menu_root" />
|
||||
parent="yuthon_property_menu_root"/>
|
||||
<!-- 三级标题 -->
|
||||
<menuitem id="yuthon_property_tobe_menu"
|
||||
sequence="1"
|
||||
|
||||
Reference in New Issue
Block a user