diff --git a/addons/account/account.py b/addons/account/account.py index a9b03208d0b..6589ec724a2 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2651,7 +2651,7 @@ class account_tax_code_template(osv.osv): company = self.pool.get('res.company').browse(cr, uid, company_id, context=context) #find all the children of the tax_code_root_id - children_tax_code_template = obj_tax_code_template.search(cr, uid, [('parent_id','child_of',[tax_code_root_id])], order='id') + children_tax_code_template = tax_code_root_id and obj_tax_code_template.search(cr, uid, [('parent_id','child_of',[tax_code_root_id])], order='id') or [] for tax_code_template in obj_tax_code_template.browse(cr, uid, children_tax_code_template, context=context): vals = { 'name': (tax_code_root_id == tax_code_template.id) and company.name or tax_code_template.name, diff --git a/addons/account_payment/__openerp__.py b/addons/account_payment/__openerp__.py index 1912dfa5198..e368623a000 100644 --- a/addons/account_payment/__openerp__.py +++ b/addons/account_payment/__openerp__.py @@ -51,8 +51,10 @@ This module provides : ], 'demo_xml': ['account_payment_demo.xml'], 'test': [ - 'test/account_payment.yml', - 'test/account_payment_report.yml' + 'test/account_payment_demo.yml', + 'test/cancel_payment_order.yml', + 'test/payment_order_process.yml', + 'test/account_payment_report.yml', ], 'installable': True, 'active': False, diff --git a/addons/account_payment/account_payment.py b/addons/account_payment/account_payment.py index ba98c71fc3e..1de715dc777 100644 --- a/addons/account_payment/account_payment.py +++ b/addons/account_payment/account_payment.py @@ -68,6 +68,7 @@ class payment_order(osv.osv): _rec_name = 'reference' _order = 'id desc' + #dead code def get_wizard(self, type): logger = netsvc.Logger() logger.notifyChannel("warning", netsvc.LOG_WARNING, @@ -235,6 +236,7 @@ class payment_line(osv.osv): break return result + #dead code def select_by_name(self, cr, uid, ids, name, args, context=None): if not ids: return {} partner_obj = self.pool.get('res.partner') diff --git a/addons/account_payment/test/account_payment.yml b/addons/account_payment/test/account_payment.yml deleted file mode 100644 index 13c5b5b20a4..00000000000 --- a/addons/account_payment/test/account_payment.yml +++ /dev/null @@ -1,118 +0,0 @@ -- - In order to test account_payment in OpenERP I created a new Bank Record -- - Creating a res.partner.bank record -- - !record {model: res.partner.bank, id: res_partner_bank_0}: - acc_number: '126-2013269-08' - partner_id: base.res_partner_9 - sequence: 0.0 - state: bank - bank: base.res_bank_1 -- - I created a new Payment Mode -- - Creating a payment.mode record -- - !record {model: payment.mode, id: payment_mode_m0}: - bank_id: res_partner_bank_0 - journal: account.bank_journal - name: TestMode - -- - I created a Supplier Invoice -- - Creating a account.invoice record -- - !record {model: account.invoice, id: account_invoice_payment}: - account_id: account.a_pay - address_contact_id: base.res_partner_address_tang - address_invoice_id: base.res_partner_address_tang - check_total: 300.0 - company_id: base.main_company - currency_id: base.EUR - invoice_line: - - account_id: account.a_expense - name: '[PC1] Basic PC' - price_unit: 300.0 - product_id: product.product_product_pc1 - quantity: 1.0 - uos_id: product.product_uom_unit - journal_id: account.expenses_journal - partner_id: base.res_partner_asus - reference_type: none - type: in_invoice - -- - I make the supplier invoice in Open state -- - Performing a workflow action invoice_open on module account.invoice -- - !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_payment} - -- - I create a new payment order -- - Creating a payment.order record -- - !record {model: payment.order, id: payment_order_0}: - date_prefered: due - mode: payment_mode_m0 - reference: !eval "'%s/006' %(datetime.now().year)" - user_id: base.user_root - - -- - Creating a payment.order.create record -- - !record {model: payment.order.create, id: payment_order_create_0}: - duedate: !eval time.strftime('%Y-%m-%d') - -- - I searched the entries using "Payment Create Order" wizard -- - Performing an osv_memory action search_entries on module payment.order.create -- - !python {model: payment.order.create}: | - self.search_entries(cr, uid, [ref("payment_order_create_0")], {"lang": "en_US", - "active_model": "payment.order", "active_ids": [ref("payment_order_0")], - "tz": False, "active_id": ref("payment_order_0"), }) -- - I check that Initially Payment order is in "draft" state -- - !assert {model: payment.order, id: payment_order_0}: - - state == 'draft' -- - I pressed the confirm payment button to confirm the payment -- - Performing a workflow action open on module payment.order -- - !workflow {model: payment.order, action: open, ref: payment_order_0} -- - I check that Payment order is in "Confirmed" state -- - !assert {model: payment.order, id: payment_order_0}: - - state == 'open' -- - I paid the payment using "Make Payments" Button -- - Creating a account.payment.make.payment record -- - !record {model: account.payment.make.payment, id: account_payment_make_payment_0}: - {} - -- - Performing an osv_memory action launch_wizard on module account.payment.make.payment -- - !python {model: account.payment.make.payment}: | - self.launch_wizard(cr, uid, [ref("account_payment_make_payment_0")], {"lang": - "en_US", "active_model": "payment.order", "active_ids": [ref("payment_order_0")], "tz": - False, "active_id": ref("payment_order_0"), }) - -- - I check that Payment order is in "Done" state -- - !assert {model: payment.order, id: payment_order_0}: - - state == 'done' - - diff --git a/addons/account_payment/test/account_payment_demo.yml b/addons/account_payment/test/account_payment_demo.yml new file mode 100644 index 00000000000..14add1475c7 --- /dev/null +++ b/addons/account_payment/test/account_payment_demo.yml @@ -0,0 +1,13 @@ +- + !record {model: payment.mode, id: payment_mode_1}: + company_id: base.main_company +- + !record {model: payment.order, id: payment_order_2}: + mode: payment_mode_1 +- + !record {model: payment.line, id: payment_line_0}: + name: Test + communication: Test + partner_id: base.res_partner_agrolait + order_id: payment_order_2 + amount_currency: 100.00 diff --git a/addons/account_payment/test/account_payment_report.yml b/addons/account_payment/test/account_payment_report.yml index 45022e19a73..8786841bf1a 100644 --- a/addons/account_payment/test/account_payment_report.yml +++ b/addons/account_payment/test/account_payment_report.yml @@ -1,8 +1,8 @@ - - In order to test the PDF reports defined on Account Payment, Print a Payment Order -- + In order to test the PDF reports defined on Account Payment, I print a Payment Order report. +- !python {model: payment.order}: | import netsvc, tools, os - (data, format) = netsvc.LocalService('report.payment.order').create(cr, uid, [ref('account_payment.payment_order_1')], {}, {}) + (data, format) = netsvc.LocalService('report.payment.order').create(cr, uid, [ref('payment_order_1')], {}, {}) if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'account_payment-payment_order_report.'+format), 'wb+').write(data) \ No newline at end of file + file(os.path.join(tools.config['test_report_directory'], 'account_payment-payment_order_report.'+format), 'wb+').write(data) diff --git a/addons/account_payment/test/cancel_payment_order.yml b/addons/account_payment/test/cancel_payment_order.yml new file mode 100644 index 00000000000..9337581f219 --- /dev/null +++ b/addons/account_payment/test/cancel_payment_order.yml @@ -0,0 +1,30 @@ +- + In order to test the process of cancelling the payment order, +- + I confirm payment order. +- + !workflow {model: payment.order, action: open, ref: payment_order_1} +- + I check that payment order is now "Confirmed". +- + !assert {model: payment.order, id: payment_order_1, severity: error, string: Payment Order should be 'Confirmed'.}: + - state == 'open' +- + Now, I cancel the payment order. +- + !workflow {model: payment.order, action: cancel, ref: payment_order_1} +- + I check that payment order is now "Cancelled". +- + !assert {model: payment.order, id: payment_order_1, severity: error, string: Payment Order should be 'Cancelled'.}: + - state == 'cancel' +- + I again set the payment order to draft. +- + !python {model: payment.order}: | + self.set_to_draft(cr, uid, [ref("payment_order_1")]) +- + I check that payment order is now "Draft". +- + !assert {model: payment.order, id: payment_order_1, severity: error, string: Payment Order should be in 'Draft' state.}: + - state == 'draft' diff --git a/addons/account_payment/test/payment_order_process.yml b/addons/account_payment/test/payment_order_process.yml new file mode 100644 index 00000000000..2bb04807a64 --- /dev/null +++ b/addons/account_payment/test/payment_order_process.yml @@ -0,0 +1,107 @@ +- + In order to test the process of payment order, I start with the supplier invoice. +- + !python {model: account.invoice}: | + self.write(cr, uid, [ref('account.demo_invoice_0')], {'check_total': 14}) +- + In order to test account move line of journal, I check that there is no move attached to the invoice. +- + !python {model: account.invoice}: | + invoice = self.browse(cr, uid, ref("account.demo_invoice_0")) + assert (not invoice.move_id), "Moves are wrongly created for invoice." +- + I open the invoice. +- + !workflow {model: account.invoice, action: invoice_open, ref: account.demo_invoice_0} +- + I check that the invoice state is now "Open". +- + !assert {model: account.invoice, id: account.demo_invoice_0, severity: error, string: Invoice should be in 'Open' state}: + - state == 'open' +- + I confirm the payment order. +- + !workflow {model: payment.order, action: open, ref: payment_order_1} +- + I check that payment order is now "Confirmed". +- + !assert {model: payment.order, id: payment_order_1, severity: error, string: Payment Order should be 'Confirmed'.}: + - state == 'open' +- + !record {model: payment.order.create, id: payment_order_create_0}: + duedate: !eval time.strftime('%Y-%m-%d') +- + I search for the invoice entries to make the payment. +- + !python {model: payment.order.create}: | + self.search_entries(cr, uid, [ref("payment_order_create_0")], { + "active_model": "payment.order", "active_ids": [ref("payment_order_1")], + "active_id": ref("payment_order_1"), }) +- + I create payment lines entries. +- + !python {model: payment.order.create}: | + invoice = self.pool.get('account.invoice').browse(cr, uid, ref("account.demo_invoice_0")) + move_line = invoice.move_id.line_id[0] + self.write(cr, uid, [ref("payment_order_create_0")], {'entries': [(6,0,[move_line.id])]}) + self.create_payment(cr, uid, [ref("payment_order_create_0")], { + "active_model": "payment.order", "active_ids": [ref("payment_order_1")], + "active_id": ref("payment_order_1")}) +- + I check that payment line is created with proper data. +- + !python {model: payment.order}: | + invoice = self.pool.get('account.invoice').browse(cr, uid, ref("account.demo_invoice_0")) + payment = self.browse(cr, uid, ref("payment_order_1")) + payment_line = payment.line_ids[0] + + assert payment_line.move_line_id, "move line is not created in payment line." + assert invoice.move_id.name == payment_line.ml_inv_ref.number, "invoice reference number is not same created." + assert invoice.partner_id == payment_line.partner_id, "Partner is not correct." + assert invoice.date_due == payment_line.ml_maturity_date, "Due date is not correct." + assert invoice.amount_total == payment_line.amount, "Payment amount is not correct." +- + After making all payments, I finish the payment order. +- + !python {model: payment.order}: | + self.set_done(cr, uid, [ref("payment_order_1")]) +- + I check that payment order is now "Done". +- + !assert {model: payment.order, id: payment_order_1, severity: error, string: Payment Order should be in 'Done' state}: + - state == 'done' +- + I check that payment order is done with proper data. +- + !python {model: payment.order}: | + payment = self.browse(cr, uid, ref("payment_order_1")) + assert payment.date_done, "Date is not created." +- + I create a bank statement. +- + !record {model: account.bank.statement, id: account_bank_statement_1}: + balance_end_real: 0.0 + balance_start: 0.0 + date: !eval time.strftime('%Y-%m-%d') + journal_id: account.bank_journal + name: / + period_id: account.period_10 +- + I import payment order lines for the bank statement. +- + !python {model: account.payment.populate.statement}: | + payment = self.pool.get('payment.order').browse(cr, uid, ref("payment_order_1")) + payment_line = payment.line_ids[0] + import_payment_id = self.create(cr, uid, {'lines': [(6,0,[payment_line.id])]}) + self.populate_statement(cr, uid, [import_payment_id], {"statement_id": ref("account_bank_statement_1"), + "active_model": "account.bank.statement", "journal_type": "cash", + "active_id": ref("account_bank_statement_1")}) +- + I am checking whether the calculations of Owner Account and Destination Account are done correctly or not in payment line. +- + !python {model: payment.line}: | + payment = self.pool.get('payment.order').browse(cr, uid, ref("payment_order_1")) + line_id = self.browse(cr, uid,payment.line_ids[0].id,context) + assert line_id.info_owner, "Owner Account not proper." + assert line_id.info_partner, "Destination Account not proper." + assert line_id.ml_inv_ref, "Invoice reference is not proper." diff --git a/addons/account_payment/wizard/account_payment_create_order_view.xml b/addons/account_payment/wizard/account_payment_create_order_view.xml index c454a84bffd..538d32efe80 100644 --- a/addons/account_payment/wizard/account_payment_create_order_view.xml +++ b/addons/account_payment/wizard/account_payment_create_order_view.xml @@ -27,7 +27,8 @@
- + + diff --git a/addons/account_payment/wizard/account_payment_pay.py b/addons/account_payment/wizard/account_payment_pay.py index ca9311b1f88..6bcb04fa490 100644 --- a/addons/account_payment/wizard/account_payment_pay.py +++ b/addons/account_payment/wizard/account_payment_pay.py @@ -21,6 +21,7 @@ from osv import osv +#TODO:REMOVE this wizard is not used class account_payment_make_payment(osv.osv_memory): _name = "account.payment.make.payment" _description = "Account make payment" diff --git a/addons/account_payment/wizard/account_payment_pay_view.xml b/addons/account_payment/wizard/account_payment_pay_view.xml index 3d732aea6e2..a8835e0da8f 100644 --- a/addons/account_payment/wizard/account_payment_pay_view.xml +++ b/addons/account_payment/wizard/account_payment_pay_view.xml @@ -1,7 +1,7 @@ - + account.payment.make.payment.form account.payment.make.payment diff --git a/addons/delivery/delivery.py b/addons/delivery/delivery.py index e747e6871b3..a149f99777c 100644 --- a/addons/delivery/delivery.py +++ b/addons/delivery/delivery.py @@ -103,7 +103,7 @@ class delivery_carrier(osv.osv): grid_line_pool = self.pool.get('delivery.grid.line') grid_pool = self.pool.get('delivery.grid') for record in self.browse(cr, uid, ids, context=context): - grid_id = grid_pool.search(cr, uid, [('carrier_id', '=', record.id),('sequence','=',9999)], context=context) + grid_id = grid_pool.search(cr, uid, [('carrier_id', '=', record.id)], context=context) if grid_id and not (record.normal_price or record.free_if_more_than): grid_pool.unlink(cr, uid, grid_id, context=context) @@ -115,7 +115,7 @@ class delivery_carrier(osv.osv): record_data = { 'name': record.name, 'carrier_id': record.id, - 'sequence': 9999, + 'sequence': 10, } new_grid_id = grid_pool.create(cr, uid, record_data, context=context) grid_id = [new_grid_id] diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py index ce84079cc11..9162a25d002 100644 --- a/addons/hr_payroll/hr_payroll.py +++ b/addons/hr_payroll/hr_payroll.py @@ -585,14 +585,15 @@ class hr_payslip(osv.osv): #check if the rule can be applied if obj_rule.satisfy_condition(cr, uid, rule.id, localdict, context=context) and rule.id not in blacklist: #compute the amount of the rule - amount, qty = obj_rule.compute_rule(cr, uid, rule.id, localdict, context=context) + amount, qty, rate = obj_rule.compute_rule(cr, uid, rule.id, localdict, context=context) #check if there is already a rule computed with that code previous_amount = rule.code in localdict and localdict[rule.code] or 0.0 #set/overwrite the amount computed for this rule in the localdict - localdict[rule.code] = amount * qty + tot_rule = amount * qty * rate / 100.0 + localdict[rule.code] = tot_rule rules[rule.code] = rule #sum the amount for its salary category - localdict = _sum_salary_rule_category(localdict, rule.category_id, (amount * qty) - previous_amount) + localdict = _sum_salary_rule_category(localdict, rule.category_id, tot_rule - previous_amount) #create/overwrite the rule in the temporary results result_dict[key] = { 'salary_rule_id': rule.id, @@ -616,6 +617,7 @@ class hr_payslip(osv.osv): 'amount': amount, 'employee_id': contract.employee_id.id, 'quantity': qty, + 'rate': rate, } else: #blacklist this rule and its children @@ -780,7 +782,7 @@ class hr_salary_rule(osv.osv): ('code','Python Code'), ],'Amount Type', select=True, required=True, help="The computation method for the rule amount."), 'amount_fix': fields.float('Fixed Amount', digits_compute=dp.get_precision('Payroll'),), - 'amount_percentage': fields.float('Percentage (%)', digits_compute=dp.get_precision('Payroll'), help='For example, enter 50.0 to apply a percentage of 50%'), + 'amount_percentage': fields.float('Percentage (%)', digits_compute=dp.get_precision('Payroll Rate'), help='For example, enter 50.0 to apply a percentage of 50%'), 'amount_python_compute':fields.text('Python Code'), 'amount_percentage_base':fields.char('Percentage based on',size=1024, required=False, readonly=False, help='result will be affected to a variable'), 'child_ids':fields.one2many('hr.salary.rule', 'parent_rule_id', 'Child Salary Rule'), @@ -846,26 +848,26 @@ result = rules.NET > categories.NET * 0.10''', #TODO should add some checks on the type of result (should be float) def compute_rule(self, cr, uid, rule_id, localdict, context=None): """ - @param rule_id: id of rule to compute - @param localdict: dictionary containing the environement in which to compute the rule - @return: returns the result of computation and the quantity as floats + :param rule_id: id of rule to compute + :param localdict: dictionary containing the environement in which to compute the rule + :return: returns a tuple build as the base/amount computed, the quantity and the rate + :rtype: (float, float, float) """ rule = self.browse(cr, uid, rule_id, context=context) if rule.amount_select == 'fix': try: - return rule.amount_fix, eval(rule.quantity, localdict) + return rule.amount_fix, eval(rule.quantity, localdict), 100.0 except: raise osv.except_osv(_('Error'), _('Wrong quantity defined for salary rule %s (%s)')% (rule.name, rule.code)) elif rule.amount_select == 'percentage': try: - amount = rule.amount_percentage * eval(rule.amount_percentage_base, localdict) / 100 - return amount, eval(rule.quantity, localdict) + return eval(rule.amount_percentage_base, localdict), eval(rule.quantity, localdict), rule.amount_percentage except: raise osv.except_osv(_('Error'), _('Wrong percentage base or quantity defined for salary rule %s (%s)')% (rule.name, rule.code)) else: try: eval(rule.amount_python_compute, localdict, mode='exec', nocopy=True) - return localdict['result'], 'result_qty' in localdict and localdict['result_qty'] or 1.0 + return localdict['result'], 'result_qty' in localdict and localdict['result_qty'] or 1.0, 'result_rate' in localdict and localdict['result_rate'] or 100.0 except: raise osv.except_osv(_('Error'), _('Wrong python code defined for salary rule %s (%s) ')% (rule.name, rule.code)) @@ -923,7 +925,7 @@ class hr_payslip_line(osv.osv): if not ids: return {} res = {} for line in self.browse(cr, uid, ids, context=context): - res[line.id] = float(line.quantity) * line.amount + res[line.id] = float(line.quantity) * line.amount * line.rate / 100 return res _columns = { @@ -931,6 +933,7 @@ class hr_payslip_line(osv.osv): 'salary_rule_id':fields.many2one('hr.salary.rule', 'Rule', required=True), 'employee_id':fields.many2one('hr.employee', 'Employee', required=True), 'contract_id':fields.many2one('hr.contract', 'Contract', required=True, select=True), + 'rate': fields.float('Rate (%)', digits_compute=dp.get_precision('Payroll Rate')), 'amount': fields.float('Amount', digits_compute=dp.get_precision('Payroll')), 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Payroll')), 'total': fields.function(_calculate_total, method=True, type='float', string='Total', digits_compute=dp.get_precision('Payroll'),store=True ), @@ -938,6 +941,7 @@ class hr_payslip_line(osv.osv): _defaults = { 'quantity': 1.0, + 'rate': 100.0, } hr_payslip_line() diff --git a/addons/hr_payroll/hr_payroll_data.xml b/addons/hr_payroll/hr_payroll_data.xml index c752a2ca3a4..227fa2e9013 100644 --- a/addons/hr_payroll/hr_payroll_data.xml +++ b/addons/hr_payroll/hr_payroll_data.xml @@ -79,5 +79,11 @@ 2 + + Payroll Rate + 4 + + + diff --git a/addons/hr_payroll/hr_payroll_view.xml b/addons/hr_payroll/hr_payroll_view.xml index 5f2e977f116..2cf7cb8c4c4 100644 --- a/addons/hr_payroll/hr_payroll_view.xml +++ b/addons/hr_payroll/hr_payroll_view.xml @@ -169,7 +169,8 @@ - + + @@ -319,7 +320,8 @@ - + + @@ -329,7 +331,8 @@ - + + diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 47df7350838..60ce7b7bc0c 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -22,10 +22,6 @@ import time from datetime import datetime from dateutil.relativedelta import relativedelta -import PIL -import io -import base64 -import StringIO import netsvc from osv import fields, osv @@ -282,7 +278,7 @@ class pos_order(osv.osv): ('user_id', '=', uid), ('state', '=', 'open')], context=context) if len(statement_id) == 0: - raise osv.except_osv(_('Error !'), _('You have to open at least one cashbox.')) + raise osv.except_osv(_('Error !'), _('You have to open at least one cashbox')) if statement_id: statement_id = statement_id[0] args['statement_id'] = statement_id @@ -731,40 +727,11 @@ class pos_category(osv.osv): } pos_category() -_IMAGE_SIZE = 100,120 - class product_product(osv.osv): _inherit = 'product.product' - - def _get_img(self, cr, uid, ids, field_name, arg, context=None): - context = context or {} - bin_size = context.get('bin_size', False) - context = dict(context, bin_size = False) - products = self.browse(cr, uid, ids, context=context) - result = {} - for product in products: - image64 = product.product_image - if not image64: - result[product.id] = False - continue - image_bin = base64.decodestring(image64) - image_stream = io.BytesIO(image_bin) - im = PIL.Image.open(image_stream) - im.thumbnail(_IMAGE_SIZE, PIL.Image.ANTIALIAS) - nimage_stream = StringIO.StringIO() - im.save(nimage_stream, format="JPEG") - nimage_bin = nimage_stream.getvalue() - if not bin_size: - result[product.id] = base64.encodestring(nimage_bin) - else: - result[product.id] = nimage_bin.length - return result - _columns = { 'income_pdt': fields.boolean('PoS Cash Input', help="This is a product you can use to put cash into a statement for the point of sale backend."), 'expense_pdt': fields.boolean('PoS Cash Output', help="This is a product you can use to take cash from a statement for the point of sale backend, exemple: money lost, transfer to bank, etc."), - 'img': fields.function(_get_img, method=True, type="binary", string='Product Image', - store = {'product.product': (lambda self, cr, uid, ids, c=None: ids, ['product_image'], 10)}), 'pos_categ_id': fields.many2one('pos.category','PoS Category', help="If you want to sell this product through the point of sale, select the category it belongs to.") } diff --git a/addons/point_of_sale/static/src/js/pos.js b/addons/point_of_sale/static/src/js/pos.js index 371c2c28ca9..1839b3efeba 100644 --- a/addons/point_of_sale/static/src/js/pos.js +++ b/addons/point_of_sale/static/src/js/pos.js @@ -86,7 +86,7 @@ openerp.point_of_sale = function(db) { }, this)); }, this)); $.when(this.fetch('pos.category', ['name', 'parent_id', 'child_id']), - this.fetch('product.product', ['name', 'list_price', 'pos_categ_id', 'taxes_id', 'img'], [['pos_categ_id', '!=', 'false']]), + this.fetch('product.product', ['name', 'list_price', 'pos_categ_id', 'taxes_id', 'product_image'], [['pos_categ_id', '!=', 'false']]), this.fetch('account.bank.statement', ['account_id', 'currency', 'journal_id', 'state', 'name'], [['state', '=', 'open'], ['user_id', '=', this.session.uid]]), this.fetch('account.journal', ['auto_cash', 'check_dtls', 'currency', 'name', 'type']), @@ -591,7 +591,7 @@ openerp.point_of_sale = function(db) { }, clickAppendNewChar: function(event) { var newChar; - newChar = event.currentTarget.innerText; + newChar = event.currentTarget.innerText || event.currentTarget.textContent; return this.state.appendNewChar(newChar); }, clickChangeMode: function(event) { diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml index 664295d8ca5..4728e72d825 100644 --- a/addons/point_of_sale/static/src/xml/pos.xml +++ b/addons/point_of_sale/static/src/xml/pos.xml @@ -188,7 +188,7 @@
- + diff --git a/addons/portal/portal.py b/addons/portal/portal.py index de39944e69f..4a96df1a65f 100644 --- a/addons/portal/portal.py +++ b/addons/portal/portal.py @@ -98,6 +98,7 @@ class portal(osv.osv): def do_create_menu(self, cr, uid, ids, context=None): """ create a parent menu for the given portals """ menu_obj = self.pool.get('ir.ui.menu') + ir_data = self.pool.get('ir.model.data') menu_root = self._res_xml_id(cr, uid, 'portal', 'portal_menu') for p in self.browse(cr, uid, ids, context): @@ -110,7 +111,13 @@ class portal(osv.osv): menu_id = menu_obj.create(cr, uid, menu_values, context) # set the parent_menu_id to item_id self.write(cr, uid, [p.id], {'parent_menu_id': menu_id}, context) - + menu_values.pop('parent_id') + menu_values.pop('groups_id') + menu_values.update({'model': 'ir.ui.menu', + 'module': 'portal', + 'res_id': menu_id, + 'noupdate': 'True'}) + data_id = ir_data.create(cr, uid, menu_values, context) return True def _assign_menu(self, cr, uid, ids, context=None): diff --git a/addons/product/__openerp__.py b/addons/product/__openerp__.py index 93fcf0dc08f..08860523d48 100644 --- a/addons/product/__openerp__.py +++ b/addons/product/__openerp__.py @@ -66,8 +66,6 @@ Print product labels with barcode. 'test/product_uom.yml', 'test/product_pricelist.yml', ], - - 'installable': True, 'active': False, 'certificate': '0068861431437', diff --git a/addons/product/test/product_pricelist.yml b/addons/product/test/product_pricelist.yml index 4e04dd382fc..caa27d353e4 100644 --- a/addons/product/test/product_pricelist.yml +++ b/addons/product/test/product_pricelist.yml @@ -72,4 +72,3 @@ 'price_list':ref('customer_pricelist')} from tools import test_reports test_reports.try_report_action(cr, uid, 'action_product_price_list',wiz_data=data_dict, context=ctx, our_module='product') - diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 8c45097e7ee..2ba44fb6e97 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -709,7 +709,7 @@ - + @@ -902,7 +902,7 @@ - + @@ -1123,7 +1123,7 @@ - + diff --git a/addons/wiki_sale_faq/wiki_sale_faq_view.xml b/addons/wiki_sale_faq/wiki_sale_faq_view.xml index 82cfb6a43be..9fdaafd96b9 100644 --- a/addons/wiki_sale_faq/wiki_sale_faq_view.xml +++ b/addons/wiki_sale_faq/wiki_sale_faq_view.xml @@ -12,7 +12,7 @@ ir.actions.act_window ir.attachment form - + Documents give you access to all files attached to any record. It is a repository of all documents such as emails, project-related attachments or any other documents. From this view, you can search through the content of the documents. OpenERP automatically assign meta data based on the record like the related partner and indexes the content of .DOC, .ODT, .TXT, .SXW and .PDF documents.