diff --git a/addons/account/account.py b/addons/account/account.py
index bdd6b37b988..5794c59ffdc 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -2544,9 +2544,17 @@ class wizard_multi_charts_accounts(osv.osv_memory):
if ids:
return ids[0]
return False
+
+ def _get_default_accounts(self, cr, uid, context=None):
+ accounts = [{'acc_name':'Current','account_type':'bank'},
+ {'acc_name':'Deposit','account_type':'bank'},
+ {'acc_name':'Cash','account_type':'cash'}]
+ return accounts
+
_defaults = {
'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr, uid, [uid], c)[0].company_id.id,
'chart_template_id': _get_chart,
+ 'bank_accounts_id': _get_default_accounts,
'code_digits': 6,
'seq_journal': True
}
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index cc44e4563d8..8217522715e 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -2413,23 +2413,22 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/account/data/account_data2.xml b/addons/account/data/account_data2.xml
index 8cd2071f70e..38bdd4b2b2c 100644
--- a/addons/account/data/account_data2.xml
+++ b/addons/account/data/account_data2.xml
@@ -2,6 +2,11 @@
+
+ Sales
+ sale
+
+
diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index a39e259681e..4b308c06418 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -677,7 +677,7 @@ class account_invoice(osv.osv):
return (ref or '').replace('/','')
def _get_analytic_lines(self, cr, uid, id):
- inv = self.browse(cr, uid, [id])[0]
+ inv = self.browse(cr, uid, id)
cur_obj = self.pool.get('res.currency')
company_currency = inv.company_id.currency_id.id
@@ -693,6 +693,8 @@ class account_invoice(osv.osv):
ref = inv.reference
else:
ref = self._convert_ref(cr, uid, inv.number)
+ if not inv.journal_id.analytic_journal_id:
+ raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (inv.journal_id.name,))
il['analytic_lines'] = [(0,0, {
'name': il['name'],
'date': inv['date_invoice'],
@@ -702,7 +704,7 @@ class account_invoice(osv.osv):
'product_id': il['product_id'],
'product_uom_id': il['uos_id'],
'general_account_id': il['account_id'],
- 'journal_id': self._get_journal_analytic(cr, uid, inv.type),
+ 'journal_id': inv.journal_id.analytic_journal_id.id,
'ref': ref,
})]
return iml
diff --git a/addons/hr_timesheet/hr_timesheet_data.xml b/addons/hr_timesheet/hr_timesheet_data.xml
index e7cb3d5e0d4..a19b2c67291 100644
--- a/addons/hr_timesheet/hr_timesheet_data.xml
+++ b/addons/hr_timesheet/hr_timesheet_data.xml
@@ -18,5 +18,10 @@
+
+
+
+
+
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
index f605fd760be..8dd25ef1eb3 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
@@ -27,8 +27,8 @@ class hr_timesheet_invoice_factor(osv.osv):
_name = "hr_timesheet_invoice.factor"
_description = "Invoice Rate"
_columns = {
- 'name': fields.char('Internal name', size=128, required=True),
- 'customer_name': fields.char('Name', size=128, help="Name of the customer"),
+ 'name': fields.char('Internal name', size=128, required=True, translate=True),
+ 'customer_name': fields.char('Name', size=128, help="Label for the customer"),
'factor': fields.float('Discount (%)', required=True, help="Discount in percentage"),
}
_defaults = {
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
index a81af0788b6..462888e0b39 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
@@ -6,5 +6,15 @@
100%
0.0
+
+ 90%
+ 90%
+ 10.0
+
+
+ 50%
+ 50%
+ 50.0
+
diff --git a/addons/profile_tools/installer.py b/addons/profile_tools/installer.py
index 54fd0602802..6ea024aebbe 100644
--- a/addons/profile_tools/installer.py
+++ b/addons/profile_tools/installer.py
@@ -29,9 +29,10 @@ class misc_tools_installer(osv.osv_memory):
'subscription':fields.boolean('Recurring Documents',help='Helps to generate automatically recurring documents.'),
'survey':fields.boolean('Survey',help='Allows you to organize surveys.'),
'idea':fields.boolean('Ideas Box',help='Promote ideas of the employees, votes and discussion on best ideas.'),
+ 'share':fields.boolean('Share Data / Portals',help='This module allows you to easily give restricted access of any filtered list of objects to any customer or supplier.' \
+ 'Just click on the share icon to give access to your customers on their project\'s tasks, support requests, invoices, etc.'),
}
_defaults = {
- 'lunch': True,
}
misc_tools_installer()
diff --git a/addons/profile_tools/misc_tools_installer.xml b/addons/profile_tools/misc_tools_installer.xml
index b59f95ab908..d81936756a6 100644
--- a/addons/profile_tools/misc_tools_installer.xml
+++ b/addons/profile_tools/misc_tools_installer.xml
@@ -25,6 +25,7 @@
Configure
+
diff --git a/addons/project/installer.py b/addons/project/installer.py
index 7a147737768..693e2d58018 100644
--- a/addons/project/installer.py
+++ b/addons/project/installer.py
@@ -47,11 +47,6 @@ class project_installer(osv.osv_memory):
'project_gtd': fields.boolean('Getting Things Done',
help="GTD is a methodology to efficiently organise yourself and your tasks. This module fully integrates GTD principle with OpenERP's project management."),
}
-
- _defaults={
- 'project_issue': True,
- }
-
project_installer()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py
index f5480793adc..8d846f919e7 100644
--- a/addons/project_timesheet/project_timesheet.py
+++ b/addons/project_timesheet/project_timesheet.py
@@ -26,6 +26,20 @@ import pooler
import tools
from tools.translate import _
+class project_project(osv.osv):
+ _inherit = 'project.project'
+ def onchange_partner_id(self, cr, uid, ids, part=False, context=None):
+ result = super(project_project, self).onchange_partner_id(cr, uid, ids, part, context)
+ if result.get('value', False):
+ try:
+ d = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'hr_timesheet_invoice', 'timesheet_invoice_factor1')
+ if d:
+ result['value']['to_invoice'] = d[1]
+ except ValueError, e:
+ pass
+ return result
+project_project()
+
class project_work(osv.osv):
_inherit = "project.task.work"
@@ -145,13 +159,13 @@ class project_work(osv.osv):
# Compute based on pricetype
amount_unit = timesheet_obj.on_change_unit_amount(cr, uid, line_id.id,
- prod_id=prod_id,
- quantity=vals_line['unit_amount'], unit=False, context=context)
+ prod_id=prod_id, company_id=False,
+ unit_amount=vals_line['unit_amount'], unit=False, context=context)
if amount_unit and 'amount' in amount_unit.get('value',{}):
vals_line['amount'] = amount_unit['value']['amount']
- obj.write(cr, uid, [line_id.id], vals_line, context=context)
+ self.pool.get('hr.analytic.timesheet').write(cr, uid, [line_id.id], vals_line, context=context)
return super(project_work,self).write(cr, uid, ids, vals, context)
diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml
index 05be6d5466e..c0dcd3a46bc 100644
--- a/addons/project_timesheet/project_timesheet_view.xml
+++ b/addons/project_timesheet/project_timesheet_view.xml
@@ -27,14 +27,14 @@
-
+
-
-
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index e5357ee0e04..36ba5e62d81 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -198,7 +198,8 @@
-
+
@@ -374,14 +375,15 @@
@@ -444,10 +447,15 @@
search
-
+
-
@@ -530,8 +538,7 @@
Sales Application Configuration
- Configure Sales Order Logistic
+ Configure Sales Order Logistic
Setup your sales workflow and default values.
diff --git a/addons/sale/stock_view.xml b/addons/sale/stock_view.xml
index ca7506fe518..4075c523cb9 100644
--- a/addons/sale/stock_view.xml
+++ b/addons/sale/stock_view.xml
@@ -33,7 +33,6 @@
res_model="stock.picking"
src_model="sale.order"
context="{'contact_display': 'partner'}" />
- -->
@@ -48,6 +47,7 @@
+ -->
diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py
index 27c19065652..0037c10405d 100644
--- a/addons/sale/wizard/sale_make_invoice_advance.py
+++ b/addons/sale/wizard/sale_make_invoice_advance.py
@@ -26,8 +26,9 @@ class sale_advance_payment_inv(osv.osv_memory):
_name = "sale.advance.payment.inv"
_description = "Sale Advance Payment Invoice"
_columns = {
- 'product_id': fields.many2one('product.product', 'Product', required=True),
- 'amount': fields.float('Unit Price', size=(16, 2), required=True),
+ 'product_id': fields.many2one('product.product', 'Advance Product', required=True,
+ help="Select a product of type service which is called 'Advance Product'. You may have to create it and set it as a default value on this field."),
+ 'amount': fields.float('Advance Amount', size=(16, 2), required=True, help="The amount to be invoiced in advance."),
'qtty': fields.float('Quantity', size=(16, 2), required=True),
}
_defaults = {
@@ -95,6 +96,7 @@ class sale_advance_payment_inv(osv.osv_memory):
}
inv_id = inv_obj.create(cr, uid, inv)
+ inv_obj.button_reset_taxes(cr, uid, [inv_id], context=context)
for inv in sale.invoice_ids:
ids_inv.append(inv.id)
@@ -168,7 +170,7 @@ class sale_open_invoice(osv.osv_memory):
tree_id = mod_obj._get_id(cr, uid, 'account', 'invoice_tree')
tree_res = mod_obj.browse(cr, uid, tree_id, context=context).res_id
return {
- 'name': _('Deposit Invoice'),
+ 'name': _('Advance Invoice'),
'view_type': 'form',
'view_mode': 'form,tree',
'res_model': 'account.invoice',
diff --git a/addons/sale/wizard/sale_make_invoice_advance.xml b/addons/sale/wizard/sale_make_invoice_advance.xml
index 33262a5cdd7..2cdcb9b8c99 100644
--- a/addons/sale/wizard/sale_make_invoice_advance.xml
+++ b/addons/sale/wizard/sale_make_invoice_advance.xml
@@ -40,7 +40,7 @@
-
+