diff --git a/addons/account/account.py b/addons/account/account.py
index 75936320e58..3c7c14737c1 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -1447,6 +1447,8 @@ class account_move(osv.osv):
def unlink(self, cr, uid, ids, context=None, check=True):
if context is None:
context = {}
+ if isinstance(ids, (int, long)):
+ ids = [ids]
toremove = []
obj_move_line = self.pool.get('account.move.line')
for move in self.browse(cr, uid, ids, context=context):
@@ -1928,7 +1930,7 @@ class account_tax(osv.osv):
'child_depend':fields.boolean('Tax on Children', help="Set if the tax computation is based on the computation of child taxes rather than on the total amount."),
'python_compute':fields.text('Python Code'),
'python_compute_inv':fields.text('Python Code (reverse)'),
- 'python_applicable':fields.text('Python Code'),
+ 'python_applicable':fields.text('Applicable Code'),
#
# Fields used for the Tax declaration
@@ -1942,8 +1944,8 @@ class account_tax(osv.osv):
'ref_base_code_id': fields.many2one('account.tax.code', 'Refund Base Code', help="Use this code for the tax declaration."),
'ref_tax_code_id': fields.many2one('account.tax.code', 'Refund Tax Code', help="Use this code for the tax declaration."),
- 'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."),
- 'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
+ 'ref_base_sign': fields.float('Refund Base Code Sign', help="Usually 1 or -1."),
+ 'ref_tax_sign': fields.float('Refund Tax Code Sign', help="Usually 1 or -1."),
'include_base_amount': fields.boolean('Included in base amount', help="Indicates if the amount of tax must be included in the base amount for the computation of the next taxes"),
'company_id': fields.many2one('res.company', 'Company', required=True),
'description': fields.char('Tax Code'),
@@ -2833,7 +2835,7 @@ class account_tax_template(osv.osv):
'child_depend':fields.boolean('Tax on Children', help="Set if the tax computation is based on the computation of child taxes rather than on the total amount."),
'python_compute':fields.text('Python Code'),
'python_compute_inv':fields.text('Python Code (reverse)'),
- 'python_applicable':fields.text('Python Code'),
+ 'python_applicable':fields.text('Applicable Code'),
#
# Fields used for the Tax declaration
@@ -2847,8 +2849,8 @@ class account_tax_template(osv.osv):
'ref_base_code_id': fields.many2one('account.tax.code.template', 'Refund Base Code', help="Use this code for the tax declaration."),
'ref_tax_code_id': fields.many2one('account.tax.code.template', 'Refund Tax Code', help="Use this code for the tax declaration."),
- 'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."),
- 'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
+ 'ref_base_sign': fields.float('Refund Base Code Sign', help="Usually 1 or -1."),
+ 'ref_tax_sign': fields.float('Refund Tax Code Sign', help="Usually 1 or -1."),
'include_base_amount': fields.boolean('Include in Base Amount', help="Set if the amount of tax must be included in the base amount before computing the next taxes."),
'description': fields.char('Internal Name'),
'type_tax_use': fields.selection([('sale','Sale'),('purchase','Purchase'),('all','All')], 'Tax Use In', required=True,),
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index 0fc9d9e2227..ed8fb8185e7 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -311,13 +311,13 @@ class account_move_line(osv.osv):
context = {}
c = context.copy()
c['initital_bal'] = True
- sql = """SELECT l2.id, SUM(l1.debit-l1.credit)
- FROM account_move_line l1, account_move_line l2
- WHERE l2.account_id = l1.account_id
- AND l1.id <= l2.id
- AND l2.id IN %s AND """ + \
- self._query_get(cr, uid, obj='l1', context=c) + \
- " GROUP BY l2.id"
+ sql = """SELECT l1.id, COALESCE(SUM(l2.debit-l2.credit), 0)
+ FROM account_move_line l1 LEFT JOIN account_move_line l2
+ ON (l1.account_id = l2.account_id
+ AND l2.id <= l1.id
+ AND """ + \
+ self._query_get(cr, uid, obj='l2', context=c) + \
+ ") WHERE l1.id IN %s GROUP BY l1.id"
cr.execute(sql, [tuple(ids)])
return dict(cr.fetchall())
diff --git a/addons/account/data/account_data.xml b/addons/account/data/account_data.xml
index 9d2e65a3a4c..8119e9f1002 100644
--- a/addons/account/data/account_data.xml
+++ b/addons/account/data/account_data.xml
@@ -16,7 +16,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Click to create a new fuel log.
diff --git a/addons/hr/hr.py b/addons/hr/hr.py
index 08869dc5b22..2f0046ca200 100644
--- a/addons/hr/hr.py
+++ b/addons/hr/hr.py
@@ -259,11 +259,13 @@ class hr_employee(osv.osv):
employee_id = super(hr_employee, self).create(cr, uid, data, context=create_ctx)
employee = self.browse(cr, uid, employee_id, context=context)
if employee.user_id:
+ res_users = self.pool['res.users']
# send a copy to every user of the company
- company_id = employee.user_id.partner_id.company_id.id
- partner_ids = self.pool.get('res.partner').search(cr, uid, [
- ('company_id', '=', company_id),
- ('user_ids', '!=', False)], context=context)
+ # TODO: post to the `Whole Company` mail.group when we'll be able to link to the employee record
+ _model, group_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'base', 'group_user')
+ user_ids = res_users.search(cr, uid, [('company_id', '=', employee.user_id.company_id.id),
+ ('groups_id', 'in', group_id)])
+ partner_ids = list(set(u.partner_id.id for u in res_users.browse(cr, uid, user_ids, context=context)))
else:
partner_ids = []
self.message_post(cr, uid, [employee_id],
diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml
index 87743a3ea79..911eebbd16a 100644
--- a/addons/hr/hr_view.xml
+++ b/addons/hr/hr_view.xml
@@ -117,7 +117,7 @@
Tisztelt$ ${object.partner_id.name},
\n" +" \n" +"Ez egy ${object.state in ('draft', 'sent') and 'árajánlatkérés' or " +"'beszerzés visszaigazolás'} ${object.company_id.name} vállalattól:
\n" +" \n" +"\n"
+" REFERENCES
\n"
+" Megrendelés száma: ${object.name}
\n"
+" Megrendelés összesen: ${object.amount_total} "
+"${object.pricelist_id.currency_id.name}
\n"
+" Megrendelés dátuma: ${object.date_order}
\n"
+" % if object.origin:\n"
+" Megrendelés hivatkozási száma: ${object.origin}
\n"
+" % endif\n"
+" % if object.partner_ref:\n"
+" Ön hivatkozási száma: ${object.partner_ref}
\n"
+" % endif\n"
+" % if object.validator:\n"
+" Kapcsolattartó az Ön részéről: ${object.validator.name}\n"
+" % endif\n"
+"
További felmerülő kérdésekben állunk szíves rendelkezésükre.
\n" +"Köszönjük!
\n" +"\n" -" Ennek a beszállítónak nincs beszerzési megrendelése. " +" Ehhez a Beszállítóhoz nincs beszerzési megrendelés. " "Kattintson ide árajánlat kérés készítéséhez.\n" "
\n" " Az árajánlat kérés a beszerzési folyamat első lépése. " diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index e551eb40396..fb838e8b3cd 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -1234,17 +1234,27 @@ class account_invoice(osv.Model): def invoice_validate(self, cr, uid, ids, context=None): res = super(account_invoice, self).invoice_validate(cr, uid, ids, context=context) purchase_order_obj = self.pool.get('purchase.order') - po_ids = purchase_order_obj.search(cr, uid, [('invoice_ids', 'in', ids)], context=context) + # read access on purchase.order object is not required + if not purchase_order_obj.check_access_rights(cr, uid, 'read', raise_exception=False): + user_id = SUPERUSER_ID + else: + user_id = uid + po_ids = purchase_order_obj.search(cr, user_id, [('invoice_ids', 'in', ids)], context=context) for po_id in po_ids: - purchase_order_obj.message_post(cr, uid, po_id, body=_("Invoice received"), context=context) + purchase_order_obj.message_post(cr, user_id, po_id, body=_("Invoice received"), context=context) return res def confirm_paid(self, cr, uid, ids, context=None): res = super(account_invoice, self).confirm_paid(cr, uid, ids, context=context) purchase_order_obj = self.pool.get('purchase.order') - po_ids = purchase_order_obj.search(cr, uid, [('invoice_ids', 'in', ids)], context=context) + # read access on purchase.order object is not required + if not purchase_order_obj.check_access_rights(cr, uid, 'read', raise_exception=False): + user_id = SUPERUSER_ID + else: + user_id = uid + po_ids = purchase_order_obj.search(cr, user_id, [('invoice_ids', 'in', ids)], context=context) if po_ids: - purchase_order_obj.message_post(cr, uid, po_ids, body=_("Invoice paid"), context=context) + purchase_order_obj.message_post(cr, user_id, po_ids, body=_("Invoice paid"), context=context) return res class account_invoice_line(osv.Model): diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index 6bed8bcbf9c..4a301d3fa7b 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -36,6 +36,9 @@ +