[MERGE]: merging from the same branch
bzr revid: mga@tinyerp.com-20100622141422-fec09uclzztpalwk
This commit is contained in:
commit
f27881580d
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -23,6 +23,7 @@ import base64
|
|||
|
||||
from osv import osv, fields
|
||||
from osv.orm import except_orm
|
||||
from tools import config
|
||||
import urlparse
|
||||
|
||||
import os
|
||||
|
@ -35,45 +36,12 @@ class document_configuration_wizard(osv.osv_memory):
|
|||
_rec_name = 'host'
|
||||
_columns = {
|
||||
'host': fields.char('Address', size=64,
|
||||
help="Server address or IP.", required=True),
|
||||
help="Server address or IP and port to which users should connect to for DMS access",
|
||||
required=True),
|
||||
}
|
||||
|
||||
def detect_ip_addr(self, cr, uid, context=None):
|
||||
def _detect_ip_addr(self, cr, uid, context=None):
|
||||
from array import array
|
||||
import socket
|
||||
from struct import pack, unpack
|
||||
|
||||
try:
|
||||
import fcntl
|
||||
except ImportError:
|
||||
fcntl = None
|
||||
|
||||
if not fcntl: # not UNIX:
|
||||
host = socket.gethostname()
|
||||
ip_addr = socket.gethostbyname(host)
|
||||
else: # UNIX:
|
||||
# get all interfaces:
|
||||
nbytes = 128 * 32
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
names = array('B', '\0' * nbytes)
|
||||
outbytes = unpack('iL', fcntl.ioctl( s.fileno(), 0x8912, pack('iL', nbytes, names.buffer_info()[0])))[0]
|
||||
namestr = names.tostring()
|
||||
ifaces = [namestr[i:i+32].split('\0', 1)[0] for i in range(0, outbytes, 32)]
|
||||
|
||||
for ifname in [iface for iface in ifaces if iface != 'lo']:
|
||||
ip_addr = socket.inet_ntoa(fcntl.ioctl(s.fileno(), 0x8915, pack('256s', ifname[:15]))[20:24])
|
||||
break
|
||||
return ip_addr
|
||||
|
||||
try:
|
||||
ip_addr = _detect_ip_addr(self, cr, uid, context)
|
||||
except:
|
||||
ip_addr = 'localhost'
|
||||
return ip_addr
|
||||
|
||||
_defaults = {
|
||||
'host': detect_ip_addr,
|
||||
'host': config.get('ftp_server_host', 'localhost') + ':' + config.get('ftp_server_port', '8021'),
|
||||
}
|
||||
|
||||
def execute(self, cr, uid, ids, context=None):
|
||||
|
@ -145,5 +113,5 @@ class document_configuration_wizard(osv.osv_memory):
|
|||
# Update the action for FTP browse.
|
||||
aid = objid._get_id(cr, uid, 'document_ftp', 'action_document_browse')
|
||||
aid = objid.browse(cr, uid, aid, context=context).res_id
|
||||
self.pool.get('ir.actions.url').write(cr, uid, [aid], {'url': 'ftp://'+(conf.host or 'localhost')+':8021/'})
|
||||
self.pool.get('ir.actions.url').write(cr, uid, [aid], {'url': 'ftp://'+(conf.host or 'localhost:8021')+'/'})
|
||||
document_configuration_wizard()
|
||||
|
|
|
@ -25,13 +25,8 @@ import authorizer
|
|||
import abstracted_fs
|
||||
import netsvc
|
||||
from tools import config
|
||||
from tools.misc import detect_ip_addr
|
||||
|
||||
if detect_ip_addr:
|
||||
HOST = config.get('ftp_server_host', detect_ip_addr())
|
||||
else:
|
||||
HOST = config.get('ftp_server_host', '127.0.0.1')
|
||||
|
||||
HOST = config.get('ftp_server_host', '127.0.0.1')
|
||||
PORT = int(config.get('ftp_server_port', '8021'))
|
||||
PASSIVE_PORTS = None
|
||||
pps = config.get('ftp_server_passive_ports', '').split(':')
|
||||
|
|
|
@ -304,7 +304,7 @@ class idea_vote(osv.osv):
|
|||
_rec_name = 'score'
|
||||
|
||||
_columns = {
|
||||
'user_id': fields.many2one('res.users', 'By user', readonly="True"),
|
||||
'user_id': fields.many2one('res.users', 'User', readonly="True"),
|
||||
'idea_id': fields.many2one('idea.idea', 'Idea', readonly="True", ondelete='cascade'),
|
||||
'score': fields.selection(VoteValues, 'Vote Status', readonly="True"),
|
||||
'date': fields.datetime('Date', readonly="True"),
|
||||
|
|
|
@ -149,8 +149,22 @@
|
|||
<field name="arch" type="xml">
|
||||
<search string="Ideas vote">
|
||||
<group col="10" colspan="4">
|
||||
<filter icon="terp-go-year" string=" 365 Days "
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks performed in last 365 days"/>
|
||||
<filter icon="terp-go-month" string=" 30 Days "
|
||||
name="month"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks performed in last 30 days"/>
|
||||
<filter icon="terp-go-week"
|
||||
string=" 7 Days "
|
||||
name="week"
|
||||
separator="1"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks during last 7 days"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="idea_id" widget="selection"/>
|
||||
<field name="user_id"/>
|
||||
<field name="user_id" string="User"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="14">
|
||||
|
@ -371,6 +385,7 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="search_view_id" ref="view_idea_vote_search"/>
|
||||
<field name="context">{'search_default_week':1}</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Votes" parent="menu_idea_reporting" id="menu_idea_vote" action="action_idea_vote"/>
|
||||
|
|
|
@ -45,12 +45,13 @@
|
|||
'wizard/lunch_cashbox_clean_view.xml',
|
||||
'lunch_view.xml',
|
||||
'lunch_report.xml',
|
||||
'report/report_lunch_order_view.xml',
|
||||
#'process/lunch_process.xml'
|
||||
],
|
||||
"demo_xml": ['lunch_demo.xml',
|
||||
],
|
||||
"test": ['test/test_lunch.yml'
|
||||
],
|
||||
],
|
||||
"installable": True,
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,10 +15,11 @@
|
|||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import order
|
||||
import report_lunch_order
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import tools
|
||||
from osv import fields,osv
|
||||
|
||||
class report_lunch_order(osv.osv):
|
||||
_name = "report.lunch.order"
|
||||
_description = "Lunch Orders Statistics"
|
||||
_auto = False
|
||||
_rec_name = 'date'
|
||||
_columns = {
|
||||
'date': fields.date('Date Order', readonly=True),
|
||||
'year': fields.char('Year', size=4, readonly=True),
|
||||
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
|
||||
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
|
||||
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'user_id': fields.many2one('res.users', 'User Name'),
|
||||
'box_name': fields.char('Name', size=30),
|
||||
'price_total':fields.float('Total Price', readonly=True),
|
||||
}
|
||||
_order = 'date desc'
|
||||
def init(self, cr):
|
||||
tools.drop_view_if_exists(cr, 'report_lunch_order')
|
||||
cr.execute("""
|
||||
create or replace view report_lunch_order as (
|
||||
select
|
||||
min(lo.id) as id,
|
||||
lo.date as date,
|
||||
to_char(lo.date, 'YYYY') as year,
|
||||
to_char(lo.date, 'MM') as month,
|
||||
to_char(lo.date, 'YYYY-MM-DD') as day,
|
||||
lo.user_id,
|
||||
cm.name as box_name,
|
||||
sum(lp.price) as price_total
|
||||
|
||||
from
|
||||
lunch_order as lo
|
||||
left join lunch_cashmove as cm on (cm.id = lo.cashmove)
|
||||
left join lunch_cashbox as lc on (lc.id = cm.box)
|
||||
left join lunch_product as lp on (lo.product = lp.id)
|
||||
|
||||
group by
|
||||
lo.date,lo.user_id,cm.name
|
||||
)
|
||||
""")
|
||||
report_lunch_order()
|
|
@ -0,0 +1,69 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_report_lunch_order_tree" model="ir.ui.view">
|
||||
<field name="name">report.lunch.order.tree</field>
|
||||
<field name="model">report.lunch.order</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Sales Analysis">
|
||||
<field name="date" invisible="1"/>
|
||||
<field name="year" invisible="1"/>
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="user_id" />
|
||||
<field name="box_name"/>
|
||||
<field name="price_total"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_report_lunch_order_search" model="ir.ui.view">
|
||||
<field name="name">report.lunch.order.search</field>
|
||||
<field name="model">report.lunch.order</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Lunch Order Analysis">
|
||||
<group>
|
||||
<filter icon="terp-go-year" string=" 365 Days "
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks performed in last 365 days"/>
|
||||
<filter icon="terp-go-month" string=" 30 Days "
|
||||
name="month"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks performed in last 30 days"/>
|
||||
<filter icon="terp-go-week"
|
||||
string=" 7 Days "
|
||||
separator="1"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks during last 7 days"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="10" col="12">
|
||||
<filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Box" icon="terp-accessories-archiver+" context="{'group_by':'box_name'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_report_lunch_order_all" model="ir.actions.act_window">
|
||||
<field name="name">Lunch Order Analysis</field>
|
||||
<field name="res_model">report.lunch.order</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="search_view_id" ref="view_report_lunch_order_search"/>
|
||||
<field name="context">{'search_default_month':1,'search_default_User':1}</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Lunch Order Analysis" parent="menu_lunch_reporting_order"
|
||||
id="menu_lunch_order_analysis" action="action_report_lunch_order_all" sequence="1" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -586,6 +586,7 @@ class product_packaging(osv.osv):
|
|||
_name = "product.packaging"
|
||||
_description = "Packaging"
|
||||
_rec_name = 'ean'
|
||||
_order = 'sequence'
|
||||
_columns = {
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of packaging."),
|
||||
'name' : fields.text('Description', size=64),
|
||||
|
@ -609,7 +610,6 @@ class product_packaging(osv.osv):
|
|||
'length': fields.float('Length', help='The length of the package'),
|
||||
}
|
||||
|
||||
_order = 'sequence'
|
||||
|
||||
def name_get(self, cr, uid, ids, context={}):
|
||||
if not len(ids):
|
||||
|
|
|
@ -30,12 +30,13 @@
|
|||
<form string="Sales Manager board">
|
||||
<hpaned position="100">
|
||||
<child1>
|
||||
<action name="%(sale.action_suninvoiced_lines_per_month)d" string="Uninvoiced lines" />
|
||||
<action name="%(sale.action_product_bought_by_sale_order)d" string="Product bought base on Sale Orders" />
|
||||
<action name="%(sale.action_quotatio_for_sale)d" string="Quotation For Sale"/>
|
||||
<action width="510" name="%(sale.action_view_product_category_total_price_graph)d" string="Total Price By Product Category"/>
|
||||
</child1>
|
||||
<child2>
|
||||
<action name="%(sale.action_sale_order_by_clients)d" string="Sale order by client" />
|
||||
<action name="%(sale.action_sales_by_regions)d" string="Sales by regions" />
|
||||
<action name="%(sale.action_sales_product_total_price_graph)d" string="Sold products and Total Price"/>
|
||||
<action name="%(sale.action_sales_by_partner)d" string="Sales By Partner"/>
|
||||
<action name="%(sale.action_sales_by_salesman)d" string="Sales By Salesman"/>
|
||||
</child2>
|
||||
</hpaned>
|
||||
</form>
|
||||
|
|
|
@ -112,131 +112,5 @@ class sale_report(osv.osv):
|
|||
""")
|
||||
sale_report()
|
||||
|
||||
class sale_order_by_clients(osv.osv):
|
||||
_name = "sale.order.by.clients"
|
||||
_description = "Sales order by clients"
|
||||
_auto = False
|
||||
_rec_name = 'partner'
|
||||
_columns = {
|
||||
'total_orders': fields.integer('Total'),
|
||||
'partner_id':fields.many2one('res.partner', 'Partner', readonly=True)
|
||||
}
|
||||
_order = 'total_orders desc'
|
||||
def init(self, cr):
|
||||
tools.drop_view_if_exists(cr, 'sale_order_by_clients')
|
||||
cr.execute("""
|
||||
create or replace view sale_order_by_clients as (
|
||||
select
|
||||
min(s.id) as id,
|
||||
count(*) as total_orders,
|
||||
s.partner_id as partner_id
|
||||
from
|
||||
sale_order s
|
||||
where
|
||||
s.state='manual' or s.state='progress'
|
||||
group by
|
||||
s.partner_id
|
||||
)
|
||||
""")
|
||||
sale_order_by_clients()
|
||||
|
||||
class uninvoiced_lines_per_month(osv.osv):
|
||||
_name = "uninvoiced.lines.per.month"
|
||||
_description = "Uninvoiced lines per month"
|
||||
_auto = False
|
||||
_rec_name = 'month'
|
||||
_columns = {
|
||||
'number_of_lines': fields.integer('Total Lines', readonly=True),
|
||||
'year': fields.char('Year', size=10, readonly=True),
|
||||
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
|
||||
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
|
||||
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
|
||||
|
||||
}
|
||||
_order = 'number_of_lines desc'
|
||||
def init(self, cr):
|
||||
tools.drop_view_if_exists(cr, 'uninvoiced_lines_per_month')
|
||||
cr.execute("""
|
||||
create or replace view uninvoiced_lines_per_month as (
|
||||
select
|
||||
min(s.id) as id,
|
||||
count(*) as number_of_lines,
|
||||
to_char(s.create_date, 'MM') as month,
|
||||
to_char(s.create_date, 'YYYY') as year
|
||||
from
|
||||
sale_order_line s
|
||||
where
|
||||
s.state='draft'
|
||||
group by
|
||||
to_char(s.create_date, 'MM'),to_char(s.create_date, 'YYYY')
|
||||
)
|
||||
""")
|
||||
uninvoiced_lines_per_month()
|
||||
|
||||
class product_bought_by_sale_order(osv.osv):
|
||||
_name = "product.bought.by.sale.order"
|
||||
_description = "Product bought by sale order"
|
||||
_auto = False
|
||||
_rec_name = 'month'
|
||||
_columns = {
|
||||
'total_products': fields.integer('Total Products', readonly=True),
|
||||
'product_id':fields.many2one('product.product', 'Product', readonly=True),
|
||||
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
|
||||
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
|
||||
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
|
||||
'year': fields.char('Year', size=64, readonly=True)
|
||||
}
|
||||
_order = 'total_products desc'
|
||||
def init(self, cr):
|
||||
tools.drop_view_if_exists(cr, 'product_bought_by_sale_order')
|
||||
cr.execute("""
|
||||
create or replace view product_bought_by_sale_order as (
|
||||
select
|
||||
min(s.id) as id,
|
||||
l.product_id as product_id,
|
||||
to_char(l.create_date, 'MM') as month,
|
||||
to_char(l.create_date, 'YYYY') as year,
|
||||
count(*) as total_products
|
||||
from
|
||||
sale_order_line l
|
||||
left join
|
||||
sale_order s on (s.id=l.order_id)
|
||||
where
|
||||
s.state='manual' or s.state='progress'
|
||||
group by
|
||||
l.product_id, to_char(l.create_date, 'MM'), to_char(l.create_date, 'YYYY')
|
||||
)
|
||||
""")
|
||||
product_bought_by_sale_order()
|
||||
|
||||
class sales_by_regions(osv.osv):
|
||||
_name = "sales.by.regions"
|
||||
_description = "Sales by regions"
|
||||
_auto = False
|
||||
_rec_name = 'name'
|
||||
_columns = {
|
||||
'total_sales': fields.integer('Total Sales', readonly=True),
|
||||
'name': fields.char('Country', size=64, readonly=True),
|
||||
}
|
||||
_order = 'total_sales desc'
|
||||
def init(self, cr):
|
||||
tools.drop_view_if_exists(cr, 'sales_by_regions')
|
||||
cr.execute("""
|
||||
create or replace view sales_by_regions as (
|
||||
select
|
||||
min(s.id) as id,
|
||||
rc.name as name,
|
||||
count(s.name) as total_sales
|
||||
from
|
||||
sale_order s,res_partner_address p,res_country rc
|
||||
where
|
||||
s.partner_id=p.id and
|
||||
p.country_id=rc.id and
|
||||
(s.state='manual' or s.state='progress')
|
||||
group by
|
||||
rc.name
|
||||
)
|
||||
""")
|
||||
sales_by_regions()
|
||||
|
||||
|
||||
|
|
|
@ -139,137 +139,133 @@
|
|||
|
||||
|
||||
<!--This views used in board_sale module -->
|
||||
<record id="view_sale_order_by_clients_tree" model="ir.ui.view">
|
||||
<field name="name">sale.order.by.clients.tree</field>
|
||||
<field name="model">sale.order.by.clients</field>
|
||||
<record id="view_sales_by_partner_tree" model="ir.ui.view">
|
||||
<field name="name">sales.by.partner.tree</field>
|
||||
<field name="model">sale.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Sales order by clients">
|
||||
<tree string="Sales By Partner">
|
||||
<field name="partner_id"/>
|
||||
<field name="total_orders"/>
|
||||
<field name="price_total"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_sale_order_by_clients_graph" model="ir.ui.view">
|
||||
<field name="name">sale.order.by.clients.graph</field>
|
||||
<field name="model">sale.order.by.clients</field>
|
||||
<record id="view_sales_by_partner_graph" model="ir.ui.view">
|
||||
<field name="name">sales.by.partner.graph</field>
|
||||
<field name="model">sale.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Sales order by clients" type="bar">
|
||||
<graph string="Sales By Partner" type="bar">
|
||||
<field name="partner_id" />
|
||||
<field name="total_orders" operator="+"/>
|
||||
<field name="price_total" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_sale_order_by_clients" model="ir.actions.act_window">
|
||||
<field name="name">Sales Orders</field>
|
||||
<field name="res_model">sale.order.by.clients</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="view_id" ref="view_sale_order_by_clients_tree"/>
|
||||
</record>
|
||||
|
||||
<record id="view_uninvoiced_lines_per_month_tree" model="ir.ui.view">
|
||||
<field name="name">uninvoiced.lines.per.month.tree</field>
|
||||
<field name="model">uninvoiced.lines.per.month</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Uninvoiced lines per month">
|
||||
<field name="year"/>
|
||||
<field name="month"/>
|
||||
<field name="number_of_lines"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_uninvoiced_lines_per_month_graph" model="ir.ui.view">
|
||||
<field name="name">uninvoiced.lines.per.month.graph</field>
|
||||
<field name="model">uninvoiced.lines.per.month</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Uninvoiced lines per month" type="bar">
|
||||
<field name="month" />
|
||||
<field name="number_of_lines" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_suninvoiced_lines_per_month" model="ir.actions.act_window">
|
||||
<field name="name">Uninvoiced Lines</field>
|
||||
<field name="res_model">uninvoiced.lines.per.month</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="view_id" ref="view_uninvoiced_lines_per_month_tree"/>
|
||||
</record>
|
||||
|
||||
<record id="view_product_bought_by_sale_order_tree" model="ir.ui.view">
|
||||
<field name="name">product.bought.by.sale.order.tree</field>
|
||||
<field name="model">product.bought.by.sale.order</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Product bought by sale order">
|
||||
<field name="product_id"/>
|
||||
<field name="month"/>
|
||||
<field name="year"/>
|
||||
<field name="total_products"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_product_bought_by_sale_order_graph" model="ir.ui.view">
|
||||
<field name="name">product.bought.by.sale.order.graph</field>
|
||||
<field name="model">product.bought.by.sale.order</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Product bought by sale order" type="bar">
|
||||
<field name="product_id" select="1"/>
|
||||
<field name="total_products" select="1"/>
|
||||
<field name="month" group = "True"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_product_bought_by_sale_order" model="ir.actions.act_window">
|
||||
<field name="name">Product bought by sale order</field>
|
||||
<field name="res_model">product.bought.by.sale.order</field>
|
||||
<record id="action_sales_by_partner" model="ir.actions.act_window">
|
||||
<field name="name">Sales By Partner</field>
|
||||
<field name="res_model">sale.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="domain">[('year','=', time.strftime('%Y'))]</field>
|
||||
<field name="view_id" ref="view_product_bought_by_sale_order_tree"/>
|
||||
<field name="domain">[('state','in',('manual','progress')),('date','<=', time.strftime('%Y-%m-%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=90)).strftime('%Y-%m-%d'))]</field>
|
||||
<field name="view_id" ref="view_sales_by_partner_graph"/>
|
||||
</record>
|
||||
|
||||
<record id="view_sales_by_regions_tree" model="ir.ui.view">
|
||||
<field name="name">sales.by.regions.tree</field>
|
||||
<field name="model">sales.by.regions</field>
|
||||
<record id="view_sales_by_salesman_tree" model="ir.ui.view">
|
||||
<field name="name">sales.by.salesman.tree</field>
|
||||
<field name="model">sale.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Sales by regions">
|
||||
<field name="name"/>
|
||||
<field name="total_sales"/>
|
||||
<tree string="Sales By Salesman">
|
||||
<field name="user_id"/>
|
||||
<field name="price_total"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_sales_by_regions_graph" model="ir.ui.view">
|
||||
<field name="name">sales.by.regions.graph</field>
|
||||
<field name="model">sales.by.regions</field>
|
||||
<record id="view_sales_by_salesman_graph" model="ir.ui.view">
|
||||
<field name="name">sales.by.salesman.graph</field>
|
||||
<field name="model">sale.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Sales by regions" type="bar">
|
||||
<field name="name"/>
|
||||
<field name="total_sales" operator="+"/>
|
||||
<graph string="Sales By Salesman" type="bar">
|
||||
<field name="user_id" />
|
||||
<field name="price_total" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_sales_by_regions" model="ir.actions.act_window">
|
||||
<field name="name">Sales by regions</field>
|
||||
<field name="res_model">sales.by.regions</field>
|
||||
<record id="action_sales_by_salesman" model="ir.actions.act_window">
|
||||
<field name="name">Sales By Salesman</field>
|
||||
<field name="res_model">sale.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="view_id" ref="view_sales_by_regions_tree"/>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="domain">[('state','in',('manual','progress')),('date','<=', time.strftime('%Y-%m-%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=90)).strftime('%Y-%m-%d'))]</field>
|
||||
<field name="view_id" ref="view_sales_by_salesman_graph"/>
|
||||
</record>
|
||||
|
||||
<record id="view_sales_product_total_price_tree" model="ir.ui.view">
|
||||
<field name="name">sold.product.total.price.tree</field>
|
||||
<field name="model">sale.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Sold products and Total Price">
|
||||
<field name="product_id"/>
|
||||
<field name="price_total"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_sales_product_total_price_graph" model="ir.ui.view">
|
||||
<field name="name">sold.product.total.price.graph</field>
|
||||
<field name="model">sale.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Sold products and Total Price" type="bar">
|
||||
<field name="product_id" />
|
||||
<field name="price_total" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_sales_product_total_price_graph" model="ir.actions.act_window">
|
||||
<field name="name">Sold product and Total Price</field>
|
||||
<field name="res_model">sale.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="domain">[('state','in',('manual','progress')),('date','<=', time.strftime('%Y-%m-%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=90)).strftime('%Y-%m-%d'))]</field>
|
||||
<field name="view_id" ref="view_sales_product_total_price_graph"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_product_category_total_price_tree" model="ir.ui.view">
|
||||
<field name="name">sales.category.product.price.tree</field>
|
||||
<field name="model">sale.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Total Price By Product Category">
|
||||
<field name="categ_id"/>
|
||||
<field name="price_total"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_view_product_category_total_price_graph" model="ir.actions.act_window">
|
||||
<field name="name">Total Price By Product Category</field>
|
||||
<field name="res_model">sale.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="domain">[('state','in',('manual','progress')),('date','<=', time.strftime('%Y-%m-%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=90)).strftime('%Y-%m-%d'))]</field>
|
||||
<field name="view_id" ref="view_product_category_total_price_tree"/>
|
||||
</record>
|
||||
|
||||
<record id="action_quotatio_for_sale" model="ir.actions.act_window">
|
||||
<field name="name">Quotation For Sale</field>
|
||||
<field name="res_model">sale.order</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('state','=','draft'),('date_order','<=', time.strftime('%Y-%m-%d')),('date_order','>',(datetime.date.today()-datetime.timedelta(days=90)).strftime('%Y-%m-%d'))]</field>
|
||||
<field name="view_id" ref="sale.view_order_tree"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
|
|
@ -12,16 +12,16 @@
|
|||
</record>
|
||||
|
||||
<!--
|
||||
Request link
|
||||
-->
|
||||
Request link
|
||||
-->
|
||||
<record id="req_link_tracking" model="res.request.link">
|
||||
<field name="name">Production Lot</field>
|
||||
<field name="object">stock.production.lot</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Resource: stock.location
|
||||
-->
|
||||
Resource: stock.location
|
||||
-->
|
||||
<record id="stock_location_locations" model="stock.location">
|
||||
<field name="name">Physical Locations</field>
|
||||
<field name="usage">view</field>
|
||||
|
@ -41,6 +41,7 @@
|
|||
<field name="name">Scraped</field>
|
||||
<field name="location_id" ref="stock_location_locations_virtual"/>
|
||||
<field name="scrap_location">True</field>
|
||||
<field name="usage">inventory</field>
|
||||
</record>
|
||||
|
||||
<record id="location_inventory" model="stock.location">
|
||||
|
@ -85,8 +86,8 @@
|
|||
</record>
|
||||
|
||||
<!--
|
||||
Properties
|
||||
-->
|
||||
Properties
|
||||
-->
|
||||
<record forcecreate="True" id="property_stock_supplier" model="ir.property">
|
||||
<field name="name">property_stock_supplier</field>
|
||||
<field name="fields_id" search="[('model','=','res.partner'),('name','=','property_stock_supplier')]"/>
|
||||
|
@ -115,8 +116,8 @@
|
|||
</record>
|
||||
|
||||
<!--
|
||||
Resource: stock.warehouse
|
||||
-->
|
||||
Resource: stock.warehouse
|
||||
-->
|
||||
<record id="warehouse0" model="stock.warehouse">
|
||||
<field model="res.company" name="name" search="[]" use="name"/>
|
||||
<field name="lot_input_id" ref="stock_location_stock"/>
|
||||
|
|
Loading…
Reference in New Issue