diff --git a/addons/account/report/account_balance.py b/addons/account/report/account_balance.py index f9697710f8f..45d7e107180 100644 --- a/addons/account/report/account_balance.py +++ b/addons/account/report/account_balance.py @@ -84,11 +84,12 @@ class account_balance(report_sxw.rml_parse, common_report_header): } self.sum_debit += account_rec['debit'] self.sum_credit += account_rec['credit'] + acc_digit = self.pool.get('decimal.precision').precision_get(self.cr, 1, 'Account') if disp_acc == 'bal_movement': - if res['credit'] > 0 or res['debit'] > 0 or res['balance'] > 0: + if round(res['credit'], acc_digit) > 0 or round(res['debit'], acc_digit) > 0 or round(res['balance'], acc_digit) != 0: self.result_acc.append(res) elif disp_acc == 'bal_solde': - if res['balance'] != 0: + if round(res['balance'], acc_digit) != 0: self.result_acc.append(res) else: self.result_acc.append(res) diff --git a/addons/account/report/account_balance_sheet.py b/addons/account/report/account_balance_sheet.py index b6f39fbbebd..0c280d2edfd 100644 --- a/addons/account/report/account_balance_sheet.py +++ b/addons/account/report/account_balance_sheet.py @@ -129,15 +129,16 @@ class report_balancesheet_horizontal(report_sxw.rml_parse, common_report_header) 'level': account.level, 'balance':account.balance, } + acc_digit = self.pool.get('decimal.precision').precision_get(self.cr, 1, 'Account') if typ == 'liability' and account.type <> 'view' and (account.debit <> account.credit): self.result_sum_dr += account.balance if typ == 'asset' and account.type <> 'view' and (account.debit <> account.credit): self.result_sum_cr += account.balance if data['form']['display_account'] == 'bal_movement': - if account.credit > 0 or account.debit > 0 or account.balance > 0: + if round(account.credit, acc_digit) > 0 or round(account.debit, acc_digit) > 0 or round(account.balance, acc_digit) != 0: accounts_temp.append(account_dict) elif data['form']['display_account'] == 'bal_solde': - if account.balance != 0: + if round(account.balance, acc_digit) != 0: accounts_temp.append(account_dict) else: accounts_temp.append(account_dict) diff --git a/addons/account/report/account_profit_loss.py b/addons/account/report/account_profit_loss.py index 117f9e351fb..7c8248b8275 100644 --- a/addons/account/report/account_profit_loss.py +++ b/addons/account/report/account_profit_loss.py @@ -99,15 +99,16 @@ class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header): accounts_temp = [] for account in accounts: if (account.user_type.report_type) and (account.user_type.report_type == typ): + acc_digit = self.pool.get('decimal.precision').precision_get(self.cr, 1, 'Account') if typ == 'expense' and account.type <> 'view' and (account.debit <> account.credit): self.result_sum_dr += abs(account.debit - account.credit) if typ == 'income' and account.type <> 'view' and (account.debit <> account.credit): self.result_sum_cr += abs(account.debit - account.credit) if data['form']['display_account'] == 'bal_movement': - if account.credit > 0 or account.debit > 0 or account.balance > 0: + if round(account.credit, acc_digit) > 0 or round(account.debit, acc_digit) > 0 or round(account.balance, acc_digit) != 0: accounts_temp.append(account) elif data['form']['display_account'] == 'bal_solde': - if account.balance != 0: + if round(account.balance, acc_digit) != 0: accounts_temp.append(account) else: accounts_temp.append(account) diff --git a/addons/base_module_doc_rst/base_module_doc_rst_view.xml b/addons/base_module_doc_rst/base_module_doc_rst_view.xml index 9a40bc86df3..2fa4e220d0d 100644 --- a/addons/base_module_doc_rst/base_module_doc_rst_view.xml +++ b/addons/base_module_doc_rst/base_module_doc_rst_view.xml @@ -1,25 +1,25 @@ - + - + - - ir.module.module.form.graph - ir.module.module - - form - - - - - - - - - + + ir.module.module.form.graph + ir.module.module + + form + + + + + + + + + - + diff --git a/addons/base_module_doc_rst/base_module_doc_rst_wizard.xml b/addons/base_module_doc_rst/base_module_doc_rst_wizard.xml index 2912dfed040..338791e29f1 100644 --- a/addons/base_module_doc_rst/base_module_doc_rst_wizard.xml +++ b/addons/base_module_doc_rst/base_module_doc_rst_wizard.xml @@ -2,21 +2,19 @@ + id="wiz_tech_guide_rst" + model="ir.module.module" + name="tech.guide.rst" + string="Create RST Technical Guide" + keyword="client_action_multi" + multi="True" /> + id="wiz_gen_graph" + model="ir.module.module" + name="create.relation.graph" + string="Generate Relationship Graph" + multi="False" /> diff --git a/addons/hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml b/addons/hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml index 39c2d9c6769..8dee90094ad 100644 --- a/addons/hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml +++ b/addons/hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml @@ -44,14 +44,10 @@ I check that Invoice is created for this timesheet. - !python {model: account.analytic.line}: | - account_id = self.pool.get('account.analytic.line') - accounts = account_id.browse(cr, uid, [ref("account_analytic_line_developyamlforhrmodule0")])[0] - exp = self.browse(cr, uid, [ref('account_analytic_line_developyamlforhrmodule0')])[0] + aline = self.browse(cr, uid, ref('account_analytic_line_developyamlforhrmodule0')) analytic_account_obj = self.pool.get('account.analytic.account') data = self.pool.get('hr.timesheet.invoice.create').read(cr, uid, [ref("hr_timesheet_invoice_create_0")], [], context)[0] - account_ids = accounts['account_id'] - for account in analytic_account_obj.browse(cr, uid, account_ids, context): - partner = account.partner_id.id + partner = aline.account_id.partner_id.id invoice_obj = self.pool.get('account.invoice') invoice_ids = invoice_obj.search(cr, uid, [('partner_id', '=', partner)]) @@ -63,6 +59,10 @@ product_exp = data['product'] assert product == product_exp + assert aline.invoice_id, "Invoice created, but analytic line wasn't updated." + assert aline.invoice_id == invoice_id, "Invoice doesn't match the one at analytic line" + # The expected amount is hard coded here, please keep updated: + assert invoice_id.amount_untaxed == 187.5, "Invoice amount mismatch: %s" % invoice_id.amount_untaxed - I create final invoice for this analytic account. - diff --git a/addons/l10n_fr/report/compute_resultant_report.rml b/addons/l10n_fr/report/compute_resultant_report.rml index de59b0201ee..c77be9534cb 100644 --- a/addons/l10n_fr/report/compute_resultant_report.rml +++ b/addons/l10n_fr/report/compute_resultant_report.rml @@ -1,3 +1,652 @@ -[[ _load('cdr',data['form'])]][[ _set_variable('ct1', cdrc1+cdrc2+cdrc3+cdrc4+cdrc5+cdrc6+cdrc7+cdrc8+cdrc9+cdrc10+cdrc11+cdrc12+cdrc13+cdrc14+cdrc15)]][[ _set_variable('ct3', cdrc17+cdrc18+cdrc19+cdrc20)]][[ _set_variable('ct4', cdrc21+cdrc22+cdrc23)]][[ _set_variable('charges', ct1+cdrc16+ct3+ct4+cdrc24+cdrc25)]][[ _set_variable('pta', cdrp1+cdrp2)]][[ _set_variable('ptb', cdrp3+cdrp4+cdrp5+cdrp6+cdrp7)]][[ _set_variable('pt1', pta+ptb)]][[ _set_variable('pt3', cdrp9+cdrp10+cdrp11+cdrp12+cdrp13+cdrp14)]][[ _set_variable('pt4', cdrp15+cdrp16+cdrp17)]][[ _set_variable('produits', pt1+cdrp8+pt3+pt4)]][[ company.name ]]période du [[ time.strftime('%d-%m-%Y',time.strptime(date_start,'%Y-%m-%d'))]] au [[ time.strftime('%d-%m-%Y',time.strptime(date_stop,'%Y-%m-%d'))]]Compte de résultatImprimé le : [[ time.strftime('%d-%m-%Y') ]] Tenue de Compte : [[ company.currency_id.name ]] CHARGES ( hors taxes ) CHARGES D'EXPLOITATION Achat de marchandises[[cdrc1]]Variation des stocks[[cdrc2]]Achats de matières premières et autres approvisionnements[[cdrc3]]Variation des stocks[[cdrc4]]Autres achats et charges externes[[cdrc5]]Redevances de crédit-bail mobilier[[cdrc6]]Redevances de crédit-bail immobilier[[cdrc7]]Impôts, taxes et versements assimilés[[cdrc8]]Salaires et traitements[[cdrc9]]Charges sociales[[cdrc10]]Dotation aux amortissements et aux dépréciations Sur immobilisations : dotations aux amortissements[[cdrc11]]Sur immobilisations : dotations aux dépréciations[[cdrc12]]Sur actif circulant : dotations aux dépréciations[[cdrc13]]Dotations aux provisions[[cdrc14]]Autres charges[[cdrc15]]TOTAL I[[ct1]]Quotes-parts de résultat sur opérations faites en commun ( II )[[cdrc16]]CHARGES FINANCIÈRES Dotations aux amortissements, aux dépréciations et aux provisions[[cdrc17]]Intérêts et charges assimilées[[cdrc18]]Différences négatives de change[[cdrc19]]Charges nettes sur cessions de valeurs mobilières de placement[[cdrc20]]TOTAL III[[ct3]]CHARGES EXCEPTIONNELLES Sur opérations de gestion[[cdrc21]]Sur opérations en capital[[cdrc22]]Dotations aux amortissements, aux dépréciations et aux provisions[[cdrc23]]TOTAL IV[[ct4]]Participation des salariés aux résultats ( V )[[cdrc24]]Impôts sur les bénéfices ( VI )[[cdrc25]]TOTAL CHARGES ( I + II + III + IV+ V+ VI )[[charges]] PRODUITS (hors taxes) PRODUITS D'EXPLOITATION Vente de marchandises[[cdrp1]]Production vendue [biens et services][[cdrp2]]Sous-total A - Montant net du chiffre d'affaires[[pta]]Production stockée[[cdrp3]]Production immobilisée[[cdrp4]]Subventions d'exploitation[[cdrp5]]Reprises sur provisions, dépréciations (et amortissements) et transferts de charges[[cdrp6]]Autres produits[[cdrp7]]Sous-total B[[ptb]]TOTAL I ( A + B )[[pt1]]Quotes-parts de résultat sur opérations faites en commun (II)[[cdrp8]]PRODUITS FINANCIERS De participation[[cdrp9]]D'autres valeurs mobilières et créances de l'actif immobilisé[[cdrp10]]Autres intérêts et produits assimilés[[cdrp11]]Reprises sur provisions, dépréciations et transferts de charges[[cdrp12]]Différences positives de change[[cdrp13]]Produits nets sur cessions de valeurs mobilières de placement[[cdrp14]]TOTAL III[[pt3]]PRODUITS EXCEPTIONNELS Sur opérations de gestion[[cdrp15]]Sur opérations en capital[[cdrp16]]Reprises sur provisions, dépréciations et transferts de charges[[cdrp17]]TOTAL IV[[pt4]]TOTAL DES PRODUITS ( I + II + III + IV )[[produits]]PRODUITS - CHARGES[[produits-charges]] - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [[ _load('cdr',data['form'])]] + [[ _set_variable('ct1', cdrc1+cdrc2+cdrc3+cdrc4+cdrc5+cdrc6+cdrc7+cdrc8+cdrc9+cdrc10+cdrc11+cdrc12+cdrc13+cdrc14+cdrc15)]] + [[ _set_variable('ct3', cdrc17+cdrc18+cdrc19+cdrc20)]] + [[ _set_variable('ct4', cdrc21+cdrc22+cdrc23)]] + [[ _set_variable('charges', ct1+cdrc16+ct3+ct4+cdrc24+cdrc25)]] + [[ _set_variable('pta', cdrp1+cdrp2)]] + [[ _set_variable('ptb', cdrp3+cdrp4+cdrp5+cdrp6+cdrp7)]] + [[ _set_variable('pt1', pta+ptb)]] + [[ _set_variable('pt3', cdrp9+cdrp10+cdrp11+cdrp12+cdrp13+cdrp14)]] + [[ _set_variable('pt4', cdrp15+cdrp16+cdrp17)]] + [[ _set_variable('produits', pt1+cdrp8+pt3+pt4)]] + + + + [[ company.name ]] + période du [[ time.strftime('%d-%m-%Y',time.strptime(date_start,'%Y-%m-%d'))]] au [[ time.strftime('%d-%m-%Y',time.strptime(date_stop,'%Y-%m-%d'))]] + + + Compte de résultat + + + Imprimé le : [[ time.strftime('%d-%m-%Y') ]] + + + + + + + + + + + + + + + Tenue de Compte : [[ company.currency_id.name ]] + + + + + + + + + + CHARGES ( hors taxes ) + + + + + + + + + + CHARGES D'EXPLOITATION + + + + + + + + + + Achat de marchandises + + + [[cdrc1]] + + + + + Variation des stocks + + + [[cdrc2]] + + + + + Achats de matières premières et autres approvisionnements + + + [[cdrc3]] + + + + + Variation des stocks + + + [[cdrc4]] + + + + + Autres achats et charges externes + + + [[cdrc5]] + + + + + Redevances de crédit-bail mobilier + + + [[cdrc6]] + + + + + Redevances de crédit-bail immobilier + + + [[cdrc7]] + + + + + Impôts, taxes et versements assimilés + + + [[cdrc8]] + + + + + Salaires et traitements + + + [[cdrc9]] + + + + + Charges sociales + + + [[cdrc10]] + + + + + Dotation aux amortissements et aux dépréciations + + + + + + + + + + Sur immobilisations : dotations aux amortissements + + + [[cdrc11]] + + + + + Sur immobilisations : dotations aux dépréciations + + + [[cdrc12]] + + + + + Sur actif circulant : dotations aux dépréciations + + + [[cdrc13]] + + + + + Dotations aux provisions + + + [[cdrc14]] + + + + + Autres charges + + + [[cdrc15]] + + + + + TOTAL I + + + [[ct1]] + + + + + Quotes-parts de résultat sur opérations faites en commun ( II ) + + + [[cdrc16]] + + + + + CHARGES FINANCIÈRES + + + + + + + + + + Dotations aux amortissements, aux dépréciations et aux provisions + + + [[cdrc17]] + + + + + Intérêts et charges assimilées + + + [[cdrc18]] + + + + + Différences négatives de change + + + [[cdrc19]] + + + + + Charges nettes sur cessions de valeurs mobilières de placement + + + [[cdrc20]] + + + + + TOTAL III + + + [[ct3]] + + + + + CHARGES EXCEPTIONNELLES + + + + + + + + + + Sur opérations de gestion + + + [[cdrc21]] + + + + + Sur opérations en capital + + + [[cdrc22]] + + + + + Dotations aux amortissements, aux dépréciations et aux provisions + + + [[cdrc23]] + + + + + TOTAL IV + + + [[ct4]] + + + + + Participation des salariés aux résultats ( V ) + + + [[cdrc24]] + + + + + Impôts sur les bénéfices ( VI ) + + + [[cdrc25]] + + + + + TOTAL CHARGES ( I + II + III + IV+ V+ VI ) + + + [[charges]] + + + + + + + + + + + + + + + + + PRODUITS (hors taxes) + + + + + + + + + + PRODUITS D'EXPLOITATION + + + + + + + + + + Vente de marchandises + + + [[cdrp1]] + + + + + Production vendue [biens et services] + + + [[cdrp2]] + + + + + Sous-total A - Montant net du chiffre d'affaires + + + [[pta]] + + + + + Production stockée + + + [[cdrp3]] + + + + + Production immobilisée + + + [[cdrp4]] + + + + + Subventions d'exploitation + + + [[cdrp5]] + + + + + Reprises sur provisions, dépréciations (et amortissements) et transferts de charges + + + [[cdrp6]] + + + + + Autres produits + + + [[cdrp7]] + + + + + Sous-total B + + + [[ptb]] + + + + + TOTAL I ( A + B ) + + + [[pt1]] + + + + + Quotes-parts de résultat sur opérations faites en commun (II) + + + [[cdrp8]] + + + + + PRODUITS FINANCIERS + + + + + + + + + + De participation + + + [[cdrp9]] + + + + + D'autres valeurs mobilières et créances de l'actif immobilisé + + + [[cdrp10]] + + + + + Autres intérêts et produits assimilés + + + [[cdrp11]] + + + + + Reprises sur provisions, dépréciations et transferts de charges + + + [[cdrp12]] + + + + + Différences positives de change + + + [[cdrp13]] + + + + + Produits nets sur cessions de valeurs mobilières de placement + + + [[cdrp14]] + + + + + TOTAL III + + + [[pt3]] + + + + + PRODUITS EXCEPTIONNELS + + + + + + + + + + Sur opérations de gestion + + + [[cdrp15]] + + + + + Sur opérations en capital + + + [[cdrp16]] + + + + + Reprises sur provisions, dépréciations et transferts de charges + + + [[cdrp17]] + + + + + TOTAL IV + + + [[pt4]] + + + + + TOTAL DES PRODUITS ( I + II + III + IV ) + + + [[produits]] + + + + + PRODUITS - CHARGES + + + [[produits-charges]] + + + + + + + + diff --git a/addons/l10n_ro/partner_view.xml b/addons/l10n_ro/partner_view.xml index bd349dbb5fa..db98168bb09 100644 --- a/addons/l10n_ro/partner_view.xml +++ b/addons/l10n_ro/partner_view.xml @@ -3,7 +3,7 @@ res.partner.form.ro - + res.partner form diff --git a/addons/l10n_uk/__openerp__.py b/addons/l10n_uk/__openerp__.py index f8df66de02b..c84385ba1d3 100644 --- a/addons/l10n_uk/__openerp__.py +++ b/addons/l10n_uk/__openerp__.py @@ -75,6 +75,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0064392144797', + 'certificate': '18956603329629', } -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 9553793506b..05a71edb065 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -889,7 +889,7 @@ class sale_order_line(osv.osv): \n* The \'Exception\' state is set when the related sale order is set as exception. \ \n* The \'Done\' state is set when the sale order line has been picked. \ \n* The \'Cancelled\' state is set when a user cancel the sale order related.'), - 'order_partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', string='Customer'), + 'order_partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', store=True, string='Customer'), 'salesman_id':fields.related('order_id', 'user_id', type='many2one', relation='res.users', store=True, string='Salesman'), 'company_id': fields.related('order_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True, states={'draft': [('readonly', False)]}), } @@ -1067,11 +1067,14 @@ class sale_order_line(osv.osv): q = product_uom_obj._compute_qty(cr, uid, uom, pack.qty, default_uom) # qty = qty - qty % q + q if qty and (q and not (qty % q) == 0): - ean = pack.ean + ean = pack.ean or _('(n/a)') qty_pack = pack.qty type_ul = pack.ul - warn_msg = _("You selected a quantity of %d Units.\nBut it's not compatible with the selected packaging.\nHere is a proposition of quantities according to the packaging: ") % (qty) - warn_msg = warn_msg + "\n\n" + _("EAN: ") + str(ean) + _(" Quantity: ") + str(qty_pack) + _(" Type of ul: ") + str(type_ul.name) + warn_msg = _("You selected a quantity of %d Units.\n" + "But it's not compatible with the selected packaging.\n" + "Here is a proposition of quantities according to the packaging:\n\n" + "EAN: %s Quantity: %s Type of ul: %s") % \ + (qty, ean, qty_pack, type_ul.name) warning = { 'title': _('Picking Information !'), 'message': warn_msg