[MERGE] merge from dev3
bzr revid: ara@tinyerp.com-20101209125617-bze3t7fr7vru5sj0
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<data>
|
||||
|
||||
<!--
|
||||
Relationshio Graph on Module object
|
||||
-->
|
||||
<!--
|
||||
Relationship Graph on Module object
|
||||
-->
|
||||
|
||||
<record model="ir.ui.view" id="view_module_module_graph">
|
||||
<field name="name">ir.module.module.form.graph</field>
|
||||
<field name="model">ir.module.module</field>
|
||||
<field name="inherit_id" ref="base.module_form"/>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page string="Relationship Graph">
|
||||
<separator colspan="4" string="You can save this image as .png file"/>
|
||||
<field name="file_graph" widget="image" nolabel="1" />
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_module_module_graph">
|
||||
<field name="name">ir.module.module.form.graph</field>
|
||||
<field name="model">ir.module.module</field>
|
||||
<field name="inherit_id" ref="base.module_form"/>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page string="Relationship Graph">
|
||||
<separator colspan="4" string="You can save this image as .png file"/>
|
||||
<field name="file_graph" widget="image" nolabel="1" />
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -2,21 +2,19 @@
|
||||
<openerp>
|
||||
<data>
|
||||
<wizard
|
||||
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_tech_guide_rst"
|
||||
model="ir.module.module"
|
||||
name="tech.guide.rst"
|
||||
string="Create RST Technical Guide"
|
||||
keyword="client_action_multi"
|
||||
multi="True" />
|
||||
|
||||
<wizard
|
||||
id="wiz_gen_graph"
|
||||
model="ir.module.module"
|
||||
name="create.relation.graph"
|
||||
string="Generate Relationship Graph"
|
||||
multi="False"
|
||||
/>
|
||||
id="wiz_gen_graph"
|
||||
model="ir.module.module"
|
||||
name="create.relation.graph"
|
||||
string="Generate Relationship Graph"
|
||||
multi="False" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -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.
|
||||
-
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@
|
||||
<data>
|
||||
<record model="ir.ui.view" id="res_partner_form_ro">
|
||||
<field name="name">res.partner.form.ro</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="inherit_id" ref="base_vat.view_partner_form"/>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -75,6 +75,6 @@
|
||||
'demo_xml': [],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0064392144797',
|
||||
'certificate': '18956603329629',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
+7
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user