diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 522e9d97251..27881bf1280 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -286,6 +286,9 @@ class account_invoice(osv.osv): 'internal_number': False, 'user_id': lambda s, cr, u, c: u, } + _sql_constraints = [ + ('number_uniq', 'unique(number, company_id)', 'Invoice Number must be unique per Company!'), + ] def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False): journal_obj = self.pool.get('account.journal') diff --git a/addons/account_followup/account_followup.py b/addons/account_followup/account_followup.py index 8bc364ad306..a81535ad70c 100644 --- a/addons/account_followup/account_followup.py +++ b/addons/account_followup/account_followup.py @@ -28,7 +28,7 @@ class followup(osv.osv): 'name': fields.char('Name', size=64, required=True), 'description': fields.text('Description'), 'followup_line': fields.one2many('account_followup.followup.line', 'followup_id', 'Follow-Up'), - 'company_id': fields.many2one('res.company', 'Company'), + 'company_id': fields.many2one('res.company', 'Company', required=True), } _defaults = { 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'account_followup.followup', context=c), diff --git a/addons/account_followup/report/account_followup_print.py b/addons/account_followup/report/account_followup_print.py index 1d471d00ec2..f2cf476e674 100644 --- a/addons/account_followup/report/account_followup_print.py +++ b/addons/account_followup/report/account_followup_print.py @@ -35,45 +35,44 @@ class report_rappel(report_sxw.rml_parse): 'get_text': self._get_text }) - def _ids_to_objects(self, partner_ids): + def _ids_to_objects(self, ids): pool = pooler.get_pool(self.cr.dbname) - all_partners = [] - for partner in pool.get('res.partner').browse(self.cr, self.uid, partner_ids): - if partner not in all_partners: - all_partners.append(partner) - return all_partners + all_lines = [] + for line in pool.get('account_followup.stat.by.partner').browse(self.cr, self.uid, ids): + if line not in all_lines: + all_lines.append(line) + return all_lines - def _adr_get(self, partner, type): + def _adr_get(self, stat_line, type): res_partner = pooler.get_pool(self.cr.dbname).get('res.partner') res_partner_address = pooler.get_pool(self.cr.dbname).get('res.partner.address') - adr = res_partner.address_get(self.cr, self.uid, [partner.id], [type])[type] + adr = res_partner.address_get(self.cr, self.uid, [stat_line.partner_id.id], [type])[type] return adr and res_partner_address.read(self.cr, self.uid, [adr]) or [{}] - def _lines_get(self, partner): + def _lines_get(self, stat_by_partner_line): pool = pooler.get_pool(self.cr.dbname) moveline_obj = pool.get('account.move.line') company_obj = pool.get('res.company') obj_currency = pool.get('res.currency') - #FIXME: search on company accounting entries only movelines = moveline_obj.search(self.cr, self.uid, - [('partner_id', '=', partner.id), + [('partner_id', '=', stat_by_partner_line.partner_id.id), ('account_id.type', '=', 'receivable'), - ('reconcile_id', '=', False), ('state', '<>', 'draft')]) + ('reconcile_id', '=', False), ('state', '<>', 'draft'),('company_id','=', stat_by_partner_line.company_id.id)]) movelines = moveline_obj.browse(self.cr, self.uid, movelines) base_currency = movelines[0].company_id.currency_id final_res = [] line_cur = {base_currency.id: {'line': []}} for line in movelines: - if line.currency_id and (not line.currency_id.id in line_cur): - line_cur[line.currency_id.id] = {'line': []} - currency = line.currency_id or line.company_id.currency_id + if line.account_id.currency_id and (not line.account_id.currency_id.id in line_cur): + line_cur[line.account_id.currency_id.id] = {'line': []} + currency = line.account_id.currency_id or line.company_id.currency_id line_data = { 'name': line.move_id.name, 'ref': line.ref, 'date':line.date, 'date_maturity': line.date_maturity, - 'balance': line.currency_id and line.amount_currency or (line.debit - line.credit), + 'balance': currency.id <> line.company_id.currency_id.id and line.amount_currency or (line.debit - line.credit), 'blocked': line.blocked, 'currency_id': currency.symbol or currency.name, } @@ -85,7 +84,7 @@ class report_rappel(report_sxw.rml_parse): return final_res - def _get_text(self, partner, followup_id, context=None): + def _get_text(self, stat_line, followup_id, context=None): if context is None: context = {} fp_obj = pooler.get_pool(self.cr.dbname).get('account_followup.followup') @@ -96,10 +95,10 @@ class report_rappel(report_sxw.rml_parse): li_delay.sort(reverse=True) text = "" a = {} - partner_line = pooler.get_pool(self.cr.dbname).get('account.move.line').search(self.cr, self.uid, [('partner_id','=',partner.id),('reconcile_id','=',False)]) + partner_line_ids = pooler.get_pool(self.cr.dbname).get('account.move.line').search(self.cr, self.uid, [('partner_id','=',stat_line.partner_id.id),('reconcile_id','=',False),('company_id','=',stat_line.company_id.id)]) partner_delay = [] - context.update({'lang': partner.lang}) - for i in pooler.get_pool(self.cr.dbname).get('account.move.line').browse(self.cr, self.uid, partner_line, context): + context.update({'lang': stat_line.partner_id.lang}) + for i in pooler.get_pool(self.cr.dbname).get('account.move.line').browse(self.cr, self.uid, partner_line_ids, context): for delay in li_delay: if i.followup_line_id and str(i.followup_line_id.delay)==str(delay): text = i.followup_line_id.description @@ -108,16 +107,16 @@ class report_rappel(report_sxw.rml_parse): text = partner_delay and a[max(partner_delay)] or '' if text: text = text % { - 'partner_name': partner.name, + 'partner_name': stat_line.partner_id.name, 'date': time.strftime('%Y-%m-%d'), - 'company_name': fp_obj.browse(self.cr, self.uid, followup_id).company_id.name, + 'company_name': stat_line.company_id.name, 'user_signature': pooler.get_pool(self.cr.dbname).get('res.users').browse(self.cr, self.uid, self.uid, context).signature or '', } return text report_sxw.report_sxw('report.account_followup.followup.print', - 'res.partner', 'addons/account_followup/report/account_followup_print.rml', + 'account_followup.stat.by.partner', 'addons/account_followup/report/account_followup_print.rml', parser=report_rappel) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_followup/report/account_followup_print.rml b/addons/account_followup/report/account_followup_print.rml index 812f0aa0e50..92eda92e9ee 100644 --- a/addons/account_followup/report/account_followup_print.rml +++ b/addons/account_followup/report/account_followup_print.rml @@ -124,7 +124,7 @@ [[ repeatIn(ids_to_objects(data['form']['partner_ids']),'o') ]] - [[ setLang(o.lang) ]] + [[ setLang(o.partner_id.lang) ]] @@ -132,7 +132,7 @@ [[ repeatIn(adr_get(o,'invoice'),'a' )]] - [[ o.name or '' ]] + [[ o.partner_id.name or '' ]] [[ a['street'] or '']] [[ a['street2'] or removeParentNode('para') ]] [[ a['zip'] or '' ]] [[ a['city'] or '' ]] @@ -141,7 +141,7 @@ - VAT: [[ o.vat or removeParentNode('para') ]] + VAT: [[ o.partner_id.vat or removeParentNode('para') ]] @@ -150,7 +150,7 @@ Document : Customer account statement Date : [[ formatLang(data['form']['date'],date=True) ]] - Customer Ref : [[ o.ref or '' ]] + Customer Ref : [[ o.partner_id.ref or '' ]] diff --git a/addons/account_followup/report/account_followup_report.py b/addons/account_followup/report/account_followup_report.py index 25fc37691f4..c2a842cfd4c 100644 --- a/addons/account_followup/report/account_followup_report.py +++ b/addons/account_followup/report/account_followup_report.py @@ -68,7 +68,7 @@ class account_followup_stat(osv.osv): cr.execute(""" create or replace view account_followup_stat as ( SELECT - l.partner_id as id, + l.id as id, l.partner_id AS partner_id, min(l.date) AS date_move, max(l.date) AS date_move_last, diff --git a/addons/account_followup/test/account_followup.yml b/addons/account_followup/test/account_followup.yml index b43ca32d200..2650a40a7ad 100644 --- a/addons/account_followup/test/account_followup.yml +++ b/addons/account_followup/test/account_followup.yml @@ -105,4 +105,5 @@ self.do_print(cr, uid, [ref("account_followup_print_all_0")], {"lang": 'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("account_followup.account_followup_print_menu")], "tz": False, "date": time.strftime('%Y-%m-%d'), "followup_id": ref("account_followup_followup_testfollowups0"), "active_id": ref("account_followup.account_followup_print_menu"), + "company_id": ref('base.main_company'), }) diff --git a/addons/account_followup/wizard/account_followup_print.py b/addons/account_followup/wizard/account_followup_print.py index 3fe404134ae..ea1083f26ff 100644 --- a/addons/account_followup/wizard/account_followup_print.py +++ b/addons/account_followup/wizard/account_followup_print.py @@ -31,7 +31,7 @@ class account_followup_print(osv.osv_memory): _description = 'Print Followup & Send Mail to Customers' _columns = { 'date': fields.date('Follow-up Sending Date', required=True, help="This field allow you to select a forecast date to plan your follow-ups"), - 'followup_id': fields.many2one('account_followup.followup', 'Follow-up', required=True) + 'followup_id': fields.many2one('account_followup.followup', 'Follow-up', required=True), } def _get_followup(self, cr, uid, context=None): @@ -51,7 +51,7 @@ class account_followup_print(osv.osv_memory): data = self.browse(cr, uid, ids, context=context)[0] model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_account_followup_print_all')], context=context) resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] - context.update({'followup_id': data.followup_id.id, 'date':data.date}) + context.update({'followup_id': data.followup_id.id, 'date': data.date, 'company_id': data.followup_id.company_id.id}) return { 'name': _('Select Partners'), 'view_type': 'form', @@ -87,10 +87,13 @@ class account_followup_stat_by_partner(osv.osv): def init(self, cr): tools.drop_view_if_exists(cr, 'account_followup_stat_by_partner') + # Here we don't have other choice but to create a virtual ID based on the concatenation + # of the partner_id and the company_id. An assumption that the number of companies will + # not reach 10 000 records is made, what should be enough for a time. cr.execute(""" create or replace view account_followup_stat_by_partner as ( SELECT - l.partner_id AS id, + l.partner_id * 10000 + l.company_id as id, l.partner_id AS partner_id, min(l.date) AS date_move, max(l.date) AS date_move_last, @@ -148,6 +151,8 @@ class account_followup_print_all(osv.osv_memory): context = {} if ids: data = self.browse(cr, uid, ids, context=context)[0] + company_id = 'company_id' in context and context['company_id'] or data.company_id.id + cr.execute( "SELECT l.partner_id, l.followup_line_id,l.date_maturity, l.date, l.id "\ "FROM account_move_line AS l "\ @@ -159,7 +164,8 @@ class account_followup_print_all(osv.osv_memory): "AND (l.partner_id is NOT NULL) "\ "AND (a.active) "\ "AND (l.debit > 0) "\ - "ORDER BY l.date") + "AND (l.company_id = %s) "\ + "ORDER BY l.date", (company_id,)) move_lines = cr.fetchall() old = None fups = {} @@ -189,16 +195,16 @@ class account_followup_print_all(osv.osv_memory): continue if followup_line_id not in fups: continue + stat_line_id = partner_id * 10000 + company_id if date_maturity: if date_maturity <= fups[followup_line_id][0].strftime('%Y-%m-%d'): if partner_id not in partner_list: - partner_list.append(partner_id) + partner_list.append(stat_line_id) to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': partner_id} elif date and date <= fups[followup_line_id][0].strftime('%Y-%m-%d'): if partner_id not in partner_list: - partner_list.append(partner_id) - to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': partner_id} - + partner_list.append(stat_line_id) + to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': stat_line_id} return {'partner_ids': partner_list, 'to_update': to_update} def do_mail(self ,cr, uid, ids, context=None): @@ -225,7 +231,7 @@ class account_followup_print_all(osv.osv_memory): partners.append(line.partner_id) dict_lines[line.partner_id.id] =line for partner in partners: - ids_lines = move_obj.search(cr,uid,[('partner_id','=',partner.id),('reconcile_id','=',False),('account_id.type','in',['receivable'])]) + ids_lines = move_obj.search(cr,uid,[('partner_id','=',partner.id),('reconcile_id','=',False),('account_id.type','in',['receivable']),('company_id','=',context.get('company_id', False))]) data_lines = move_obj.browse(cr, uid, ids_lines, context=context) followup_data = dict_lines[partner.id] dest = False diff --git a/addons/account_followup/wizard/account_followup_print_view.xml b/addons/account_followup/wizard/account_followup_print_view.xml index 9d74060b19a..ce178d9fa24 100644 --- a/addons/account_followup/wizard/account_followup_print_view.xml +++ b/addons/account_followup/wizard/account_followup_print_view.xml @@ -13,7 +13,6 @@ - @@ -81,7 +80,7 @@ - + @@ -137,7 +136,5 @@ form new - - diff --git a/addons/account_voucher/test/account_voucher.yml b/addons/account_voucher/test/account_voucher.yml index ce34733dda7..33ae609e3f3 100644 --- a/addons/account_voucher/test/account_voucher.yml +++ b/addons/account_voucher/test/account_voucher.yml @@ -48,7 +48,7 @@ - Now I create a Vendor Voucher - - !record {model: account.voucher, id: account_voucher_voucheraxelor0}: + !record {model: account.voucher, id: account_voucher_voucheraxelor0, view: False}: account_id: account.cash amount: 1000.0 company_id: base.main_company diff --git a/addons/edi/__init__.py b/addons/edi/__init__.py index 3aa7f74ebd7..f0f96a936ec 100644 --- a/addons/edi/__init__.py +++ b/addons/edi/__init__.py @@ -18,10 +18,17 @@ # along with this program. If not, see . # ############################################################################## +import logging import models import edi_service from models.edi import EDIMixin, edi_document # web -import controllers \ No newline at end of file +try: + import controllers +except ImportError: + logging.getLogger('init.load').warn( + """Could not load openerp-web section of EDI, EDI will not behave correctly + +To fix, launch openerp-web in embedded mode""") diff --git a/addons/edi/static/src/js/edi.js b/addons/edi/static/src/js/edi.js index 7eb118baeb3..9397c1cf280 100644 --- a/addons/edi/static/src/js/edi.js +++ b/addons/edi/static/src/js/edi.js @@ -1,5 +1,4 @@ openerp.edi = function(openerp) { -openerp.web.qweb.add_template("/web/static/src/xml/base.xml"); openerp.web.qweb.add_template("/edi/static/src/xml/edi.xml"); openerp.web.qweb.add_template("/edi/static/src/xml/edi_account.xml"); openerp.web.qweb.add_template("/edi/static/src/xml/edi_sale_purchase.xml"); diff --git a/addons/hr_payroll_account/hr_payroll_account.py b/addons/hr_payroll_account/hr_payroll_account.py index 684289c9737..3463713d37d 100644 --- a/addons/hr_payroll_account/hr_payroll_account.py +++ b/addons/hr_payroll_account/hr_payroll_account.py @@ -39,7 +39,13 @@ class hr_payslip(osv.osv): 'journal_id': fields.many2one('account.journal', 'Expense Journal',states={'draft': [('readonly', False)]}, readonly=True, required=True), 'move_id': fields.many2one('account.move', 'Accounting Entry', readonly=True), } - + + def copy(self, cr, uid, id, default=None, context=None): + if default is None: + default = {} + default['move_id'] = False + return super(hr_payslip, self).copy(cr, uid, id, default, context=context) + def create(self, cr, uid, vals, context=None): if context is None: context = {} @@ -95,9 +101,9 @@ class hr_payslip(osv.osv): partner_id = False debit_account_id = line.salary_rule_id.account_debit.id credit_account_id = line.salary_rule_id.account_credit.id - + if debit_account_id: - + debit_line = (0, 0, { 'name': line.name, 'date': timenow, @@ -113,9 +119,9 @@ class hr_payslip(osv.osv): }) line_ids.append(debit_line) debit_sum += debit_line[2]['debit'] - debit_line[2]['credit'] - + if credit_account_id: - + credit_line = (0, 0, { 'name': line.name, 'date': timenow, @@ -147,7 +153,7 @@ class hr_payslip(osv.osv): 'credit': debit_sum - credit_sum, }) line_ids.append(adjust_credit) - + elif debit_sum < credit_sum: acc_id = slip.journal_id.default_debit_account_id.id if not acc_id: diff --git a/addons/hr_recruitment/__openerp__.py b/addons/hr_recruitment/__openerp__.py index b728609c53d..4797ef14044 100644 --- a/addons/hr_recruitment/__openerp__.py +++ b/addons/hr_recruitment/__openerp__.py @@ -54,7 +54,7 @@ system to store and search in your CV base. 'hr_recruitment_data.xml' ], 'demo_xml': [ - 'hr_recruitment_demo.xml', + 'hr_recruitment_demo.yml', ], 'test':['test/test_hr_recruitment.yml'], 'installable': True, diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 931600fef9f..34a91c0f3f5 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -440,7 +440,18 @@ class hr_applicant(crm.crm_case, osv.osv): }) else: raise osv.except_osv(_('Warning!'),_('You must define Applied Job for Applicant !')) - return self.case_close(cr, uid, ids, *args) + self.case_close(cr, uid, ids, *args) + + mod_obj = self.pool.get('ir.model.data') + act = mod_obj.get_object_reference(cr, uid, 'hr', 'open_view_employee_list') + + act_obj = self.pool.get('ir.actions.act_window') + act_win = act_obj.read(cr, uid, act[1], []) + + act_win['domain'] = [('id','=',emp_id)] + act_win['view_mode'] = 'form,tree' + act_win['res_id'] = emp_id + return act_win def case_reset(self, cr, uid, ids, *args): """Resets case as draft diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml index e1172f0b075..d6cb5952d38 100644 --- a/addons/hr_recruitment/hr_recruitment_data.xml +++ b/addons/hr_recruitment/hr_recruitment_data.xml @@ -19,19 +19,6 @@ - - - - - Salesman - - - - - Junior Developer - - - diff --git a/addons/hr_recruitment/hr_recruitment_demo.xml b/addons/hr_recruitment/hr_recruitment_demo.xml deleted file mode 100644 index 0fc2c94f034..00000000000 --- a/addons/hr_recruitment/hr_recruitment_demo.xml +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/addons/hr_recruitment/hr_recruitment_demo.yml b/addons/hr_recruitment/hr_recruitment_demo.yml new file mode 100644 index 00000000000..bcf2248fc40 --- /dev/null +++ b/addons/hr_recruitment/hr_recruitment_demo.yml @@ -0,0 +1,109 @@ +- + !record {model: hr.applicant, id: hr_case_salesman0}: + date: !eval time.strftime('%Y-%m-01 10:35:50') + type_id: degree_graduate + priority: '2' + partner_name: 'Enrique Jones' + partner_mobile: '9963214587' + job_id: hr.job_jr_appli + stage_id: stage_job1 + name: 'Salesman' + partner_phone: '1236547890' + +- + !record {model: hr.applicant, id: hr_case_traineemca0}: + partner_address_id: base.res_partner_address_14 + date: !eval time.strftime('%Y-%m-10 18:15:00') + type_id: degree_bac5 + priority: '3' + user_id: base.user_demo + partner_name: 'Marie Justine' + state: 'open' + partner_mobile: '9988774455' + job_id: hr.job_jr_appli + stage_id: stage_job4 + name: 'Trainee - MCA' + partner_phone: '6633225' +- + !record {model: hr.applicant, id: hr_case_fresher0}: + date: !eval time.strftime('%Y-%m-15 16:10:00') + type_id: degree_licenced + priority: '1' + user_id: base.user_root + partner_name: 'Jose' + job_id: hr.job_jr_appli + stage_id: stage_job3 + name: 'Fresher' + partner_phone: '999666735' +- + !record {model: hr.applicant, id: hr_case_yrsexperienceinphp0}: + date: !eval time.strftime('%Y-%m-25 16:25:52') + job_id: hr.job_jr_appli + type_id: degree_bac5 + user_id: base.user_root + partner_name: 'Sandra Elvis' + state: 'cancel' + stage_id: stage_job6 + name: 'More than 5 yrs Experience in PHP' +- + !record {model: hr.applicant, id: hr_case_marketingjob0}: + date: !eval time.strftime('%Y-%m-26 17:15:32') + type_id: degree_licenced + user_id: base.user_demo + partner_name: 'John Bruno' + state: 'done' + job_id: hr.job_jr_appli + stage_id: stage_job5 + name: 'Marketing Job' +- + !record {model: hr.applicant, id: hr_case_financejob0}: + date: !eval time.strftime('%Y-%m-26 17:39:42') + type_id: degree_licenced + priority: '4' + partner_name: 'David Armstrong' + state: 'pending' + state: open + partner_mobile: '9966332214' + job_id: hr.job_jr_appli + stage_id: stage_job2 + name: 'Finance Job' + partner_phone: '33968745' +- + !record {model: hr.applicant, id: hr_case_traineemca1}: + partner_address_id: base.res_partner_address_14 + date: !eval time.strftime('%Y-%m-12 17:49:19') + type_id: degree_bac5 + partner_name: 'Tina Augustie' + state: 'open' + partner_mobile: '9898745745' + job_id: hr.job_jr_appli + stage_id: stage_job4 + name: 'Trainee - MCA' + partner_phone: '6630125' + +- + !record {model: hr.applicant, id: hr_case_programmer}: + partner_address_id: base.res_partner_address_14 + date: !eval time.strftime('%Y-%m-12 17:49:19') + type_id: degree_bac5 + partner_name: 'Shane Williams' + state: 'open' + partner_mobile: '9812398524' + stage_id: stage_job4 + name: 'Programmer' + partner_phone: '6630125' + job_id: hr.job_jr_appli + department_id: hr.dep_it + salary_expected: 11000.0 + +- + !record {model: hr.applicant, id: hr_case_advertisement}: + date: !eval time.strftime('%Y-%m-26 17:39:42') + type_id: degree_licenced + partner_id: base.res_partner_11 + partner_name: 'David Armstrong' + job_id: hr.job_jr_appli + stage_id: stage_job2 + name: 'Advertisement' + salary_expected: 11000.0 + diff --git a/addons/hr_recruitment/wizard/hr_recruitment_employee_hired.py b/addons/hr_recruitment/wizard/hr_recruitment_employee_hired.py index d11a1f16775..291c16a7644 100644 --- a/addons/hr_recruitment/wizard/hr_recruitment_employee_hired.py +++ b/addons/hr_recruitment/wizard/hr_recruitment_employee_hired.py @@ -48,8 +48,7 @@ class hired_employee(osv.osv_memory): """ if context is None: context = {} - self.pool.get('hr.applicant').case_close_with_emp(cr, uid,context.get('active_ids', [])) - return {} + return self.pool.get('hr.applicant').case_close_with_emp(cr, uid,context.get('active_ids', [])) hired_employee() diff --git a/addons/hr_timesheet/hr_timesheet_data.xml b/addons/hr_timesheet/hr_timesheet_data.xml index 5dc95cf9ddc..e9aa56d4646 100644 --- a/addons/hr_timesheet/hr_timesheet_data.xml +++ b/addons/hr_timesheet/hr_timesheet_data.xml @@ -2,9 +2,6 @@ - - - TS @@ -12,5 +9,10 @@ general + + + + + diff --git a/addons/l10n_ch/__openerp__.py b/addons/l10n_ch/__openerp__.py index 1c6bb5688d7..cabd15e42de 100644 --- a/addons/l10n_ch/__openerp__.py +++ b/addons/l10n_ch/__openerp__.py @@ -63,7 +63,7 @@ TODO : """, "version" : "6.1", "author" : "Camptocamp", - "category" : "Finance", + 'category': 'Localization/Account Charts', "website": "http://www.camptocamp.com", "depends" : [ diff --git a/addons/l10n_th/i18n/th.po b/addons/l10n_th/i18n/th.po index 99c7d628c4d..d9b675d399b 100644 --- a/addons/l10n_th/i18n/th.po +++ b/addons/l10n_th/i18n/th.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-11-17 05:22+0000\n" -"X-Generator: Launchpad (build 14291)\n" +"X-Launchpad-Export-Date: 2011-11-18 05:13+0000\n" +"X-Generator: Launchpad (build 14299)\n" #. module: l10n_th #: model:ir.actions.todo,note:l10n_th.config_call_account_template_th diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 0fd75d7ca7a..356a762c0c5 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -491,6 +491,9 @@ class mrp_production(osv.osv): 'name': lambda x, y, z, c: x.pool.get('ir.sequence').get(y, z, 'mrp.production') or '/', 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.production', context=c), } + _sql_constraints = [ + ('name_uniq', 'unique(name, company_id)', 'Reference must be unique per Company!'), + ] _order = 'priority desc, date_planned asc'; def _check_qty(self, cr, uid, ids, context=None): diff --git a/addons/mrp/test/mrp_phantom_bom.yml b/addons/mrp/test/mrp_phantom_bom.yml index 41f1920dc2d..ca29b24ea23 100644 --- a/addons/mrp/test/mrp_phantom_bom.yml +++ b/addons/mrp/test/mrp_phantom_bom.yml @@ -179,11 +179,9 @@ - !record {model: mrp.production, id: mrp_production_mo0}: bom_id: mrp.mrp_bom_orangejuice0 - company_id: base.main_company date_planned: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S") location_dest_id: stock.stock_location_output location_src_id: stock.stock_location_stock - name: MO/00002 product_id: mrp.product_product_orangejuice0 product_lines: - name: Orange diff --git a/addons/mrp_subproduct/test/mrp_subproduct.yml b/addons/mrp_subproduct/test/mrp_subproduct.yml index 43bb6e7247e..2d05a448cde 100644 --- a/addons/mrp_subproduct/test/mrp_subproduct.yml +++ b/addons/mrp_subproduct/test/mrp_subproduct.yml @@ -106,14 +106,11 @@ - !record {model: mrp.production, id: mrp_production_mo0}: bom_id: mrp_bom_woodenchair0 - company_id: base.main_company date_planned: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S") location_dest_id: stock.stock_location_stock location_src_id: stock.stock_location_stock - name: MO/00004 product_id: product_product_woodenchair0 product_qty: 10.0 - product_uom: product.product_uom_unit product_uos_qty: 0.0 - I compute the data of production order. diff --git a/addons/point_of_sale/test/01_order_to_payment.yml b/addons/point_of_sale/test/01_order_to_payment.yml index fd8ffbaa3e0..7c6b4817666 100644 --- a/addons/point_of_sale/test/01_order_to_payment.yml +++ b/addons/point_of_sale/test/01_order_to_payment.yml @@ -74,7 +74,7 @@ - I click on the "Make Payment" wizard to pay the PoS order with a partial amount of 100.0 EUR - - !record {model: pos.make.payment, id: pos_make_payment_0, context: {'active_id': ref('pos_order_pos0'), 'active_ids': [ref('pos_order_pos0')]} }: + !record {model: pos.make.payment, id: pos_make_payment_0, context: '{"active_id": ref("pos_order_pos0"), "active_ids": [ref("pos_order_pos0")]}' }: amount: 100.0 - I click on the validate button to register the payment. @@ -95,7 +95,7 @@ - I pay the remaining balance. - - !record {model: pos.make.payment, id: pos_make_payment_1, context: {'active_id': [ref('pos_order_pos0')], 'active_ids': [ref('pos_order_pos0')]} }: + !record {model: pos.make.payment, id: pos_make_payment_1, context: '{"active_id": ref("pos_order_pos0"), "active_ids": [ref("pos_order_pos0")]}' }: amount: !eval > (450*2 + 300*3*1.05)*0.95-100.0 - diff --git a/addons/point_of_sale/test/02_order_to_invoice.yml b/addons/point_of_sale/test/02_order_to_invoice.yml index 3436e176678..0de4e518ebd 100644 --- a/addons/point_of_sale/test/02_order_to_invoice.yml +++ b/addons/point_of_sale/test/02_order_to_invoice.yml @@ -18,7 +18,7 @@ - I click on the "Make Payment" wizard to pay the PoS order - - !record {model: pos.make.payment, id: pos_make_payment_2, context: {'active_id': ref('pos_order_pos1'), 'active_ids': [ref('pos_order_pos1')]} }: + !record {model: pos.make.payment, id: pos_make_payment_2, context: '{"active_id": ref("pos_order_pos1"), "active_ids": [ref("pos_order_pos1")]}' }: amount: !eval > (450*2 + 300*3*1.05)*0.95 - diff --git a/addons/project/project.py b/addons/project/project.py index 5ab7af9de79..14524a0bd05 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -78,7 +78,7 @@ class project(osv.osv): return {'value':{'contact_id': False}} addr = partner_obj.address_get(cr, uid, [part], ['contact']) val = {'contact_id': addr['contact']} - if pricelist_id in self._columns: + if 'pricelist_id' in self.fields_get(cr, uid, context=context): pricelist = partner_obj.read(cr, uid, part, ['property_product_pricelist'], context=context) pricelist_id = pricelist.get('property_product_pricelist', False) and pricelist.get('property_product_pricelist')[0] or False val['pricelist_id'] = pricelist_id diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index d2154a9630d..0dc015834a0 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -227,7 +227,7 @@ class purchase_order(osv.osv): 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'purchase.order', context=c), } _sql_constraints = [ - ('name_uniq', 'unique(name)', 'Order Reference must be unique !'), + ('name_uniq', 'unique(name, company_id)', 'Order Reference must be unique per Company!'), ] _name = "purchase.order" _description = "Purchase Order" diff --git a/addons/report_designer/i18n/th.po b/addons/report_designer/i18n/th.po new file mode 100644 index 00000000000..1625e20012d --- /dev/null +++ b/addons/report_designer/i18n/th.po @@ -0,0 +1,98 @@ +# Thai translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2011-11-17 07:34+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Thai \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-11-18 05:13+0000\n" +"X-Generator: Launchpad (build 14299)\n" + +#. module: report_designer +#: model:ir.actions.act_window,name:report_designer.action_report_designer_installer +#: view:report_designer.installer:0 +msgid "Reporting Tools Configuration" +msgstr "" + +#. module: report_designer +#: field:report_designer.installer,base_report_creator:0 +msgid "Query Builder" +msgstr "" + +#. module: report_designer +#: view:report_designer.installer:0 +msgid "Configure" +msgstr "" + +#. module: report_designer +#: view:report_designer.installer:0 +msgid "title" +msgstr "" + +#. module: report_designer +#: model:ir.model,name:report_designer.model_report_designer_installer +msgid "report_designer.installer" +msgstr "" + +#. module: report_designer +#: field:report_designer.installer,config_logo:0 +msgid "Image" +msgstr "" + +#. module: report_designer +#: field:report_designer.installer,base_report_designer:0 +msgid "OpenOffice Report Designer" +msgstr "" + +#. module: report_designer +#: model:ir.module.module,shortdesc:report_designer.module_meta_information +msgid "Reporting Tools" +msgstr "" + +#. module: report_designer +#: view:report_designer.installer:0 +msgid "" +"OpenERP's built-in reporting abilities can be improved even further with " +"some of the following applications" +msgstr "" + +#. module: report_designer +#: view:report_designer.installer:0 +msgid "Configure Reporting Tools" +msgstr "" + +#. module: report_designer +#: help:report_designer.installer,base_report_creator:0 +msgid "" +"Allows you to create any statistic reports on several objects. It's a SQL " +"query builder and browser for end users." +msgstr "" + +#. module: report_designer +#: help:report_designer.installer,base_report_designer:0 +msgid "" +"Adds wizards to Import/Export .SXW report which you can modify in " +"OpenOffice.Once you have modified it you can upload the report using the " +"same wizard." +msgstr "" + +#. module: report_designer +#: model:ir.module.module,description:report_designer.module_meta_information +msgid "" +"Installer for reporting tools selection\n" +" " +msgstr "" + +#. module: report_designer +#: field:report_designer.installer,progress:0 +msgid "Configuration Progress" +msgstr "" diff --git a/addons/sale/sale.py b/addons/sale/sale.py index f9c356b7d0c..62f979cb9c9 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -280,7 +280,7 @@ class sale_order(osv.osv): 'partner_shipping_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').address_get(cr, uid, [context['partner_id']], ['delivery'])['delivery'], } _sql_constraints = [ - ('name_uniq', 'unique(name)', 'Order Reference must be unique !'), + ('name_uniq', 'unique(name, company_id)', 'Order Reference must be unique per Company!'), ] _order = 'name desc' diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 34b601a712c..292cd052d5a 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -661,6 +661,9 @@ class stock_picking(osv.osv): 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.picking', context=c) } + _sql_constraints = [ + ('name_uniq', 'unique(name, company_id)', 'Reference must be unique per Company!'), + ] def action_process(self, cr, uid, ids, context=None): if context is None: context = {} @@ -1525,7 +1528,7 @@ class stock_move(osv.osv): return True _columns = { - 'name': fields.char('Name', size=64, required=True, select=True), + 'name': fields.char('Name', size=250, required=True, select=True), 'priority': fields.selection([('0', 'Not urgent'), ('1', 'Urgent')], 'Priority'), 'create_date': fields.datetime('Creation Date', readonly=True, select=True), 'date': fields.datetime('Date', required=True, select=True, help="Move date: scheduled date until move is done, then date of actual move processing", states={'done': [('readonly', True)]}), diff --git a/addons/stock_no_autopicking/test/stock_no_autopicking.yml b/addons/stock_no_autopicking/test/stock_no_autopicking.yml index 99c2db37177..f3620ce655e 100644 --- a/addons/stock_no_autopicking/test/stock_no_autopicking.yml +++ b/addons/stock_no_autopicking/test/stock_no_autopicking.yml @@ -142,11 +142,9 @@ product_uos_qty: 0.0 bom_id: mrp_bom_cupoftea0 routing_id: mrp_routing_productionrouting0 - company_id: base.main_company date_planned: !eval time.strftime('%Y-%m-%d %H:%M:%S') location_dest_id: stock.stock_location_stock location_src_id: stock.stock_location_stock - name: MO/00002 - I compute the data of production order. -