diff --git a/addons/account/account.py b/addons/account/account.py
index a461cbe5bb7..314e192e186 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -136,7 +136,6 @@ class account_account_type(osv.osv):
'name': fields.char('Acc. Type Name', size=64, required=True, translate=True),
'code': fields.char('Code', size=32, required=True),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of account types."),
- 'partner_account': fields.boolean('Partner account'),
'close_method': fields.selection([('none', 'None'), ('balance', 'Balance'), ('detail', 'Detail'), ('unreconciled', 'Unreconciled')], 'Deferral Method', required=True),
'sign': fields.selection([(-1, 'Negative'), (1, 'Positive')], 'Sign on Reports', required=True, help='Allows you to change the sign of the balance amount displayed in the reports, so that you can see positive figures instead of negative ones in expenses accounts.'),
'report_type':fields.selection([
@@ -366,11 +365,11 @@ class account_account(osv.osv):
'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Forces all moves for this account to have this secondary currency."),
'code': fields.char('Code', size=64, required=True),
'type': fields.selection([
+ ('view', 'View'),
+ ('other', 'Regular'),
('receivable', 'Receivable'),
('payable', 'Payable'),
- ('view', 'View'),
('consolidation', 'Consolidation'),
- ('other', 'Others'),
('closed', 'Closed'),
], 'Internal Type', required=True, help="This type is used to differentiate types with "\
"special effects in Open ERP: view can not have entries, consolidation are accounts that "\
@@ -1203,9 +1202,11 @@ class account_move(osv.osv):
def validate(self, cr, uid, ids, context={}):
if context and ('__last_update' in context):
del context['__last_update']
- ok = True
+
+ valid_moves = [] #Maintains a list of moves which can be responsible to create analytic entries
+
for move in self.browse(cr, uid, ids, context):
- #unlink analytic lines on move_lines
+ # Unlink old analytic lines on move_lines
for obj_line in move.line_id:
for obj in obj_line.analytic_lines:
self.pool.get('account.analytic.line').unlink(cr,uid,obj.id)
@@ -1214,7 +1215,7 @@ class account_move(osv.osv):
amount = 0
line_ids = []
line_draft_ids = []
- company_id=None
+ company_id = None
for line in move.line_id:
amount += line.debit - line.credit
line_ids.append(line.id)
@@ -1231,45 +1232,59 @@ class account_move(osv.osv):
raise osv.except_osv(_('Error'), _("""Couldn't create move with currency different from the secondary currency of the account "%s - %s". Clear the secondary currency field of the account definition if you want to accept all currencies.""" % (line.account_id.code, line.account_id.name)))
if abs(amount) < 10 ** -4:
+ # If the move is balanced
+ # Add to the list of valid moves
+ # (analytic lines will be created later for valid moves)
+ valid_moves.append(move)
+
+ # Check whether the move lines are confirmed
+
if not len(line_draft_ids):
continue
+ # Update the move lines (set them as valid)
+
self.pool.get('account.move.line').write(cr, uid, line_draft_ids, {
'journal_id': move.journal_id.id,
'period_id': move.period_id.id,
'state': 'valid'
}, context, check=False)
- todo = []
+
account = {}
account2 = {}
- if journal.type not in ('purchase','sale'):
- continue
+
+ if journal.type in ('purchase','sale'):
+ for line in move.line_id:
+ code = amount = 0
+ key = (line.account_id.id, line.tax_code_id.id)
+ if key in account2:
+ code = account2[key][0]
+ amount = account2[key][1] * (line.debit + line.credit)
+ elif line.account_id.id in account:
+ code = account[line.account_id.id][0]
+ amount = account[line.account_id.id][1] * (line.debit + line.credit)
+ if (code or amount) and not (line.tax_code_id or line.tax_amount):
+ self.pool.get('account.move.line').write(cr, uid, [line.id], {
+ 'tax_code_id': code,
+ 'tax_amount': amount
+ }, context, check=False)
+ elif journal.centralisation:
+ # If the move is not balanced, it must be centralised...
+
+ # Add to the list of valid moves
+ # (analytic lines will be created later for valid moves)
+ valid_moves.append(move)
- for line in move.line_id:
- code = amount = 0
- key = (line.account_id.id, line.tax_code_id.id)
- if key in account2:
- code = account2[key][0]
- amount = account2[key][1] * (line.debit + line.credit)
- elif line.account_id.id in account:
- code = account[line.account_id.id][0]
- amount = account[line.account_id.id][1] * (line.debit + line.credit)
- if (code or amount) and not (line.tax_code_id or line.tax_amount):
- self.pool.get('account.move.line').write(cr, uid, [line.id], {
- 'tax_code_id': code,
- 'tax_amount': amount
- }, context, check=False)
#
- # Compute VAT
+ # Update the move lines (set them as valid)
#
- continue
- if journal.centralisation:
self._centralise(cr, uid, move, 'debit', context=context)
self._centralise(cr, uid, move, 'credit', context=context)
self.pool.get('account.move.line').write(cr, uid, line_draft_ids, {
'state': 'valid'
}, context, check=False)
- continue
else:
+ # We can't validate it (it's unbalanced)
+ # Setting the lines as draft
self.pool.get('account.move.line').write(cr, uid, line_ids, {
'journal_id': move.journal_id.id,
'period_id': move.period_id.id,
@@ -1277,13 +1292,12 @@ class account_move(osv.osv):
#'tax_amount': False,
'state': 'draft'
}, context, check=False)
- ok = False
- if ok:
- list_ids = []
- for tmp in move.line_id:
- list_ids.append(tmp.id)
- self.pool.get('account.move.line').create_analytic_lines(cr, uid, list_ids, context)
- return ok
+ # Create analytic lines for the valid moves
+ for record in valid_moves:
+ self.pool.get('account.move.line').create_analytic_lines(cr, uid, [line.id for line in record.line_id], context)
+
+ return len(valid_moves) > 0
+
account_move()
class account_move_reconcile(osv.osv):
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 1af3f1bef1e..c96fb9fe8c7 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -3,8 +3,8 @@
+ Fiscal Year
+ -->
account.fiscalyear.form
@@ -12,7 +12,7 @@
form
-
+
@@ -57,17 +57,17 @@
search
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
@@ -133,9 +133,8 @@
-
+ Accounts
+ -->
account.account.formaccount.account
@@ -143,21 +142,21 @@
@@ -136,7 +132,7 @@
-
+
Receivable Vouchersaccount.voucher
@@ -144,6 +140,7 @@
tree,form[('journal_id.type','=','sale')]
+ {'type':'sale'}
diff --git a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
index a5d7d9b420f..0bc2b70d341 100644
--- a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
+++ b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
@@ -49,18 +49,18 @@
-
-
+
+
-
-
-
-
-
+
+
+
+
diff --git a/addons/procurement/procurement_workflow.xml b/addons/procurement/procurement_workflow.xml
index 17979868a03..d28b1a035f8 100644
--- a/addons/procurement/procurement_workflow.xml
+++ b/addons/procurement/procurement_workflow.xml
@@ -183,6 +183,8 @@
action_check_finnished()
+ stock.move
+ [move_id.id]
diff --git a/addons/procurement/security/ir.model.access.csv b/addons/procurement/security/ir.model.access.csv
index 8eeaefb3bd6..03930c47407 100644
--- a/addons/procurement/security/ir.model.access.csv
+++ b/addons/procurement/security/ir.model.access.csv
@@ -1,7 +1,8 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_mrp_property_group","mrp.property.group","model_mrp_property_group",stock.group_stock_manager,1,1,1,1
-"access_mrp_property","mrp.property","model_mrp_property",stock.group_stock_manager,1,1,1,1
-"access_mrp_property_group","mrp.property.group","model_mrp_property_group",,1,0,0,0
-"access_mrp_property","mrp.property","model_mrp_property",base.group_user,1,0,0,0
-"access_procurement","procurement.order","model_procurement_order",base.group_user,1,0,0,0
-"access_stock_warehouse_orderpoint","stock.warehouse.orderpoint","model_stock_warehouse_orderpoint",stock.group_stock_manager,1,1,1,1
+"access_procurement","procurement.order","model_procurement_order","base.group_user",1,0,0,0
+"access_stock_warehouse_orderpoint","stock.warehouse.orderpoint","model_stock_warehouse_orderpoint","stock.group_stock_manager",1,1,1,1
+"access_mrp_property_group","mrp.property.group","model_mrp_property_group","stock.group_stock_manager",1,1,1,1
+"access_mrp_property","mrp.property","model_mrp_property","stock.group_stock_manager",1,1,1,1
+"access_mrp_property_group","mrp.property.group","model_mrp_property_group","base.group_user",1,0,0,0
+"access_mrp_property","mrp.property","model_mrp_property","base.group_user",1,0,0,0
+
diff --git a/addons/product/product.py b/addons/product/product.py
index 1512048bb83..b4dc56df950 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -71,33 +71,34 @@ class product_uom(osv.osv):
_columns = {
'name': fields.char('Name', size=64, required=True, translate=True),
'category_id': fields.many2one('product.uom.categ', 'UoM Category', required=True, ondelete='cascade',
- help="Unit of Measure of a category can be converted between each others in the same category."),
+ help="Quantity conversions may happen automatically between Units of Measure in the same category, according to their respective ratios."),
'factor': fields.float('Ratio', digits=(12, 6), required=True,
- help='The coefficient for the formula:\n' \
- '1 (base unit) = coeff (this unit). Ratio = 1 / Factor.'),
+ help='How many times this UoM is smaller than the reference UoM in this category:\n'\
+ '1 * (reference unit) = ratio * (this unit)'),
'factor_inv': fields.function(_factor_inv, digits=(12, 6),
fnct_inv=_factor_inv_write,
method=True, string='Ratio',
- help='The coefficient for the formula:\n' \
- 'coeff (base unit) = 1 (this unit). Factor = 1 / Rate.'),
+ help='How many times this UoM is bigger than the reference UoM in this category:\n'\
+ '1 * (this unit) = ratio * (reference unit)', required=True),
'rounding': fields.float('Rounding Precision', digits=(16, 3), required=True,
- help="The computed quantity will be a multiple of this value. Use 1.0 for products that can not be split."),
- 'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the unit of measure without removing it."),
- 'uom_factor': fields.selection([('bigger','Bigger than the default'),
- ('smaller','Smaller than the default'),
- ('default','Default UoM for the category')],'Type of Unit', required=1),
+ help="The computed quantity will be a multiple of this value. "\
+ "Use 1.0 for a UoM that cannot be further split, such as a piece."),
+ 'active': fields.boolean('Active', help="By unchecking the active field you can disable a unit of measure without deleting it."),
+ 'uom_type': fields.selection([('bigger','Bigger than the reference UoM'),
+ ('reference','Reference UoM for this category (ratio=1)'),
+ ('smaller','Smaller than the reference UoM')],'UoM Type', required=1),
}
_defaults = {
- 'factor': lambda *a: 1.0,
- 'factor_inv': lambda *a: 1.0,
- 'active': lambda *a: 1,
- 'rounding': lambda *a: 0.01,
- 'uom_factor': lambda *a: 'default',
+ 'factor': 1.0,
+ 'factor_inv': 1.0,
+ 'active': 1,
+ 'rounding': 0.01,
+ 'uom_type': 'reference',
}
_sql_constraints = [
- ('factor_gt_zero', 'CHECK (factor!=0)', 'Value of the factor can never be 0 !'),
+ ('factor_gt_zero', 'CHECK (factor!=0)', 'The conversion ratio for a unit of measure cannot be 0!'),
]
def _compute_qty(self, cr, uid, from_uom_id, qty, to_uom_id=False):
@@ -133,8 +134,8 @@ class product_uom(osv.osv):
amount = amount / to_unit.factor
return amount
- def onchange_factor(self, cursor, user, ids, value):
- if value == 'default':
+ def onchange_type(self, cursor, user, ids, value):
+ if value == 'reference':
return {'value': {'factor': 1, 'factor_inv': 1}}
return {}
diff --git a/addons/product/product_data.xml b/addons/product/product_data.xml
index ff4da8254ec..4fada46aeef 100644
--- a/addons/product/product_data.xml
+++ b/addons/product/product_data.xml
@@ -24,38 +24,55 @@
PCE
- 1.0
- 1.0
+
+
- KGM
- 1
+ kg
+
+
+
+
+ g
+
+ smaller
- Hour
+ hour
- 8.0
+
+ smaller
- Day
+ day
- 1.0
+
- TON
- 0.001
+
+ tonne
+
+ bigger
- Meter
- 1.0
+ m
+
- Kilometer
- 0.001
+ km
+
+ bigger
+
+
+
+ cm
+
+ smaller
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index dfeb9c0a28f..b5f48efd90a 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -310,16 +310,29 @@
diff --git a/addons/stock/product.py b/addons/stock/product.py
index 405bd165106..dfe6f82c30d 100644
--- a/addons/stock/product.py
+++ b/addons/stock/product.py
@@ -170,8 +170,8 @@ class product_product(osv.osv):
context = {}
res = super(product_product, self).view_header_get(cr, user, view_id, view_type, context)
if res: return res
- if (context.get('location', False)):
- return _('Products: ')+self.pool.get('stock.location').browse(cr, user, context['location'], context).name
+ if (context.get('active_id', False)) and (context.get('active_model') == 'stock.location'):
+ return _('Products: ')+self.pool.get('stock.location').browse(cr, user, context['active_id'], context).name
return res
def get_product_available(self, cr, uid, ids, context=None):
diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml
index 97510e31a64..68bae72ba84 100644
--- a/addons/stock/report/picking.rml
+++ b/addons/stock/report/picking.rml
@@ -208,7 +208,7 @@
[[ formatLang(picking.min_date,date_time = True) ]]
- [[ picking.weight or '']]
+ [[ 'weight' in picking._columns.keys() and picking.weight or '']]
diff --git a/addons/stock/report/report_stock_picking.py b/addons/stock/report/report_stock_picking.py
index 8dff4acf528..81f20ed8906 100644
--- a/addons/stock/report/report_stock_picking.py
+++ b/addons/stock/report/report_stock_picking.py
@@ -72,6 +72,7 @@ class report_stock_picking(osv.osv):
sp.address_id as partner_id,
to_date(to_char(sp.create_date, 'MM-dd-YYYY'),'MM-dd-YYYY') as date,
count(sm.id) as nbr,
+ count(sp.id) as nbp,
sum(sm.product_qty*u.factor) as product_qty,
sum(sm.product_uos_qty) as product_uos_qty,
sm.product_id as product_id,
diff --git a/addons/stock/security/ir.model.access.csv b/addons/stock/security/ir.model.access.csv
index 30a7610d81a..86d9cac4337 100644
--- a/addons/stock/security/ir.model.access.csv
+++ b/addons/stock/security/ir.model.access.csv
@@ -22,3 +22,4 @@
"access_report_delivery_products_planned","report.delivery.products.planned","model_report_delivery_products_planned","stock.group_stock_user",1,1,1,1
"access_report_stock_move","report.stock.move","model_report_stock_move","stock.group_stock_user",1,1,1,1
"access_report_stock_inventory","report.stock.inventory","model_report_stock_inventory","stock.group_stock_user",1,1,1,1
+"access_report_stock_picking","report.stock.picking","model_report_stock_picking","stock.group_stock_user",1,1,1,1
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index e3b49ea2a83..9bc40a1e691 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1008,6 +1008,9 @@ class stock_picking(osv.osv):
return res
def test_done(self, cr, uid, ids, context=None):
+ """ Test whether the move lines are done or not.
+ @return: True or False
+ """
ok = False
for pick in self.browse(cr, uid, ids, context=context):
if not pick.move_lines:
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index 63e39bca629..2f9fe026a61 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -1630,9 +1630,6 @@
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
-
diff --git a/addons/stock/wizard/stock_inventory_line_split.py b/addons/stock/wizard/stock_inventory_line_split.py
index 9f91a47c9a5..b07d27c7656 100644
--- a/addons/stock/wizard/stock_inventory_line_split.py
+++ b/addons/stock/wizard/stock_inventory_line_split.py
@@ -44,8 +44,8 @@ class stock_inventory_line_split(osv.osv_memory):
@return: A dictionary which of fields with values.
"""
record_id = context and context.get('active_id',False)
- res = super(stock_inventory_line_split, self).default_get(cr, uid, fields, context=context)
- line= self.pool.get('stock.inventory.line').browse(cr, uid, record_id)
+ res = {}
+ line = self.pool.get('stock.inventory.line').browse(cr, uid, record_id)
if 'product_id' in fields:
res.update({'product_id':line.product_id.id})
return res
diff --git a/addons/thunderbird/installer.py b/addons/thunderbird/installer.py
index c93e10080ed..8fe0a4aac33 100644
--- a/addons/thunderbird/installer.py
+++ b/addons/thunderbird/installer.py
@@ -43,14 +43,14 @@ class thunderbird_installer(osv.osv_memory):
'thunderbird':fields.boolean('Thunderbird Module ', help="Allows you to select an object that you’d like to add to your email and its attachments."),
'plugin_file':fields.binary('Thunderbird Plug-in', readonly=True, help="Thunderbird plug-in file. Save as this file and install this plug-in in thunderbird."),
'pdf_file':fields.binary('Installation Manual', help="The documentation file :- how to install Thunderbird Plug-in.", readonly=True),
- 'description':fields.text('Description', readonly=True)
+ 'description':fields.text('Description', readonly=True)
}
_defaults = {
'thunderbird' : True,
'name' : 'tiny_plugin-2.0.xpi',
'pdf_name' : 'Installation Guide to OpenERP Thunderbid Plug-in.pdf',
- 'description' : """ * Save The thunderbird plugin Follow the following step to install thunderbird plugin. \n -> 1. From Menu Bar, Open Tools > Add ons. \n -> 2. Now click on install button and a browser window will appear. \n -> 3. Just select the (.xpi) file from thunderbird/plugin directory and click ok, a new software installation window will appear and within a short time Install Now button will be enabled. \n -> 4. Click on Install Now and restart Thunderbird. \n -> 5. Now Thunderbird plugin is installed."""
+ 'description' : """ * Save the Thunderbird plugin. \n * Follow the following step to install Thunderbird plugin. \n -> 1.From Menu Bar of Thunderbird, open Tools > Add ons. \n -> 2. Click on install button and a browser window appears. \n -> 3. Select the plug-in(.xpi file) and click Ok. \n -> 4. Software installation window appears and within a short time “Install Now” button will be enabled -> 5. Click "Install Now". \n -> 6. Restart Thunderbird."""
}
thunderbird_installer()
diff --git a/addons/thunderbird/plugin/tiny_plugin-2.0.xpi b/addons/thunderbird/plugin/tiny_plugin-2.0.xpi
index 982447de8d8..9b9e95aec2f 100644
Binary files a/addons/thunderbird/plugin/tiny_plugin-2.0.xpi and b/addons/thunderbird/plugin/tiny_plugin-2.0.xpi differ
diff --git a/addons/thunderbird/thunderbird_installer.xml b/addons/thunderbird/thunderbird_installer.xml
index 7b50b70fba5..834ac7c6a38 100644
--- a/addons/thunderbird/thunderbird_installer.xml
+++ b/addons/thunderbird/thunderbird_installer.xml
@@ -15,7 +15,7 @@
Thunderbird
- This module is required for the thuderbird plug-in to work properly.This allows you to select an object that you had like to add to your email and its attachments. You can select a partner, a task, a project, an analytical account, or any other object and attach selected mail as .eml file in attachment of selected record.
+ This module allows you to archive an e-mail on one or more objects of OpenERP. You can attach an email to a partner, a task, an analytic account or any other object. You can also create a new object like a lead, a phone call, claim and many more.Configure
@@ -25,8 +25,8 @@
15
-
-
+
+
@@ -72,20 +72,20 @@
-
+
-
+
-
+
-
+