Browse Source

Merge bdd912135d into ad79aa45cf

pull/770/merge
Mladen Meseldžija 5 years ago
committed by GitHub
parent
commit
bbe5665ca0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      web_dashboard_open_action/__manifest__.py
  2. 18
      web_dashboard_open_action/static/src/js/web_dashboard_open_action.js
  3. 1
      web_dashboard_open_action/static/src/xml/web_dashboard_open_action.xml
  4. 6
      web_dashboard_open_action/views/templates.xml

2
web_dashboard_open_action/__manifest__.py

@ -20,7 +20,7 @@
##############################################################################
{
"name": "Open a dashboard's action",
"version": "8.0.1.0.0",
"version": "10.0.1.0.0",
"author": "Therp BV,Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Hidden",

18
web_dashboard_open_action/static/src/js/web_dashboard_open_action.js

@ -19,17 +19,22 @@
//
//############################################################################
openerp.web_dashboard_open_action = function(instance)
{
instance.web.form.DashBoard.include({
odoo.define('pos_all_orders_reprint.chrome_extensions', function(require) {
"use strict";
var core = require('web.core');
var pyeval = require('web.pyeval');
var DashBoard = core.form_tag_registry.map['board'];
DashBoard.include({
on_load_action: function(result, index, action_attrs)
{
var self = this, action = _.extend({flags: {}}, result);
action.context_string = action_attrs.context;
action.domain_string = action_attrs.domain;
action.context = instance.web.pyeval.eval(
action.context = pyeval.eval(
'contexts', [action.context || {}, action_attrs.context || {}]);
action.domain = instance.web.pyeval.eval(
action.domain = pyeval.eval(
'domains', [action_attrs.domain || [], action.domain || []],
action.context);
jQuery('#' + this.view.element_id + '_action_' + index)
@ -42,4 +47,5 @@ openerp.web_dashboard_open_action = function(instance)
return this._super.apply(this, arguments);
},
});
}
});

1
web_dashboard_open_action/static/src/xml/web_dashboard_open_action.xml

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<templates>
<t t-extend="DashBoard.action">
<t t-jquery="span.oe_minimize" t-operation="after">

6
web_dashboard_open_action/views/templates.xml

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<odoo>
<data>
<template id="assets_backend" name="web_dashboard_open_action assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/web_dashboard_open_action/static/src/js/web_dashboard_open_action.js"></script>
<link rel="stylesheet" href="/web_dashboard_open_action/static/src/css/web_dashboard_open_action.css"/>
<script type="text/javascript" src="/web_dashboard_open_action/static/src/js/web_dashboard_open_action.js"></script>
</xpath>
</template>
</data>
</openerp>
</odoo>
Loading…
Cancel
Save