@@ -860,6 +860,9 @@ class account_invoice(osv.osv):
|
||||
self.pool.get('account.move.line').reconcile(cr, uid, line_ids, 'manual', writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context)
|
||||
else:
|
||||
self.pool.get('account.move.line').reconcile_partial(cr, uid, line_ids, 'manual', context)
|
||||
|
||||
# Update the stored value
|
||||
self.pool.get('account.invoice').write(cr, uid, ids, {}, context=context)
|
||||
return True
|
||||
account_invoice()
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="account.view_account_analytic_account_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/notebook/page/field[@name='to_invoice']" position="after">
|
||||
<xpath expr="//field[@name='to_invoice']" position="after">
|
||||
<!--<field name="to_invoice" string="Default Invoicing Percentage"/>-->
|
||||
<field name="journal_rate_ids" colspan="4"/>
|
||||
</xpath>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_analytic_journal_rate_user","analytic journal rate user","model_analytic_journal_rate_grid","project.group_project_user",1,0,0,0
|
||||
"access_analytic_journal_rate_manager","analytic journal rate manager","model_analytic_journal_rate_grid","project.group_project_manager",1,1,1,1
|
||||
"access_analytic_journal_rate_user","analytic journal rate user","model_analytic_journal_rate_grid","account.group_account_manager",1,0,0,0
|
||||
"access_analytic_journal_rate_manager","analytic journal rate manager","model_analytic_journal_rate_grid","account.group_account_manager",1,1,1,1
|
||||
"access_analytic_journal_rate_account_manager","analytic journal rateaccount manager","model_analytic_journal_rate_grid","account.group_account_manager",1,1,1,1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_analytic_user_funct_user","analytic user funct user","model_analytic_user_funct_grid","project.group_project_user",1,0,0,0
|
||||
"access_analytic_user_funct_manager","analytic user funct manager","model_analytic_user_funct_grid","project.group_project_manager",1,1,1,1
|
||||
"access_analytic_user_funct_user","analytic user funct user","model_analytic_user_funct_grid","account.group_account_manager",1,0,0,0
|
||||
"access_analytic_user_funct_manager","analytic user funct manager","model_analytic_user_funct_grid","account.group_account_manager",1,1,1,1
|
||||
"access_analytic_user_funct_account_manager","analytic user funct account manager","model_analytic_user_funct_grid","account.group_account_manager",1,1,1,1
|
||||
|
||||
|
@@ -0,0 +1,24 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -0,0 +1,82 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
import os
|
||||
from tools import config
|
||||
|
||||
from base_module_quality import base_module_quality
|
||||
import pooler
|
||||
|
||||
class quality_test(base_module_quality.abstract_quality_check):
|
||||
|
||||
def __init__(self):
|
||||
self.result = """
|
||||
Method Test:
|
||||
------------
|
||||
|
||||
This test checks if the class method has exception or not.
|
||||
|
||||
|
||||
"""
|
||||
self.bool_installed_only = False
|
||||
return None
|
||||
|
||||
def run_test(self, module_path, module_name=None, cr=None, uid=None):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
ids2 = pool.get('ir.model.data').search(cr, uid, [('module','=', module_name), ('model','=','ir.model')])
|
||||
obj_list = []
|
||||
for mod in pool.get('ir.model.data').browse(cr, uid, ids2):
|
||||
object_name = mod.name.split('_')
|
||||
object_name.pop(0)
|
||||
object_name = '.'.join(object_name)
|
||||
obj_list.append(str(object_name))
|
||||
result={}
|
||||
self.result += "Module Name:" + module_name + '\n' + '===============\n'
|
||||
for obj in obj_list:
|
||||
temp=[]
|
||||
try:
|
||||
res = pool.get(obj).search(cr, uid, [])
|
||||
temp.append('Ok')
|
||||
except:
|
||||
temp.append('Exception')
|
||||
try:
|
||||
res1 = pool.get(obj).fields_view_get(cr, uid,)
|
||||
temp.append('Ok')
|
||||
except:
|
||||
temp.append('Exception')
|
||||
try:
|
||||
res2 = pool.get(obj).read(cr, uid, [])
|
||||
temp.append('Ok')
|
||||
except:
|
||||
temp.append('Exception')
|
||||
result[obj] = temp
|
||||
self.result+=("%-40s %-12s \t %-16s %-12s")%('Object Name'.ljust(40),'search','fields_view_get','read')
|
||||
self.result+='\n'
|
||||
for res in result:
|
||||
self.result+=("%-40s %-12s \t %-16s \t %-12s")%(res.ljust(40),result[res][0],result[res][1],result[res][2])
|
||||
self.result+="\n"
|
||||
return None
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -30,29 +30,17 @@ import os
|
||||
#TODO: configure pylint
|
||||
#TODO: implement the speed test
|
||||
#TODO: implement the simple test
|
||||
#TODO: add cheks: do the class quality_check inherits the class abstract_quality_check?
|
||||
#TODO: add cheks: do the class quality_check inherits the class abstract_quality_check?
|
||||
#TODO: improve translability
|
||||
|
||||
|
||||
#To keep or not? to be discussed...
|
||||
#~ form_check = '''<?xml version="1.0"?>
|
||||
#~ <form string="Quality check">
|
||||
#~ <field name="test" />
|
||||
#~ </form>'''
|
||||
|
||||
#~ fields_check = {
|
||||
#~ 'test': {
|
||||
#~ 'string':'Tests', 'type':'selection', 'required':True,
|
||||
#~ 'selection': [('pylint', 'Pylint'), ('othertest','other')],
|
||||
#~ 'default': lambda *args: 'pylint'
|
||||
#~ },
|
||||
#~ }
|
||||
|
||||
view_form = """<?xml version="1.0"?>
|
||||
<form string="Check quality">
|
||||
<notebook>
|
||||
<page string="Summary">
|
||||
<field name="general_info" nolabel="1" colspan="4" height="350" width="400"/>
|
||||
<field name="general_info" nolabel="1" colspan="4" height="350" width="800"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>"""
|
||||
@@ -71,8 +59,8 @@ class wiz_quality_check(wizard.interface):
|
||||
from tools import config
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
module_data = pool.get('ir.module.module').browse(cr, uid, data['ids'])
|
||||
|
||||
list_folders = os.listdir(config['addons_path']+'/base_module_quality/')
|
||||
module_name = module_data[0].name
|
||||
for item in list_folders:
|
||||
path = config['addons_path']+'/base_module_quality/'+item
|
||||
if os.path.exists(path+'/'+item+'.py') and item not in ['report', 'wizard', 'security']:
|
||||
@@ -83,18 +71,16 @@ class wiz_quality_check(wizard.interface):
|
||||
x2 = getattr(x, item)
|
||||
x3 = getattr(x2, item)
|
||||
val = x3.quality_test()
|
||||
if not val.bool_installed_only or module_data[0].state == "installed":
|
||||
if (not val.bool_installed_only or module_data[0].state == "installed") and item == 'method_test':
|
||||
val.run_test(str(module_path), module_name, cr, uid)
|
||||
elif not val.bool_installed_only or module_data[0].state == "installed" :
|
||||
val.run_test(str(module_path))
|
||||
else:
|
||||
val.result += "The module has to be installed before running this test."
|
||||
|
||||
string_ret += val.result
|
||||
print val.result_details
|
||||
|
||||
return {'general_info':string_ret}
|
||||
|
||||
|
||||
|
||||
states = {
|
||||
|
||||
#To keep or not? to be discussed...
|
||||
@@ -107,8 +93,8 @@ class wiz_quality_check(wizard.interface):
|
||||
'actions': [_check],
|
||||
'result': {'type':'form', 'arch':view_form, 'fields':view_field, 'state':[('end','Ok')]},
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
wiz_quality_check('base.module.quality')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -87,7 +87,8 @@
|
||||
id="next_id_50"
|
||||
name="Configuration"
|
||||
parent="board.dashboard_menu"
|
||||
groups="base.group_system"/>
|
||||
groups="base.group_system"
|
||||
sequence="0"/>
|
||||
<menuitem
|
||||
action="action_view_board_list_form"
|
||||
id="menu_view_board_form"
|
||||
|
||||
+43
-49
@@ -107,7 +107,7 @@ class node_class(object):
|
||||
where.append( ('parent_id','=',self.object.id) )
|
||||
where.append( ('res_id','=',False) )
|
||||
if nodename:
|
||||
where.append( (fobj._rec_name,'=like',nodename) )
|
||||
where.append( (fobj._rec_name,'like',nodename) )
|
||||
ids = fobj.search(self.cr, self.uid, where+[ ('parent_id','=',self.object and self.object.id or False) ], context=self.context)
|
||||
if self.object and self.root and (self.object.type=='ressource'):
|
||||
ids += fobj.search(self.cr, self.uid, where+[ ('parent_id','=',False) ], context=self.context)
|
||||
@@ -118,7 +118,7 @@ class node_class(object):
|
||||
pool = pooler.get_pool(self.cr.dbname)
|
||||
where = []
|
||||
if nodename:
|
||||
where.append(('name','=like',nodename))
|
||||
where.append(('name','like',nodename))
|
||||
if (self.object and self.object.type=='directory') or not self.object2:
|
||||
where.append(('parent_id','=',self.object and self.object.id or False))
|
||||
else:
|
||||
@@ -144,7 +144,7 @@ class node_class(object):
|
||||
fobj = pool.get('ir.attachment')
|
||||
vargs = [('parent_id','=',False),('res_id','=',False)]
|
||||
if nodename:
|
||||
vargs.append(('name','=like',nodename))
|
||||
vargs.append(('name','like',nodename))
|
||||
file_ids=fobj.search(self.cr,self.uid,vargs)
|
||||
|
||||
res = fobj.browse(self.cr, self.uid, file_ids, context=self.context)
|
||||
@@ -174,7 +174,7 @@ class node_class(object):
|
||||
for invalid in INVALID_CHARS:
|
||||
if nodename.find(INVALID_CHARS[invalid]) :
|
||||
nodename=nodename.replace(INVALID_CHARS[invalid],invalid)
|
||||
where.append(('name','=like',nodename))
|
||||
where.append(('name','like',nodename))
|
||||
ids = obj.search(self.cr, self.uid, where, self.context)
|
||||
res = obj.browse(self.cr, self.uid, ids,self.context)
|
||||
for r in res:
|
||||
@@ -290,7 +290,7 @@ class document_directory(osv.osv):
|
||||
def _get_childs(self, cr, uid, node, nodename=False, context={}):
|
||||
where = []
|
||||
if nodename:
|
||||
where.append(('name','=like',nodename))
|
||||
where.append(('name','like',nodename))
|
||||
if object:
|
||||
where.append(('parent_id','=',object.id))
|
||||
ids = self.search(cr, uid, where, context)
|
||||
@@ -485,19 +485,15 @@ class document_file(osv.osv):
|
||||
_inherit = 'ir.attachment'
|
||||
def _data_get(self, cr, uid, ids, name, arg, context):
|
||||
result = {}
|
||||
cr.execute('select id,store_method,datas,store_fname,link from ir_attachment where id in ('+','.join(map(str,ids))+')')
|
||||
for id,m,d,r,l in cr.fetchall():
|
||||
if m=='db':
|
||||
result[id] = d
|
||||
elif m=='fs':
|
||||
try:
|
||||
path = os.path.join(os.getcwd(), 'filestore', cr.dbname)
|
||||
value = file(os.path.join(path,r), 'rb').read()
|
||||
result[id] = base64.encodestring(value)
|
||||
except:
|
||||
result[id]=''
|
||||
else:
|
||||
result[id] = ''
|
||||
cr.execute('select id,store_fname,link from ir_attachment where id in ('+','.join(map(str,ids))+')')
|
||||
for id,r,l in cr.fetchall():
|
||||
try:
|
||||
path = os.path.join(os.getcwd(), 'filestore', cr.dbname)
|
||||
value = file(os.path.join(path,r), 'rb').read()
|
||||
result[id] = base64.encodestring(value)
|
||||
except:
|
||||
result[id]=''
|
||||
|
||||
if context.get('bin_size', False):
|
||||
result[id] = tools.human_size(len(result[id]))
|
||||
|
||||
@@ -509,26 +505,24 @@ class document_file(osv.osv):
|
||||
def _data_set(self, cr, obj, id, name, value, uid=None, context={}):
|
||||
if not value:
|
||||
return True
|
||||
if (not context) or context.get('store_method','fs')=='fs':
|
||||
path = os.path.join(os.getcwd(), "filestore", cr.dbname)
|
||||
if not os.path.isdir(path):
|
||||
os.makedirs(path)
|
||||
flag = None
|
||||
# This can be improved
|
||||
for dirs in os.listdir(path):
|
||||
if os.path.isdir(os.path.join(path,dirs)) and len(os.listdir(os.path.join(path,dirs)))<4000:
|
||||
flag = dirs
|
||||
break
|
||||
flag = flag or create_directory(path)
|
||||
filename = random_name()
|
||||
fname = os.path.join(path, flag, filename)
|
||||
fp = file(fname,'wb')
|
||||
v = base64.decodestring(value)
|
||||
fp.write(v)
|
||||
filesize = os.stat(fname).st_size
|
||||
cr.execute('update ir_attachment set store_fname=%s,store_method=%s,file_size=%s where id=%s', (os.path.join(flag,filename),'fs',len(v),id))
|
||||
else:
|
||||
cr.execute('update ir_attachment set datas=%s,store_method=%s where id=%s', (Binary(value),'db',id))
|
||||
#if (not context) or context.get('store_method','fs')=='fs':
|
||||
path = os.path.join(os.getcwd(), "filestore", cr.dbname)
|
||||
if not os.path.isdir(path):
|
||||
os.makedirs(path)
|
||||
flag = None
|
||||
# This can be improved
|
||||
for dirs in os.listdir(path):
|
||||
if os.path.isdir(os.path.join(path,dirs)) and len(os.listdir(os.path.join(path,dirs)))<4000:
|
||||
flag = dirs
|
||||
break
|
||||
flag = flag or create_directory(path)
|
||||
filename = random_name()
|
||||
fname = os.path.join(path, flag, filename)
|
||||
fp = file(fname,'wb')
|
||||
v = base64.decodestring(value)
|
||||
fp.write(v)
|
||||
filesize = os.stat(fname).st_size
|
||||
cr.execute('update ir_attachment set store_fname=%s,store_method=%s,file_size=%s where id=%s', (os.path.join(flag,filename),'fs',len(v),id))
|
||||
return True
|
||||
|
||||
_columns = {
|
||||
@@ -543,7 +537,7 @@ class document_file(osv.osv):
|
||||
'create_date': fields.datetime('Date Created', readonly=True),
|
||||
'create_uid': fields.many2one('res.users', 'Creator', readonly=True),
|
||||
'store_method': fields.selection([('db','Database'),('fs','Filesystem'),('link','Link')], "Storing Method"),
|
||||
'datas': fields.function(_data_get,method=True,store=True,fnct_inv=_data_set,string='File Content',type="binary"),
|
||||
'datas': fields.function(_data_get,method=True,fnct_inv=_data_set,string='File Content',type="binary"),
|
||||
'store_fname': fields.char('Stored Filename', size=200),
|
||||
'res_model': fields.char('Attached Model', size=64), #res_model
|
||||
'res_id': fields.integer('Attached ID'), #res_id
|
||||
@@ -595,8 +589,8 @@ class document_file(osv.osv):
|
||||
cr.commit()
|
||||
try:
|
||||
for f in self.browse(cr, uid, ids, context=context):
|
||||
if 'datas' not in vals:
|
||||
vals['datas']=f.datas
|
||||
#if 'datas' not in vals:
|
||||
# vals['datas']=f.datas
|
||||
res = content_index(base64.decodestring(vals['datas']), f.datas_fname, f.file_type or None)
|
||||
super(document_file,self).write(cr, uid, ids, {
|
||||
'index_content': res
|
||||
@@ -635,11 +629,11 @@ class document_file(osv.osv):
|
||||
vals['partner_id']=obj['partner_id']
|
||||
|
||||
datas=None
|
||||
if vals.get('datas',False) and vals.get('link',False) :
|
||||
if vals.get('link',False) :
|
||||
import urllib
|
||||
datas=base64.encodestring(urllib.urlopen(vals['link']).read())
|
||||
else:
|
||||
datas=vals['datas']
|
||||
datas=vals.get('datas',False)
|
||||
vals['file_size']= len(datas)
|
||||
if not self._check_duplication(cr,uid,vals):
|
||||
raise except_orm('ValidateError', 'File name must be unique!')
|
||||
@@ -657,12 +651,12 @@ class document_file(osv.osv):
|
||||
|
||||
def unlink(self,cr, uid, ids, context={}):
|
||||
for f in self.browse(cr, uid, ids, context):
|
||||
if f.store_method=='fs':
|
||||
try:
|
||||
path = os.path.join(os.getcwd(), cr.dbname, 'filestore',f.store_fname)
|
||||
os.unlink(path)
|
||||
except:
|
||||
pass
|
||||
#if f.store_method=='fs':
|
||||
try:
|
||||
path = os.path.join(os.getcwd(), cr.dbname, 'filestore',f.store_fname)
|
||||
os.unlink(path)
|
||||
except:
|
||||
pass
|
||||
return super(document_file, self).unlink(cr, uid, ids, context)
|
||||
document_file()
|
||||
|
||||
|
||||
@@ -61,7 +61,8 @@ class account_analytic_account(osv.osv):
|
||||
help="Total invoiced"),
|
||||
'to_invoice': fields.many2one('hr_timesheet_invoice.factor','Reinvoice Costs',
|
||||
help="Check this field if you plan to automatically generate invoices based " \
|
||||
"on the costs in this analytic account: timesheets, expenses, ..."),
|
||||
"on the costs in this analytic account: timesheets, expenses, ..." \
|
||||
"You can configure an automatic invoice rate on analytic accounts."),
|
||||
}
|
||||
_defaults = {
|
||||
'pricelist_id': lambda self,cr, uid, ctx: ctx.get('pricelist_id', False),
|
||||
|
||||
+305
-309
@@ -1,337 +1,333 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="view_pos_pos_form">
|
||||
<field name="name">pos.order</field>
|
||||
<field name="model">pos.order</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sales Order POS">
|
||||
<notebook >
|
||||
<page string="Order lines">
|
||||
<field name="lines" colspan="4" nolabel="1">
|
||||
<tree string="Order lines" editable="bottom">
|
||||
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,qty,parent.partner_id)" width="275"/>
|
||||
<field name="qty" />
|
||||
<field name="discount" />
|
||||
<field name="price_unit" />
|
||||
<field name="price_subtotal"/>
|
||||
</tree>
|
||||
|
||||
<record model="ir.ui.view" id="view_pos_pos_form">
|
||||
<field name="name">pos.order</field>
|
||||
<field name="model">pos.order</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sales Order POS">
|
||||
<notebook >
|
||||
<form string="Order lines">
|
||||
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,qty,parent.partner_id)"/>
|
||||
<field name="qty" />
|
||||
<field name="discount" />
|
||||
<field name="price_unit" />
|
||||
<field name="price_subtotal"/>
|
||||
</form>
|
||||
</field>
|
||||
<group colspan="4" col="7">
|
||||
<field name="amount_tax"/>
|
||||
<field name="amount_total"/>
|
||||
|
||||
<button name="%(pos_discount)d"
|
||||
string="D_iscount"
|
||||
type="action" states="draft"/>
|
||||
|
||||
<button name="dummy_button"
|
||||
string="Compute"
|
||||
type="object" />
|
||||
|
||||
</group>
|
||||
|
||||
<separator colspan="4" string="Actions"/>
|
||||
<group colspan="4" col="9">
|
||||
|
||||
<field name="state" select="2"/>
|
||||
|
||||
<button name="%(pos_add_product)d"
|
||||
string="_Add product"
|
||||
type="action" states="draft"/>
|
||||
|
||||
<button name="%(pos_payment)d"
|
||||
string="Ma_ke Payment"
|
||||
type="action" states="draft"/>
|
||||
|
||||
<button name="cancel"
|
||||
string="Cancel"
|
||||
states="paid"/>
|
||||
|
||||
<button name="set_to_draft"
|
||||
string="Set to draft"
|
||||
states="cancel"
|
||||
type="object" />
|
||||
|
||||
<button name="%(pos_confirm)d"
|
||||
string="Close"
|
||||
type="action"
|
||||
states="paid"/>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
|
||||
<page string="Order lines">
|
||||
<field name="lines" colspan="4" nolabel="1">
|
||||
<tree string="Order lines" editable="bottom">
|
||||
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,qty,parent.partner_id)" width="275"/>
|
||||
<field name="qty" />
|
||||
<field name="discount" />
|
||||
<field name="price_unit" />
|
||||
<field name="price_subtotal"/>
|
||||
</tree>
|
||||
<page string="Payment">
|
||||
<field name="payments" colspan="4" nolabel="1">
|
||||
<tree string="Payments" editable="bottom">
|
||||
<field name="journal_id" select="1" width="200"/>
|
||||
<field name="amount" />
|
||||
</tree>
|
||||
</field>
|
||||
<separator string="Invoicing" colspan="4"/>
|
||||
<field name="nb_print"/>
|
||||
<newline/>
|
||||
<field name="partner_id" />
|
||||
<newline/>
|
||||
<field name="invoice_id"/>
|
||||
<label/>
|
||||
<button name="invoice" string="Create _Invoice" states="paid"/>
|
||||
<newline/>
|
||||
<field name="sale_journal"/>
|
||||
<field name="account_receivable"/>
|
||||
</page>
|
||||
|
||||
<form string="Order lines">
|
||||
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,qty,parent.partner_id)"/>
|
||||
<field name="qty" />
|
||||
<field name="discount" />
|
||||
<field name="price_unit" />
|
||||
<field name="price_subtotal"/>
|
||||
</form>
|
||||
</field>
|
||||
<group colspan="4" col="7">
|
||||
<field name="amount_tax"/>
|
||||
<field name="amount_total"/>
|
||||
<page string="Other">
|
||||
<field name="pricelist_id" domain="[('type','=','sale')]"/>
|
||||
<field name="shop_id" />
|
||||
<field name="name" select="1"/>
|
||||
<field name="date_order" select="1"/>
|
||||
<field name="date_validity" />
|
||||
<field name="user_id" />
|
||||
|
||||
<button name="%(pos_discount)d"
|
||||
string="D_iscount"
|
||||
type="action" states="draft"/>
|
||||
<separator string="Notes" colspan="4"/>
|
||||
<field name="note" nolabel="1" colspan="4"/>
|
||||
<separator string="Pickings" colspan="4"/>
|
||||
<field name="pickings" nolabel="1" colspan="4"/>
|
||||
|
||||
<button name="dummy_button"
|
||||
string="Compute"
|
||||
type="object" />
|
||||
</page>
|
||||
</notebook>
|
||||
|
||||
</group>
|
||||
|
||||
<separator colspan="4" string="Actions"/>
|
||||
<group colspan="4" col="9">
|
||||
|
||||
<field name="state" select="2"/>
|
||||
|
||||
<button name="%(pos_add_product)d"
|
||||
string="_Add product"
|
||||
type="action" states="draft"/>
|
||||
|
||||
<button name="%(pos_payment)d"
|
||||
string="Ma_ke Payment"
|
||||
type="action" states="draft"/>
|
||||
|
||||
<button name="cancel"
|
||||
string="Cancel"
|
||||
states="paid"/>
|
||||
|
||||
<button name="set_to_draft"
|
||||
string="Set to draft"
|
||||
states="cancel"
|
||||
type="object" />
|
||||
|
||||
<button name="%(pos_confirm)d"
|
||||
string="Close"
|
||||
type="action"
|
||||
states="paid"/>
|
||||
</group>
|
||||
</page>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<page string="Payment">
|
||||
<field name="payments" colspan="4" nolabel="1">
|
||||
<tree string="Payments" editable="bottom">
|
||||
<field name="journal_id" select="1" width="200"/>
|
||||
<field name="amount" />
|
||||
</tree>
|
||||
</field>
|
||||
<separator string="Invoicing" colspan="4"/>
|
||||
<field name="nb_print"/>
|
||||
<newline/>
|
||||
<field name="partner_id" />
|
||||
<newline/>
|
||||
<field name="invoice_id"/>
|
||||
<label/>
|
||||
<button name="invoice" string="Create _Invoice" states="paid"/>
|
||||
<newline/>
|
||||
<field name="sale_journal"/>
|
||||
<field name="account_receivable"/>
|
||||
</page>
|
||||
|
||||
<page string="Other">
|
||||
<field name="pricelist_id" domain="[('type','=','sale')]"/>
|
||||
<field name="shop_id" />
|
||||
<field name="name" select="1"/>
|
||||
<field name="date_order" select="1"/>
|
||||
<field name="date_validity" />
|
||||
<field name="user_id" />
|
||||
|
||||
<separator string="Notes" colspan="4"/>
|
||||
<field name="note" nolabel="1" colspan="4"/>
|
||||
<separator string="Pickings" colspan="4"/>
|
||||
<field name="pickings" nolabel="1" colspan="4"/>
|
||||
|
||||
</page>
|
||||
</notebook>
|
||||
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_pos_pos_form">
|
||||
<field name="name">Point of Sale</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">pos.order</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="view_pos_pos_form"/>
|
||||
<field name="domain">[ ('date_order','>=',time.strftime('%Y-%m-%d')) ]</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.actions.act_window" id="action_pos_pos_form">
|
||||
<field name="name">Point of Sale</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">pos.order</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="view_pos_pos_form"/>
|
||||
<field name="domain">[ ('date_order','>=',time.strftime('%Y-%m-%d')) ]</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_pos_order_tree">
|
||||
<field name="name">Sales</field>
|
||||
<field name="model">pos.order</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="POS Orders">
|
||||
<field name="name"/>
|
||||
<field name="date_order"/>
|
||||
<field name="user_id"/>
|
||||
<field name="invoice_id"/>
|
||||
<field name="last_out_picking"/>
|
||||
<field name="state"/>
|
||||
<field name="amount_total" sum="Amount total"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem name="Point of Sale" id="menu_point_root" />
|
||||
<menuitem name="Point of Sale" parent="menu_point_root" id="menu_point_ofsale" action="action_pos_pos_form"/>
|
||||
<wizard
|
||||
string="Wizard default journals"
|
||||
model="pos.config.journal"
|
||||
name="pos.config.journal"
|
||||
menu="False"
|
||||
id="wizard_default_journal"/>
|
||||
|
||||
<menuitem name="Configuration" parent="menu_point_root"
|
||||
id="menu_point_config" sequence="0"/>
|
||||
<menuitem
|
||||
name="Default journals" parent="menu_point_config"
|
||||
string="Default journals"
|
||||
action="wizard_default_journal"
|
||||
type="wizard"
|
||||
id="menu_wizard_default_journal" />
|
||||
|
||||
<!-- <record model="ir.actions.act_window" id="action_pos_order_tree"> -->
|
||||
<!-- <field name="name">pos.order</field> -->
|
||||
<!-- <field name="type">ir.actions.act_window</field> -->
|
||||
<!-- <field name="res_model">pos.order</field> -->
|
||||
<!-- <field name="view_type">form</field> -->
|
||||
<!-- <field name="view_mode">tree,form</field> -->
|
||||
<!-- <field name="view_id" ref="pos.view_pos_order_tree"/> -->
|
||||
<!-- <field name="domain">[('invoice_id','=',False)]</field> -->
|
||||
<!-- </record> -->
|
||||
<!-- <menuitem name="Point of Sale/Point of Sale/Orders not invoiced" id="menu_action_pos_order_tree" action="action_pos_order_tree"/> -->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_pos_order_tree2">
|
||||
<field name="name">Point of Sale</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">pos.order</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_pos_order_tree"/>
|
||||
<field name="domain">[('date_order','=', time.strftime('%Y-%m-%d'))]</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Orders of the day" parent="menu_point_ofsale" id="menu_action_pos_order_tree2" action="action_pos_order_tree2"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_pos_order_tree3">
|
||||
<field name="name">Point of Sale</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">pos.order</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_pos_order_tree"/>
|
||||
</record>
|
||||
<menuitem name="All orders" parent="menu_point_ofsale" id="menu_action_pos_order_tree3" action="action_pos_order_tree3"/>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_pos_order_tree">
|
||||
<field name="name">Sales</field>
|
||||
<field name="model">pos.order</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="POS Orders">
|
||||
<field name="name"/>
|
||||
<field name="date_order"/>
|
||||
<field name="user_id"/>
|
||||
<field name="invoice_id"/>
|
||||
<field name="last_out_picking"/>
|
||||
<field name="state"/>
|
||||
<field name="amount_total" sum="Amount total"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem name="Point of Sale" id="menu_point_root" />
|
||||
<menuitem name="Point of Sale" parent="menu_point_root" id="menu_point_ofsale" action="action_pos_pos_form"/>
|
||||
<wizard
|
||||
string="Wizard default journals"
|
||||
model="pos.config.journal"
|
||||
name="pos.config.journal"
|
||||
menu="False"
|
||||
id="wizard_default_journal"/>
|
||||
<record model="ir.ui.view" id="view_pos_order_line">
|
||||
<field name="name">Sale lines</field>
|
||||
<field name="model">pos.order.line</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="POS Order lines">
|
||||
<field name="product_id" readonly="1"/>
|
||||
<field name="qty" readonly="1" sum="Total qty"/>
|
||||
<field name="discount" readonly="1"/>
|
||||
<field name="price_unit" readonly="1"/>
|
||||
<field name="price_subtotal" readonly="1" sum="Sum of subtotals"/>
|
||||
<field name="create_date" readonly="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Configuration" parent="menu_point_root" id="menu_point_config"/>
|
||||
<menuitem
|
||||
name="Default journals" parent="menu_point_config"
|
||||
string="Default journals"
|
||||
action="wizard_default_journal"
|
||||
type="wizard"
|
||||
id="menu_wizard_default_journal" />
|
||||
<record model="ir.ui.view" id="view_pos_order_line_form">
|
||||
<field name="name">Sale line</field>
|
||||
<field name="model">pos.order.line</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="POS Order line">
|
||||
<field name="product_id" readonly="1" select="1"/>
|
||||
<field name="qty" readonly="1" select="1"/>
|
||||
<field name="discount" readonly="1" select="2"/>
|
||||
<field name="price_unit" readonly="1" select="2"/>
|
||||
<field name="price_subtotal" readonly="1" />
|
||||
<field name="create_date" readonly="1" select="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- <record model="ir.actions.act_window" id="action_pos_order_tree"> -->
|
||||
<!-- <field name="name">pos.order</field> -->
|
||||
<!-- <field name="type">ir.actions.act_window</field> -->
|
||||
<!-- <field name="res_model">pos.order</field> -->
|
||||
<!-- <field name="view_type">form</field> -->
|
||||
<!-- <field name="view_mode">tree,form</field> -->
|
||||
<!-- <field name="view_id" ref="pos.view_pos_order_tree"/> -->
|
||||
<!-- <field name="domain">[('invoice_id','=',False)]</field> -->
|
||||
<!-- </record> -->
|
||||
<!-- <menuitem name="Point of Sale/Point of Sale/Orders not invoiced" id="menu_action_pos_order_tree" action="action_pos_order_tree"/> -->
|
||||
<record model="ir.actions.act_window" id="action_pos_order_line">
|
||||
<field name="name">Sale line</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">pos.order.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_pos_order_line"/>
|
||||
</record>
|
||||
<menuitem name="POS Lines" parent="menu_point_root" id="menu_action_pos_order_line" action="action_pos_order_line"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_pos_order_tree2">
|
||||
<field name="name">Point of Sale</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">pos.order</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_pos_order_tree"/>
|
||||
<field name="domain">[('date_order','=', time.strftime('%Y-%m-%d'))]</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Orders of the day" parent="menu_point_ofsale" id="menu_action_pos_order_tree2" action="action_pos_order_tree2"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_pos_order_tree3">
|
||||
<field name="name">Point of Sale</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">pos.order</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_pos_order_tree"/>
|
||||
</record>
|
||||
<menuitem name="All orders" parent="menu_point_ofsale" id="menu_action_pos_order_tree3" action="action_pos_order_tree3"/>
|
||||
<record model="ir.actions.act_window" id="action_pos_order_line_day">
|
||||
<field name="name">Sale line</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">pos.order.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_pos_order_line"/>
|
||||
<field name="domain">[('create_date','like',time.strftime('%Y-%m-%d'))]</field>
|
||||
</record>
|
||||
<menuitem name="POS Lines of the day" parent="menu_action_pos_order_line" id="menu_action_pos_order_line_day" action="action_pos_order_line_day"/>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_pos_order_line">
|
||||
<field name="name">Sale lines</field>
|
||||
<field name="model">pos.order.line</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="POS Order lines">
|
||||
<field name="product_id" readonly="1"/>
|
||||
<field name="qty" readonly="1" sum="Total qty"/>
|
||||
<field name="discount" readonly="1"/>
|
||||
<field name="price_unit" readonly="1"/>
|
||||
<field name="price_subtotal" readonly="1" sum="Sum of subtotals"/>
|
||||
<field name="create_date" readonly="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<!-- report -->
|
||||
|
||||
<record model="ir.ui.view" id="view_pos_order_line_form">
|
||||
<field name="name">Sale line</field>
|
||||
<field name="model">pos.order.line</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="POS Order line">
|
||||
<field name="product_id" readonly="1" select="1"/>
|
||||
<field name="qty" readonly="1" select="1"/>
|
||||
<field name="discount" readonly="1" select="2"/>
|
||||
<field name="price_unit" readonly="1" select="2"/>
|
||||
<field name="price_subtotal" readonly="1" />
|
||||
<field name="create_date" readonly="1" select="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_pos_order_line">
|
||||
<field name="name">Sale line</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">pos.order.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_pos_order_line"/>
|
||||
</record>
|
||||
<menuitem name="POS Lines" parent="menu_point_root" id="menu_action_pos_order_line" action="action_pos_order_line"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_pos_order_line_day">
|
||||
<field name="name">Sale line</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">pos.order.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_pos_order_line"/>
|
||||
<field name="domain">[('create_date','like',time.strftime('%Y-%m-%d'))]</field>
|
||||
</record>
|
||||
<menuitem name="POS Lines of the day" parent="menu_action_pos_order_line" id="menu_action_pos_order_line_day" action="action_pos_order_line_day"/>
|
||||
<record model="ir.ui.view" id="view_pos_trans_user_form">
|
||||
<field name="name">report.trans.pos.user.form</field>
|
||||
<field name="model">report.transaction.pos</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="POS ">
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="journal_id" select="1"/>
|
||||
<field name="date_create" select="1"/>
|
||||
<field name="no_trans" select="2"/>
|
||||
<field name="amount" select="2"/>
|
||||
<field name="invoice_id" select="2"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- report -->
|
||||
|
||||
<record model="ir.ui.view" id="view_pos_trans_user_form">
|
||||
<field name="name">report.trans.pos.user.form</field>
|
||||
<field name="model">report.transaction.pos</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="POS ">
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="journal_id" select="1"/>
|
||||
<field name="date_create" select="1"/>
|
||||
<field name="no_trans" select="2"/>
|
||||
<field name="amount" select="2"/>
|
||||
<field name="invoice_id" select="2"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_trans_pos_user_tree">
|
||||
<field name="name">Sales by user</field>
|
||||
<field name="model">report.transaction.pos</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="POS">
|
||||
<field name="date_create"/>
|
||||
<field name="user_id"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="no_trans" sum="Total Transaction"/>
|
||||
<field name="amount" sum="Amount total"/>
|
||||
<field name="invoice_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_trans_pos_tree_today">
|
||||
<field name="name">Sales by user</field>
|
||||
<field name="res_model">report.transaction.pos</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="domain">[('date_create','=',time.strftime('%Y-%m-%d'))]</field>
|
||||
</record>
|
||||
<menuitem name="Reporting" parent="menu_point_root" id="menu_point_rep"/>
|
||||
<menuitem name="Sales of the day" parent="menu_point_rep" action="action_trans_pos_tree_today" id="menu_trans_pos_tree_today"/>
|
||||
<!-- <record model="ir.actions.act_window" id="action_trans_pos_user_tree_today"> -->
|
||||
<!-- <field name="name">Sales by user</field> -->
|
||||
<!-- <field name="res_model">report.transaction.pos</field> -->
|
||||
<!-- <field name="view_type">form</field> -->
|
||||
<!-- <field name="view_mode">tree</field> -->
|
||||
<!-- <field name="domain">[('date_create','=',time.strftime('%Y-%m-%d')),('user_id','=',uid)]</field> -->
|
||||
<!-- </record> -->
|
||||
<!-- <menuitem name="Point of Sale/Reporting/Sales of the day/My sales of the day" action="action_trans_pos_user_tree_today" id="menu_trans_pos_user_tree_today"/> -->
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_trans_pos_user_tree">
|
||||
<field name="name">Sales by user</field>
|
||||
<field name="model">report.transaction.pos</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="POS">
|
||||
<field name="date_create"/>
|
||||
<field name="user_id"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="no_trans" sum="Total Transaction"/>
|
||||
<field name="amount" sum="Amount total"/>
|
||||
<field name="invoice_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_trans_pos_tree_today">
|
||||
<field name="name">Sales by user</field>
|
||||
<field name="res_model">report.transaction.pos</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="domain">[('date_create','=',time.strftime('%Y-%m-%d'))]</field>
|
||||
</record>
|
||||
<menuitem name="Reporting" parent="menu_point_root" id="menu_point_rep"/>
|
||||
<menuitem name="Sales of the day" parent="menu_point_rep" action="action_trans_pos_tree_today" id="menu_trans_pos_tree_today"/>
|
||||
<!-- <record model="ir.actions.act_window" id="action_trans_pos_user_tree_today"> -->
|
||||
<!-- <field name="name">Sales by user</field> -->
|
||||
<!-- <field name="res_model">report.transaction.pos</field> -->
|
||||
<!-- <field name="view_type">form</field> -->
|
||||
<!-- <field name="view_mode">tree</field> -->
|
||||
<!-- <field name="domain">[('date_create','=',time.strftime('%Y-%m-%d')),('user_id','=',uid)]</field> -->
|
||||
<!-- </record> -->
|
||||
<!-- <menuitem name="Point of Sale/Reporting/Sales of the day/My sales of the day" action="action_trans_pos_user_tree_today" id="menu_trans_pos_user_tree_today"/> -->
|
||||
<record model="ir.actions.act_window" id="action_trans_pos_tree_month">
|
||||
<field name="name">Sales by user</field>
|
||||
<field name="res_model">report.transaction.pos</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('date_create','like',time.strftime('%Y-%m'))]</field>
|
||||
</record>
|
||||
<menuitem name="Sales of the month" parent="menu_point_rep" action="action_trans_pos_tree_month" id="menu_trans_pos_tree_month"/>
|
||||
<!-- <record model="ir.actions.act_window" id="action_trans_pos_user_tree_month"> -->
|
||||
<!-- <field name="name">Sales by user</field> -->
|
||||
<!-- <field name="res_model">report.transaction.pos</field> -->
|
||||
<!-- <field name="view_type">form</field> -->
|
||||
<!-- <field name="view_mode">tree,form</field> -->
|
||||
<!-- <field name="domain">[('date_create','like',time.strftime('%Y-%m')),('user_id','=',uid)]</field> -->
|
||||
<!-- </record> -->
|
||||
<!-- <menuitem name="Point of Sale/Reporting/Sales of the month/My sales of the month" action="action_trans_pos_user_tree_month" id="menu_trans_pos_user_tree_month"/> -->
|
||||
|
||||
|
||||
<record model="ir.actions.act_window" id="action_trans_pos_tree_month">
|
||||
<field name="name">Sales by user</field>
|
||||
<field name="res_model">report.transaction.pos</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('date_create','like',time.strftime('%Y-%m'))]</field>
|
||||
</record>
|
||||
<menuitem name="Sales of the month" parent="menu_point_rep" action="action_trans_pos_tree_month" id="menu_trans_pos_tree_month"/>
|
||||
<!-- <record model="ir.actions.act_window" id="action_trans_pos_user_tree_month"> -->
|
||||
<!-- <field name="name">Sales by user</field> -->
|
||||
<!-- <field name="res_model">report.transaction.pos</field> -->
|
||||
<!-- <field name="view_type">form</field> -->
|
||||
<!-- <field name="view_mode">tree,form</field> -->
|
||||
<!-- <field name="domain">[('date_create','like',time.strftime('%Y-%m')),('user_id','=',uid)]</field> -->
|
||||
<!-- </record> -->
|
||||
<!-- <menuitem name="Point of Sale/Reporting/Sales of the month/My sales of the month" action="action_trans_pos_user_tree_month" id="menu_trans_pos_user_tree_month"/> -->
|
||||
|
||||
|
||||
<record model="ir.actions.act_window" id="action_trans_pos_tree">
|
||||
<field name="name">Sales by user</field>
|
||||
<field name="res_model">report.transaction.pos</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<menuitem name="All the sales" parent="menu_point_rep" action="action_trans_pos_tree" id="menu_trans_pos_tree"/>
|
||||
<!-- <record model="ir.actions.act_window" id="action_trans_pos_user_tree"> -->
|
||||
<!-- <field name="name">Sales by user</field> -->
|
||||
<!-- <field name="res_model">report.transaction.pos</field> -->
|
||||
<!-- <field name="view_type">form</field> -->
|
||||
<!-- <field name="view_mode">tree</field> -->
|
||||
<!-- <field name="domain">[('user_id','=',uid)]</field> -->
|
||||
<!-- </record> -->
|
||||
<!-- <menuitem name="Point of Sale/Reporting/All the sales/All my sales " action="action_trans_pos_user_tree" id="menu_trans_pos_user_tree"/> -->
|
||||
|
||||
|
||||
</data>
|
||||
<record model="ir.actions.act_window" id="action_trans_pos_tree">
|
||||
<field name="name">Sales by user</field>
|
||||
<field name="res_model">report.transaction.pos</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<menuitem name="All the sales" parent="menu_point_rep" action="action_trans_pos_tree" id="menu_trans_pos_tree"/>
|
||||
<!-- <record model="ir.actions.act_window" id="action_trans_pos_user_tree"> -->
|
||||
<!-- <field name="name">Sales by user</field> -->
|
||||
<!-- <field name="res_model">report.transaction.pos</field> -->
|
||||
<!-- <field name="view_type">form</field> -->
|
||||
<!-- <field name="view_mode">tree</field> -->
|
||||
<!-- <field name="domain">[('user_id','=',uid)]</field> -->
|
||||
<!-- </record> -->
|
||||
<!-- <menuitem name="Point of Sale/Reporting/All the sales/All my sales " action="action_trans_pos_user_tree" id="menu_trans_pos_user_tree"/> -->
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -271,8 +271,9 @@ class product_template(osv.osv):
|
||||
'loc_rack': fields.char('Rack', size=16),
|
||||
'loc_row': fields.char('Row', size=16),
|
||||
'loc_case': fields.char('Case', size=16),
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
}
|
||||
|
||||
|
||||
def _get_uom_id(self, cr, uid, *args):
|
||||
cr.execute('select id from product_uom order by id limit 1')
|
||||
res = cr.fetchone()
|
||||
@@ -284,6 +285,9 @@ class product_template(osv.osv):
|
||||
return False
|
||||
|
||||
_defaults = {
|
||||
'company_id': lambda self, cr, uid, context: \
|
||||
self.pool.get('res.users').browse(cr, uid, uid,
|
||||
context=context).company_id.id,
|
||||
'type': lambda *a: 'product',
|
||||
'list_price': lambda *a: 1,
|
||||
'cost_method': lambda *a: 'standard',
|
||||
|
||||
@@ -101,6 +101,7 @@
|
||||
<group colspan="2" col="2" name="misc">
|
||||
<separator string="Miscelleanous" colspan="2"/>
|
||||
<field name="active" select="2"/>
|
||||
<field name="company_id" select="2" groups="base.group_extended"/>
|
||||
</group>
|
||||
|
||||
</page>
|
||||
|
||||
@@ -6,5 +6,6 @@
|
||||
<variant type="field" name="variants"/>
|
||||
<price type="field" name="list_price"/>
|
||||
<ean13 type="field" name="ean13"/>
|
||||
<currency type="field" name="company_id.currency_id.name"/>
|
||||
</lot-line>
|
||||
</lots>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<td>
|
||||
<para style="nospace"><xsl:value-of select="code"/></para>
|
||||
</td><td>
|
||||
<para style="nospace" t="1"><xsl:value-of select="price"/> EUR</para>
|
||||
<para style="nospace" t="1"><xsl:value-of select="price"/> <xsl:value-of select="currency"/></para>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td>
|
||||
|
||||
@@ -553,6 +553,7 @@
|
||||
<group>
|
||||
<button name="force_assign" states="confirmed" string="Force Availability" type="object"/>
|
||||
<button name="cancel_assign" states="assigned" string="Cancel Availability" type="object"/>
|
||||
<button name="action_cancel" states="assigned" string="Cancel" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
@@ -646,6 +647,7 @@
|
||||
<group>
|
||||
<button name="force_assign" states="confirmed" string="Force Availability" type="object"/>
|
||||
<button name="cancel_assign" states="assigned" string="Cancel Availability" type="object"/>
|
||||
<button name="action_cancel" states="assigned" string="Cancel" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
@@ -838,6 +840,7 @@
|
||||
<group>
|
||||
<button name="force_assign" states="confirmed" string="Force Availability" type="object"/>
|
||||
<button name="cancel_assign" states="assigned" string="Cancel Availability" type="object"/>
|
||||
<button name="action_cancel" states="assigned" string="Cancel" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
@@ -1013,7 +1016,7 @@
|
||||
<newline/>
|
||||
<newline/>
|
||||
<field groups="base.group_extended" name="product_packaging"/>
|
||||
<newline/>
|
||||
<newline/>
|
||||
<field name="prodlot_id" select="1"
|
||||
context="{'location_id':location_id, 'product_id':product_id}"
|
||||
domain="[('product_id','=',product_id)]"
|
||||
@@ -1027,6 +1030,7 @@
|
||||
<group>
|
||||
<button name="force_assign" states="confirmed" string="Force Availability" type="object"/>
|
||||
<button name="cancel_assign" states="assigned" string="Cancel Availability" type="object"/>
|
||||
<button name="action_cancel" states="assigned" string="Cancel" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
@@ -1202,6 +1206,7 @@
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom" string="UOM"/>
|
||||
<field name="picking_id" select="1"/>
|
||||
<field name="prodlot_id"/>
|
||||
<field name="location_id"/>
|
||||
<field name="location_dest_id"/>
|
||||
@@ -1232,6 +1237,7 @@
|
||||
<field name="priority"/>
|
||||
<field name="address_id" select="2" context="{'context_display':'partner'}"/>
|
||||
<newline/>
|
||||
<field name="picking_id" select="2"/>
|
||||
<field name="prodlot_id" select="2"
|
||||
context="{'location_id':location_id, 'product_id':product_id}"
|
||||
domain="[('product_id','=',product_id)]"
|
||||
|
||||
Reference in New Issue
Block a user