|
- State:
+ State:
|
- PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]
- Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]
- Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]
- Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]
+ PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]
+ Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]
+ Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]
+ Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]
|
- Ref. :
+ Ref. :
|
- [[ voucher.reference or '' ]]
+ [[ voucher.reference or '' ]]
|
- Date:
+ Date:
|
[[ formatLang(voucher.date , date=True) or '' ]]
@@ -226,7 +231,7 @@
|
- [[ (move_ids.partner_id and move_ids.partner_id.name) or 'Account']]
+ [[ (move_ids.partner_id and move_ids.partner_id.name) or 'Account']]
|
[[ formatLang(move_ids.debit) ]]
@@ -237,7 +242,7 @@
|
|
- [[ move_ids.account_id.name ]]
+ [[ move_ids.account_id.name ]]
|
@@ -252,7 +257,7 @@
|
|
- [[ move_ids.name ]] - [[ voucher.reference or '' ]]
+ [[ move_ids.name ]] - [[ get_ref(voucher.id,move_ids) ]]
|
@@ -371,7 +376,7 @@
|
-
+
|
diff --git a/addons/account_voucher/report/report_voucher_amount.py b/addons/account_voucher/report/report_voucher_amount.py
deleted file mode 100644
index b691ca638f0..00000000000
--- a/addons/account_voucher/report/report_voucher_amount.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-import time
-from report import report_sxw
-from tools import amount_to_text_en
-
-class report_voucher_amount(report_sxw.rml_parse):
- def __init__(self, cr, uid, name, context):
- super(report_voucher_amount, self).__init__(cr, uid, name, context)
- self.localcontext.update({
- 'time': time,
- 'convert':self.convert
- })
-
- def convert(self, amount, cur):
- amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur);
- return amt_en
-
-
-report_sxw.report_sxw(
- 'report.voucher.cash_amount',
- 'account.voucher',
- 'addons/account_voucher/report/report_voucher_amount.rml',
- parser=report_voucher_amount,header="external"
-)
diff --git a/addons/account_voucher/report/report_voucher_print.py b/addons/account_voucher/report/report_voucher_print.py
new file mode 100644
index 00000000000..6f405bbe975
--- /dev/null
+++ b/addons/account_voucher/report/report_voucher_print.py
@@ -0,0 +1,94 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+import time
+from report import report_sxw
+from tools import amount_to_text_en
+
+class report_voucher_print(report_sxw.rml_parse):
+ def __init__(self, cr, uid, name, context):
+ super(report_voucher_print, self).__init__(cr, uid, name, context)
+ self.localcontext.update({
+ 'time': time,
+ 'get_title': self.get_title,
+ 'get_lines':self.get_lines,
+ 'get_on_account':self.get_on_account,
+ 'convert':self.convert
+ })
+
+ def convert(self, amount, cur):
+ amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur);
+ return amt_en
+
+ def get_lines(self,voucher):
+ result = []
+ if voucher.type in ('payment','receipt'):
+ type = voucher.line_ids and voucher.line_ids[0].type or False
+ for move in voucher.move_ids:
+ res = {}
+ amount = move.credit
+ if type == 'dr':
+ amount = move.debit
+ if amount > 0.0:
+ res['pname'] = move.partner_id.name
+ res['ref'] = 'Agst Ref'+" "+str(move.name)
+ res['aname'] = move.account_id.name
+ res['amount'] = amount
+ result.append(res)
+ else:
+ type = voucher.line_ids and voucher.line_ids[0].type or False
+ for move in voucher.move_ids:
+ res = {}
+ amount = move.credit
+ if type == 'dr':
+ amount = move.debit
+ if amount > 0.0:
+ res['pname'] = move.partner_id.name
+ res['ref'] = move.name
+ res['aname'] = move.account_id.name
+ res['amount'] = amount
+ result.append(res)
+ return result
+
+ def get_title(self, type):
+ title = ''
+ if type:
+ title = type[0].swapcase() + type[1:] + " Voucher"
+ return title
+
+ def get_on_account(self, voucher):
+ name = ""
+ if voucher.type == 'receipt':
+ name = "Received cash from "+str(voucher.partner_id.name)
+ elif voucher.type == 'payment':
+ name = "Payment from "+str(voucher.partner_id.name)
+ elif voucher.type == 'sale':
+ name = "Sale to "+str(voucher.partner_id.name)
+ elif voucher.type == 'purchase':
+ name = "Purchase from "+str(voucher.partner_id.name)
+ return name
+
+report_sxw.report_sxw(
+ 'report.voucher.print',
+ 'account.voucher',
+ 'addons/account_voucher/report/report_voucher_print.rml',
+ parser=report_voucher_print,header="external"
+)
diff --git a/addons/account_voucher/report/report_voucher_amount.rml b/addons/account_voucher/report/report_voucher_print.rml
similarity index 71%
rename from addons/account_voucher/report/report_voucher_amount.rml
rename to addons/account_voucher/report/report_voucher_print.rml
index e2dccc05e74..358f28b87d5 100755
--- a/addons/account_voucher/report/report_voucher_amount.rml
+++ b/addons/account_voucher/report/report_voucher_print.rml
@@ -1,6 +1,6 @@
-
+
@@ -10,51 +10,17 @@
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -65,7 +31,7 @@
-
+
@@ -92,9 +58,8 @@
-
-
-
+
+
@@ -108,16 +73,16 @@
-
-
+
+
-
+
-
-
-
+
+
+
@@ -149,71 +114,87 @@
-
+
+
- [[ repeatIn(objects,'voucher') ]]
-
+ [[ repeatIn(objects,'voucher') ]]
+
|
- Type:
- |
-
- [[ voucher.journal_id.nme ]]
- |
-
- Number:
- |
-
- [[ voucher.number ]]
- |
-
- Date:
- |
-
- [[ formatLang(voucher.date , date=True) or '' ]]
- |
-
-
-
-
- |
- State:
- |
-
- PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]
- Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]
- Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]
- Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]
- |
-
- Ref:
- |
-
- [[ voucher.reference ]]
- |
-
- Account:
- |
-
- [[ voucher.account_id.name ]]
+ [[ get_title(voucher.type) ]]
|
+
+
+ |
+ Number:
+ |
+
+ [[ voucher.number ]]
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+ Date:
+ |
+
+ [[ formatLang(voucher.date , date=True) or '' ]]
+ |
+
+
+
+
+ |
+ State:
+ |
+
+ PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]
+ Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]
+ Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]
+ Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+ Currency:
+ |
+
+ [[ voucher.currency_id.code ]]
+ |
+
+
|
- Particulars
+ Particulars
|
- Amount
+ Amount
|
@@ -221,29 +202,29 @@
- [[ repeatIn(voucher.payment_ids,'payment_ids') ]]
-
+ [[ repeatIn(get_lines(voucher),'p') ]]
+
|
- [[ payment_ids.partner_id and payment_ids.partner_id.name or '' ]]
+ Account :
|
- [[ payment_ids.amount ]]
- |
-
-
- |
- [[ payment_ids.account_id.name ]]
- |
-
-
+
|
|
- [[ payment_ids.ref ]] [[ payment_ids.amount ]]
+ [[ p['pname'] ]]
+ |
+
+ [[ p['amount'] ]] [[ voucher.currency_id.symbol ]]
+ |
+
+
+ |
+ [[ p['ref'] ]]
|
@@ -253,7 +234,7 @@
|
|
- [[ payment_ids.type ]]
+ Account : [[ p['aname'] ]]
|
@@ -282,7 +263,7 @@
|
|
- [[ voucher.narration or '' ]]
+ [[ voucher.journal_id.name or '' ]]
|
@@ -302,7 +283,7 @@
|
|
- [[ voucher.name ]]
+ [[ get_on_account(voucher) ]]
|
@@ -322,7 +303,7 @@
|
|
- [[ convert(voucher.amount,voucher.currency_id.name) ]]
+ [[ convert(voucher.amount,voucher.currency_id.name) ]]
|
@@ -337,12 +318,12 @@
|
-
+
|
- [[ voucher.amount ]]
+ [[ voucher.amount ]] [[ voucher.currency_id.symbol ]]
|
@@ -358,9 +339,6 @@
-
-
-
|
diff --git a/addons/account_voucher/test/account_voucher_report.yml b/addons/account_voucher/test/account_voucher_report.yml
index eddb313c776..39e9c2144a2 100644
--- a/addons/account_voucher/test/account_voucher_report.yml
+++ b/addons/account_voucher/test/account_voucher_report.yml
@@ -15,15 +15,6 @@
name: Voucher Axelor
period_id: account.period_6
--
- In order to test the PDF reports defined on a account_voucher, we will print account voucher amount Report
--
- !python {model: account.voucher}: |
- import netsvc, tools, os
- (data, format) = netsvc.LocalService('report.voucher.cash_amount').create(cr, uid, [ref("account_voucher_voucheraxelor0")], {}, {})
- if tools.config['test_report_directory']:
- file(os.path.join(tools.config['test_report_directory'], 'account_voucher-amount.'+format), 'wb+').write(data)
-
-
In order to test the PDF reports defined on a account_voucher, we will print account voucher Report
-
diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py
index ebc709e3ff6..6ef093cc935 100644
--- a/addons/account_voucher/voucher.py
+++ b/addons/account_voucher/voucher.py
@@ -143,7 +143,7 @@ class account_voucher(osv.osv):
'reference': fields.char('Ref #', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Transaction reference number."),
'number': fields.related('move_id', 'name', type="char", readonly=True, string='Number'),
'move_id':fields.many2one('account.move', 'Account Entry'),
- 'move_ids': fields.related('move_id','line_id', type='many2many', relation='account.move.line', string='Journal Items', readonly=True),
+ 'move_ids': fields.related('move_id','line_id', type='one2many', relation='account.move.line', string='Journal Items', readonly=True),
'partner_id':fields.many2one('res.partner', 'Partner', change_default=1, readonly=True, states={'draft':[('readonly',False)]}),
'audit': fields.related('move_id','to_check', type='boolean', relation='account.move', string='Audit Complete ?'),
'pay_now':fields.selection([
@@ -375,7 +375,6 @@ class account_voucher(osv.osv):
else:
total_credit = price or 0.0
account_type = 'receivable'
-
ids = move_line_pool.search(cr, uid, [('account_id.type','=', account_type), ('reconcile_id','=', False), ('partner_id','=',partner_id)], context=context)
ids.reverse()
moves = move_line_pool.browse(cr, uid, ids)
@@ -467,8 +466,8 @@ class account_voucher(osv.osv):
vals['value'].update({'currency_id':currency_id})
return vals
- def proforma_voucher(self, cr, uid, ids):
- self.action_move_line_create(cr, uid, ids)
+ def proforma_voucher(self, cr, uid, ids, context=None):
+ self.action_move_line_create(cr, uid, ids, context=context)
return True
def action_cancel_draft(self, cr, uid, ids, context={}):
@@ -529,7 +528,7 @@ class account_voucher(osv.osv):
res['account_id'] = account_id
return {'value':res}
- def action_move_line_create(self, cr, uid, ids, *args):
+ def action_move_line_create(self, cr, uid, ids, context=None):
def _get_payment_term_lines(term_id, amount):
term_pool = self.pool.get('account.payment.term')
@@ -537,18 +536,20 @@ class account_voucher(osv.osv):
terms = term_pool.compute(cr, uid, term_id, amount)
return terms
return False
-
+ if not context:
+ context = {}
move_pool = self.pool.get('account.move')
move_line_pool = self.pool.get('account.move.line')
analytic_pool = self.pool.get('account.analytic.line')
currency_pool = self.pool.get('res.currency')
invoice_pool = self.pool.get('account.invoice')
-
for inv in self.browse(cr, uid, ids):
if inv.move_id:
continue
- if inv.journal_id.sequence_id:
+ if 'force_name' in context and context['force_name']:
+ name = context['force_name']
+ elif inv.journal_id.sequence_id:
name = self.pool.get('ir.sequence').get_id(cr, uid, inv.journal_id.sequence_id.id)
else:
raise osv.except_osv(_('Error !'), _('Please define a sequence on the journal !'))
@@ -815,9 +816,14 @@ account_voucher_line()
class account_bank_statement(osv.osv):
_inherit = 'account.bank.statement'
- def create_move_from_st_line(self, cr, uid, st_line, company_currency_id, next_number, context=None):
+ def create_move_from_st_line(self, cr, uid, st_line_id, company_currency_id, next_number, context=None):
+ st_line = self.pool.get('account.bank.statement.line').browse(cr, uid, st_line_id, context=context)
if st_line.voucher_id:
- return self.pool.get('account.voucher').proforma_voucher(cr, uid, [st_line.voucher_id.id])
+ res = self.pool.get('account.voucher').proforma_voucher(cr, uid, [st_line.voucher_id.id], context={'force_name': next_number})
+ #force refresh of the cache
+ #st_line = self.pool.get('account.bank.statement.line').browse(cr, uid, st_line.id, context=context)
+
+ return self.pool.get('account.move.line').write(cr, uid, [x.id for x in st_line.voucher_id.move_ids], {'statement_id': st_line.statement_id.id}, context=context)
return super(account_bank_statement, self).create_move_from_st_line(cr, uid, st_line, company_currency_id, next_number, context=context)
account_bank_statement()
diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml
index 6cca62c0d57..5fc9b510151 100644
--- a/addons/account_voucher/voucher_payment_receipt_view.xml
+++ b/addons/account_voucher/voucher_payment_receipt_view.xml
@@ -105,8 +105,8 @@
-
-
+
+
-
-
-
+
+
diff --git a/addons/account_voucher/voucher_report.xml b/addons/account_voucher/voucher_report.xml
index 273fc53de5f..04bcb5254ba 100644
--- a/addons/account_voucher/voucher_report.xml
+++ b/addons/account_voucher/voucher_report.xml
@@ -6,8 +6,19 @@
model="account.voucher"
name="voucher.cash_receipt.drcr"
rml="account_voucher/report/report_voucher.rml"
+ groups="base.group_extended"
auto="False"
header = "False"
menu="True"/>
+
+
+
diff --git a/addons/decimal_precision/decimal_precision.py b/addons/decimal_precision/decimal_precision.py
index 463dbf67cee..0ecb046b481 100644
--- a/addons/decimal_precision/decimal_precision.py
+++ b/addons/decimal_precision/decimal_precision.py
@@ -20,6 +20,9 @@
##############################################################################
from osv import osv, fields
+from tools import cache
+import pooler
+
class decimal_precision(osv.osv):
_name = 'decimal.precision'
@@ -30,23 +33,32 @@ class decimal_precision(osv.osv):
_defaults = {
'digits': lambda *a : 2,
}
+
+ _sql_constraints = [
+ ('name_uniq', 'unique (name)', """The Usage of the decimal precision must be unique!"""),
+ ]
+
+ @cache(skiparg=3)
def precision_get(self, cr, uid, application):
cr.execute('select digits from decimal_precision where name=%s', (application,))
res = cr.fetchone()
return res and res[0] or 2
def write(self, cr, uid, ids, data, *args, **argv):
+ self.precision_get.clear_cache(cr.dbname)
res = super(decimal_precision, self).write(cr, uid, ids, data, *args, **argv)
for obj in self.pool.obj_list():
for colname,col in self.pool.get(obj)._columns.items():
if isinstance(col, fields.float):
col.digits_change(cr)
return res
+
decimal_precision()
+
def get_precision(application):
def change_digit(cr):
- cr.execute('select digits from decimal_precision where name=%s', (application,))
- res = cr.fetchone()
- return (16,res and res[0] or 2)
+ return pooler.get_pool(cr.dbname).get('decimal.precision').precision_get(cr, 1, application)
return change_digit
+
+
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
index 624ce72d659..a4049242c22 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
@@ -27,28 +27,39 @@ from mx import DateTime
from tools.translate import _
class one2many_mod2(fields.one2many):
- def get(self, cr, obj, ids, name, user=None, offset=0, context={}, values={}):
- res = {}
- for id in ids:
- res[id] = []
+ def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None):
+ if context is None:
+ context = {}
- res5 = obj.read(cr, user, ids, ['date_current', 'user_id'], context=context)
- res6 = {}
- for r in res5:
- res6[r['id']] = (r['date_current'], r['user_id'][0])
+ if values is None:
+ values = {}
- ids2 = []
- for id in ids:
- dom = []
+ res = {}.fromkeys(ids, [])
+
+ # dict:
+ # {idn: (date_current, user_id), ...
+ # 1: ('2010-08-15', 1)}
+ res6 = dict([(rec['id'], (rec['date_current'], rec['user_id'][0]))
+ for rec
+ in obj.read(cr, user, ids, ['date_current', 'user_id'], context=context)])
+
+ # eg: ['|', '|',
+ # '&', '&', ('name', '>=', '2011-03-01'), ('name', '<=', '2011-03-01'), ('employee_id.user_id', '=', 1),
+ # '&', '&', ('name', '>=', '2011-02-01'), ('name', '<=', '2011-02-01'), ('employee_id.user_id', '=', 1)]
+ dom = []
+ for c, id in enumerate(ids):
if id in res6:
- dom = [('name', '>=', res6[id][0] + ' 00:00:00'),
- ('name', '<=', res6[id][0] + ' 23:59:59'),
- ('employee_id.user_id', '=', res6[id][1])]
- ids2.extend(obj.pool.get(self._obj).search(cr, user,
- dom, limit=self._limit))
+ if c: # skip first
+ dom.insert(0 ,'|')
+ dom.append('&')
+ dom.append('&')
+ dom.append(('name', '>=', res6[id][0]))
+ dom.append(('name', '<=', res6[id][0]))
+ dom.append(('employee_id.user_id', '=', res6[id][1]))
- for r in obj.pool.get(self._obj)._read_flat(cr, user, ids2,
- [self._fields_id], context=context, load='_classic_write'):
+ ids2 = obj.pool.get(self._obj).search(cr, user, dom, limit=self._limit)
+
+ for r in obj.pool.get(self._obj)._read_flat(cr, user, ids2, [self._fields_id], context=context, load='_classic_write'):
if r[self._fields_id]:
res.setdefault(r[self._fields_id][0], []).append(r['id'])
@@ -57,17 +68,21 @@ class one2many_mod2(fields.one2many):
def set(self, cr, obj, id, field, values, user=None, context=None):
if context is None:
context = {}
+
context = context.copy()
context['sheet_id'] = id
- return super(one2many_mod2, self).set(cr, obj, id, field, values, user=user,
- context=context)
+ return super(one2many_mod2, self).set(cr, obj, id, field, values, user=user, context=context)
class one2many_mod(fields.one2many):
- def get(self, cr, obj, ids, name, user=None, offset=0, context={}, values={}):
- res = {}
- for id in ids:
- res[id] = []
+ def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None):
+ if context is None:
+ context = {}
+
+ if values is None:
+ values = {}
+
+ res = {}.fromkeys(ids, [])
res5 = obj.read(cr, user, ids, ['date_current', 'user_id'], context=context)
res6 = {}
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index 5ad90bf25d6..87dfe8dd670 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -378,7 +378,6 @@ class one2many_domain(fields.one2many):
move_obj = obj.pool.get('stock.move')
res = {}.fromkeys(ids, [])
- key = operator.itemgetter(0)
move_ids = move_obj.search(cr, user, self._domain+[('production_id', 'in', tuple(ids))], context=context)
related_move_dict = dict([(o.production_id.id, [o.id]) for o in move_obj.browse(cr, user, move_ids, context=context)])
res.update(related_move_dict)
diff --git a/addons/product/product_demo.xml b/addons/product/product_demo.xml
index 155e759a549..cbc1f4d458a 100644
--- a/addons/product/product_demo.xml
+++ b/addons/product/product_demo.xml
@@ -463,18 +463,17 @@
Restaurant Expenses
-
- WORK
- produce
- service
-
+ WORK
+ produce
+ service
+
- 20.0
+ 20.0
Worker
@@ -486,15 +485,12 @@
buy
10.0
-
-
- Rear Panel SHE100
-
+
+
+ Rear Panel SHE100
-
-
+
+
RPAN200
@@ -504,9 +500,6 @@ Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
Rear Panel SHE200
-
@@ -519,9 +512,6 @@ Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
Side Panel
-
@@ -534,9 +524,6 @@ Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
Rack 100cm
-
@@ -549,9 +536,6 @@ Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
Rack 200cm
-
@@ -576,9 +560,6 @@ Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
Wood Lintel 4m
-
@@ -590,9 +571,6 @@ Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
Metal Cleats
-
@@ -607,7 +585,6 @@ Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
Hotel Expenses
-
diff --git a/addons/product/test/product_report.yml b/addons/product/test/product_report.yml
index 6e80083f66b..de86f392e5b 100644
--- a/addons/product/test/product_report.yml
+++ b/addons/product/test/product_report.yml
@@ -3,7 +3,7 @@
-
!python {model: product.product}: |
import netsvc, tools, os
- data_dict = {'model': 'product.price_list'}
+ data_dict = {'model': 'product.product'}
data_dict['form'] = {
'qty1': 1,
'qty2': 5,
diff --git a/addons/sale/sale_demo.xml b/addons/sale/sale_demo.xml
index cd0fdbd682f..a6cfc961600 100644
--- a/addons/sale/sale_demo.xml
+++ b/addons/sale/sale_demo.xml
@@ -193,6 +193,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index b1f31294a97..ed93388df54 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1450,7 +1450,7 @@ class stock_move(osv.osv):
'date': fields.datetime('Creation Date', select=True),
'date_planned': fields.datetime('Date', required=True, help="Scheduled date for the movement of the products or real date if the move is done."),
'date_expected': fields.datetime('Date Expected', readonly=True,required=True, help="Scheduled date for the movement of the products"),
- 'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
+ 'product_id': fields.many2one('product.product', 'Product', required=True, select=True, domain=[('type','<>','service')]),
'product_qty': fields.float('Quantity', required=True),
'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True),
| | |