diff --git a/addons/account/__terp__.py b/addons/account/__terp__.py
index 40a4b2d1d5d..136731fbac6 100644
--- a/addons/account/__terp__.py
+++ b/addons/account/__terp__.py
@@ -59,7 +59,8 @@
"project/project_report.xml",
"product_view.xml",
"account_assert_test.xml",
- "process/invoice_process.xml",
+ "process/customer_invoice_process.xml",
+ "process/supplier_invoice_process.xml",
"process/statement_process.xml",
],
"translations" : {
diff --git a/addons/account/account.py b/addons/account/account.py
index a22b8a5c5fa..3df1dc622d1 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -1032,23 +1032,10 @@ class account_move(osv.osv):
}, context, check=False)
ok = False
if ok:
- obj_line=self.browse(cr, uid, ids[0])
- for move in self.browse(cr, uid, ids, context):
- for obj_line in move.line_id:
- #create analytic lines
- if obj_line.analytic_account_id:
- vals_lines={
- 'name': obj_line.name,
- 'date': obj_line.date,
- 'account_id': obj_line.analytic_account_id.id,
- 'unit_amount':obj_line.quantity,
- 'amount': obj_line.debit or obj_line.credit,
- 'general_account_id': obj_line.account_id.id,
- 'journal_id': obj_line.journal_id.analytic_journal_id.id,
- 'ref': obj_line.ref,
- 'move_id':obj_line.id
- }
- self.pool.get('account.analytic.line').create(cr,uid,vals_lines)
+ 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
account_move()
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index d67073679d2..21f5b96848b 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -58,6 +58,34 @@ class account_move_line(osv.osv):
del data[f]
return data
+ def create_analytic_lines(self, cr, uid, ids, context={}):
+ for obj_line in self.browse(cr, uid, ids, context):
+ if obj_line.analytic_account_id:
+ amt = (obj_line.credit or 0.0) - (obj_line.debit or 0.0)
+ vals_lines={
+ 'name': obj_line.name,
+ 'date': obj_line.date,
+ 'account_id': obj_line.analytic_account_id.id,
+ 'unit_amount':obj_line.quantity,
+ 'product_id': obj_line.product_id and obj_line.product_id.id or False,
+ 'product_uom_id': obj_line.product_uom_id and obj_line.product_uom_id.id or False,
+ 'amount': amt,
+ 'general_account_id': obj_line.account_id.id,
+ 'journal_id': obj_line.journal_id.analytic_journal_id.id,
+ 'ref': obj_line.ref,
+ 'move_id':obj_line.id
+ }
+ new_id = self.pool.get('account.analytic.line').create(cr,uid,vals_lines)
+ return True
+
+ def _default_get_move_form_hook(self, cursor, user, data):
+ '''Called in the end of default_get method for manual entry in account_move form'''
+ if data.has_key('analytic_account_id'):
+ del(data['analytic_account_id'])
+ if data.has_key('account_tax_id'):
+ del(data['account_tax_id'])
+ return data
+
def _default_get(self, cr, uid, fields, context={}):
# Compute simple values
data = super(account_move_line, self).default_get(cr, uid, fields, context)
@@ -86,6 +114,7 @@ class account_move_line(osv.osv):
s = -total_new
data['debit'] = s>0 and s or 0.0
data['credit'] = s<0 and -s or 0.0
+ data = self._default_get_move_form_hook(cr, uid, data)
return data
# Ends: Manual entry from account.move form
@@ -278,6 +307,8 @@ class account_move_line(osv.osv):
_columns = {
'name': fields.char('Name', size=64, required=True),
'quantity': fields.float('Quantity', digits=(16,2), help="The optional quantity expressed by this line, eg: number of product sold. The quantity is not a legal requirement but is very usefull for some reports."),
+ 'product_uom_id': fields.many2one('product.uom', 'UoM'),
+ 'product_id': fields.many2one('product.product', 'Product'),
'debit': fields.float('Debit', digits=(16,2)),
'credit': fields.float('Credit', digits=(16,2)),
'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade", domain=[('type','<>','view'), ('type', '<>', 'closed')], select=2),
@@ -863,7 +894,7 @@ class account_move_line(osv.osv):
'account_tax_id': False,
'tax_code_id': tax[tax_code],
'tax_amount': tax[tax_sign] * abs(tax['amount']),
- 'account_id': tax[account_id],
+ 'account_id': tax[account_id] or vals['account_id'],
'credit': tax['amount']<0 and -tax['amount'] or 0.0,
'debit': tax['amount']>0 and tax['amount'] or 0.0,
}
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index f84f5181342..c64eff8a8d8 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -247,10 +247,14 @@
form
diff --git a/addons/account/demo/account_minimal.xml b/addons/account/demo/account_minimal.xml
index d36d10b374f..a8c8b75b88c 100644
--- a/addons/account/demo/account_minimal.xml
+++ b/addons/account/demo/account_minimal.xml
@@ -171,6 +171,18 @@ your own chart of account.
+
+ x Sales Credit Note Journal
+ SCNJ
+ sale
+ True
+
+
+
+
+
+
+
x Expenses Journal
EXJ
@@ -181,6 +193,17 @@ your own chart of account.
+
+ x Expenses Credit Notes Journal
+ ECNJ
+ purchase
+ True
+
+
+
+
+
+
x Bank Journal
@@ -192,6 +215,16 @@ your own chart of account.
+
+ x Checks Journal
+ CHK
+ cash
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/account/process/statement_process.xml b/addons/account/process/statement_process.xml
index 3ee13ace8d5..89710174453 100644
--- a/addons/account/process/statement_process.xml
+++ b/addons/account/process/statement_process.xml
@@ -26,6 +26,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -43,47 +54,24 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -95,6 +83,15 @@
+
+
+
+
+
+
+
+
+
@@ -110,28 +107,10 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -141,9 +120,11 @@
-
+
+
+
diff --git a/addons/account/process/supplier_invoice_process.xml b/addons/account/process/supplier_invoice_process.xml
new file mode 100644
index 00000000000..e43ee096ebc
--- /dev/null
+++ b/addons/account/process/supplier_invoice_process.xml
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/account_analytic_plans/account_analytic_plans.py b/addons/account_analytic_plans/account_analytic_plans.py
index b1e61d29cd7..55ee01770b5 100644
--- a/addons/account_analytic_plans/account_analytic_plans.py
+++ b/addons/account_analytic_plans/account_analytic_plans.py
@@ -280,28 +280,29 @@ class account_move_line(osv.osv):
'analytics_id':fields.many2one('account.analytic.plan.instance','Analytic Distribution'),
}
- def _analytic_update(self, cr, uid, ids, context):
- if self.called:
- self.called=False
- return False
+ def _default_get_move_form_hook(self, cursor, user, data):
+ data = super(account_move_line, self)._default_get_move_form_hook(cursor, user, data)
+ if data.has_key('analytics_id'):
+ del(data['analytics_id'])
+ return data
- obj_line=self.pool.get('account.analytic.line')
-
- for line in self.browse(cr, uid, ids, context):
+ def create_analytic_lines(self, cr, uid, ids, context={}):
+ super(account_move_line, self).create_analytic_lines(cr, uid, ids, context)
+ for line in self.browse(cr, uid, ids, context):
if line.analytics_id:
- toremove = obj_line.search(cr, uid, [('move_id','=',line.id)], context=context)
+ toremove = self.pool.get('account.analytic.line').search(cr, uid, [('move_id','=',line.id)], context=context)
if toremove:
- obj_line.unlink(cr, uid, toremove, context=context)
-
+ obj_line.unlink(cr, uid, toremove, context=context)
for line2 in line.analytics_id.account_ids:
- val = (line.debit or 0.0) - (line.credit or 0.0)
+ val = (line.credit or 0.0) - (line.debit or 0.0)
amt=val * (line2.rate/100)
al_vals={
'name': line.name,
'date': line.date,
- 'unit_amount':1,
- 'product_id':12,
'account_id': line2.analytic_account_id.id,
+ 'unit_amount': line.quantity,
+ 'product_id': line.product_id and line.product_id.id or False,
+ 'product_uom_id': line.product_uom_id and line.product_uom_id.id or False,
'amount': amt,
'general_account_id': line.account_id.id,
'move_id': line.id,
@@ -309,25 +310,7 @@ class account_move_line(osv.osv):
'ref': line.ref,
}
ali_id=self.pool.get('account.analytic.line').create(cr,uid,al_vals)
- self.called=True
- return True
-
- def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
- self.called=False
- if ('analytics_id' in vals) and (not vals['analytics_id']):
- for line in self.browse(cr, uid, ids, context):
- toremove = self.pool.get('account.analytic.line').search(cr, uid, [('move_id','=',line.id)], context=context)
- if toremove:
- self.pool.get('account.analytic.line').unlink(cr, uid, toremove, context=context)
- result = super(account_move_line, self).write(cr, uid, ids, vals, context, check, update_check)
- self._analytic_update(cr, uid, ids, context)
- return result
-
- def create(self, cr, uid, vals, context=None, check=True):
- self.called=False
- result = super(account_move_line, self).create(cr, uid, vals, context, check)
- self._analytic_update(cr, uid, [result], context)
- return result
+ return True
account_move_line()
diff --git a/addons/account_analytic_plans/account_analytic_plans_view.xml b/addons/account_analytic_plans/account_analytic_plans_view.xml
index 4bb55187891..acd8debb18b 100644
--- a/addons/account_analytic_plans/account_analytic_plans_view.xml
+++ b/addons/account_analytic_plans/account_analytic_plans_view.xml
@@ -17,6 +17,27 @@
+
+ account.move.form.inherit
+ account.move
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
account.move.line.form.inherit
account.move.line
@@ -29,17 +50,6 @@
-
- account.move.line.tree.inherit
- account.move.line
- tree
-
-
-
-
-
-
-
@@ -68,6 +78,7 @@
+
account.analytic.plan.instance.form
account.analytic.plan.instance
@@ -88,7 +99,6 @@
-
account.analytic.plan.instance.tree
account.analytic.plan.instance
diff --git a/addons/account_report/wizard/wizard_print_indicators_with_pdf.py b/addons/account_report/wizard/wizard_print_indicators_with_pdf.py
index 2371f912b62..5acf794579e 100644
--- a/addons/account_report/wizard/wizard_print_indicators_with_pdf.py
+++ b/addons/account_report/wizard/wizard_print_indicators_with_pdf.py
@@ -41,7 +41,7 @@ form = '''
'''
fields = {
- 'file': {'string':'Select a PDF File', 'type':'binary','required':True,'filters':['*.pdf']},
+ 'file': {'string':'Select a PDF File', 'type':'binary','required':True,'filters':'*.pdf'},
}
@@ -82,6 +82,7 @@ class report_custom(report_int):
obj_user=pool.get('res.users').browse(cr,uid,uid)
self.list['printing_user']=obj_user.name
self.list['company_name']=obj_user.company_id.name
+ self.list['company_country']=obj_user.company_id.partner_id.country
self.list['company_vat']=obj_user.company_id.partner_id.vat
self.list['printing_time']=time.strftime('%H:%M:%S')
self.list['printing_date']=time.strftime('%D')
diff --git a/addons/base_contact/__terp__.py b/addons/base_contact/__terp__.py
index b8a419e1ee9..581dfe8b26b 100644
--- a/addons/base_contact/__terp__.py
+++ b/addons/base_contact/__terp__.py
@@ -40,14 +40,15 @@
Pay attention that this module converts the existing addresses into "addresses + contacts". It means that some fields of the addresses will be missing (like the contact name), since these are supposed to be defined in an other object.
""",
- "depends" : ["base"],
+ "depends" : ["base", "process"],
"init_xml" : [],
"demo_xml" : [
"base_contact_demo.xml"
],
"update_xml" : [
"security/ir.model.access.csv",
- 'base_contact_view.xml'
+ 'base_contact_view.xml',
+ "process/base_contact_process.xml"
],
"active": False,
"installable": True
diff --git a/addons/base_contact/base_contact.py b/addons/base_contact/base_contact.py
index 8b91e9b671c..9fa43c42e43 100644
--- a/addons/base_contact/base_contact.py
+++ b/addons/base_contact/base_contact.py
@@ -116,9 +116,9 @@ class res_partner_job(osv.osv):
_order = 'sequence_contact'
_columns = {
'name': fields.related('address_id','partner_id', type='many2one', relation='res.partner', string='Partner'),
- 'address_id':fields.many2one('res.partner.address','Address', required=True),
- 'contact_id':fields.many2one('res.partner.contact','Contact', required=True),
- 'function_id': fields.many2one('res.partner.function','Job Title', required=True),
+ 'address_id':fields.many2one('res.partner.address','Address'),
+ 'contact_id':fields.many2one('res.partner.contact','Contact', required=True, ondelete='cascade'),
+ 'function_id': fields.many2one('res.partner.function','Job Title'),
'sequence_contact':fields.integer('Sequence (Contact)',help='order of importance of this address in the list of addresses of the linked contact'),
'sequence_partner':fields.integer('Sequence (Partner)',help='order of importance of this job title in the list of job title of the linked partner'),
'email': fields.char('E-Mail', size=240),
diff --git a/addons/base_contact/process/base_contact_process.xml b/addons/base_contact/process/base_contact_process.xml
new file mode 100644
index 00000000000..c446e91b104
--- /dev/null
+++ b/addons/base_contact/process/base_contact_process.xml
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/base_module_record/base_module_record.py b/addons/base_module_record/base_module_record.py
index 109f1b4e0ae..69bc308c155 100644
--- a/addons/base_module_record/base_module_record.py
+++ b/addons/base_module_record/base_module_record.py
@@ -232,6 +232,21 @@ class base_module_record(osv.osv):
del result[v]
return result
+ def _create_function(self, cr, uid, doc, model, name, record_id):
+ print 'Create Function', model, name, record_id
+
+ record = doc.createElement('function')
+ record.setAttribute("name", name)
+ record.setAttribute("model", model)
+ record_list = [record]
+
+ value = doc.createElement('value')
+ value.setAttribute('eval', '[ref(\'%s\')]' % (record_id, ))
+ value.setAttribute('model', model)
+
+ record.appendChild(value)
+ return record_list, False
+
def _generate_object_xml(self, cr, uid, rec, recv, doc, result=None):
record_list = []
noupdate = False
@@ -245,6 +260,16 @@ class base_module_record(osv.osv):
noupdate = noupdate or update
record_list += record
+ elif rec[4] in ('menu_create',):
+ for id in rec[5]:
+ id,update = self._get_id(cr, uid, rec[3], id)
+ noupdate = noupdate or update
+ if not id:
+ continue
+ record,update = self._create_function(cr, uid, doc, rec[3], rec[4], id)
+ noupdate = noupdate or update
+ record_list += record
+
elif rec[4]=='create':
id = self._create_id(cr, uid, rec[3],rec[5])
record,noupdate = self._create_record(cr, uid, doc, rec[3], rec[5], id)
diff --git a/addons/base_report_creator/base_report_creator.py b/addons/base_report_creator/base_report_creator.py
index 817a03e2181..8dcc10b025b 100644
--- a/addons/base_report_creator/base_report_creator.py
+++ b/addons/base_report_creator/base_report_creator.py
@@ -306,7 +306,7 @@ from
def _aggregation_error(self, cr, uid, ids):
aggregate_columns = ('int','float')
- apply_functions = ('sum','min','max','avg')
+ apply_functions = ('sum','min','max','avg','count')
this_objs = self.browse(cr, uid, ids)
for obj in this_objs:
for fld in obj.field_ids:
@@ -349,7 +349,7 @@ class report_creator_field(osv.osv):
'sequence': fields.integer('Sequence'),
'field_id': fields.many2one('ir.model.fields', 'Field'),
'report_id': fields.many2one('base_report_creator.report','Report', on_delete='cascade'),
- 'group_method': fields.selection([('group','Grouped'),('sum','Sum'),('min','Minimum'),('max','Maximum'),('avg','Average')], 'Grouping Method', required=True),
+ 'group_method': fields.selection([('group','Grouped'),('sum','Sum'),('min','Minimum'),('count','Count'),('max','Maximum'),('avg','Average')], 'Grouping Method', required=True),
'graph_mode': fields.selection([('','/'),('x','X Axis'),('y','Y Axis')], 'Graph Mode'),
'calendar_mode': fields.selection([('','/'),('date_start','Starting Date'),('date_end','Ending Date'),('date_delay','Delay'),('color','Uniq Colors')], 'Calendar Mode'),
}
diff --git a/addons/base_vat/partner.py b/addons/base_vat/partner.py
index ffcd070cc6b..f0430807625 100644
--- a/addons/base_vat/partner.py
+++ b/addons/base_vat/partner.py
@@ -30,6 +30,9 @@
from osv import osv
from osv import fields
+def mult_add(i, j):
+ """Sum each digits of the multiplication of i and j."""
+ return reduce(lambda x, y: x + int(y), str(i*j), 0)
class res_partner(osv.osv):
_inherit = 'res.partner'
diff --git a/addons/crm_configuration/__terp__.py b/addons/crm_configuration/__terp__.py
index 881b7595162..7c2350ff420 100644
--- a/addons/crm_configuration/__terp__.py
+++ b/addons/crm_configuration/__terp__.py
@@ -78,7 +78,7 @@ meetings, eso.
# "crm_phonecall_data.xml",
# "crm_phonecall_menu.xml",
"security/ir.model.access.csv",
- "process/crm_configuration_process.xml",
+# "process/crm_configuration_process.xml",
],
"active": False,
"installable": True
diff --git a/addons/crm_configuration/process/crm_configuration_process.xml b/addons/crm_configuration/process/crm_configuration_process.xml
index 84155528f92..2218610390e 100644
--- a/addons/crm_configuration/process/crm_configuration_process.xml
+++ b/addons/crm_configuration/process/crm_configuration_process.xml
@@ -1,106 +1,132 @@
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
\ No newline at end of file
diff --git a/addons/document/document_view.xml b/addons/document/document_view.xml
index 2d76d88341c..7aba2d56431 100644
--- a/addons/document/document_view.xml
+++ b/addons/document/document_view.xml
@@ -113,8 +113,8 @@
-
-
+
+
@@ -125,7 +125,7 @@
-
+
@@ -151,7 +151,7 @@
-
+
diff --git a/addons/document/ftpserver/__init__.py b/addons/document/ftpserver/__init__.py
index 62c9191497d..f4b12525426 100644
--- a/addons/document/ftpserver/__init__.py
+++ b/addons/document/ftpserver/__init__.py
@@ -2,20 +2,30 @@ import threading
import ftpserver
import authorizer
import abstracted_fs
+import netsvc
PORT = 8021
HOST = ''
class ftp_server(threading.Thread):
- def run(self):
- autho = authorizer.authorizer()
- ftpserver.FTPHandler.authorizer = autho
- ftpserver.max_cons = 300
- ftpserver.max_cons_per_ip = 50
- ftpserver.FTPHandler.abstracted_fs = abstracted_fs.abstracted_fs
- address = (HOST, PORT)
- ftpd = ftpserver.FTPServer(address, ftpserver.FTPHandler)
- ftpd.serve_forever()
+ def log(self, level, message):
+ logger = netsvc.Logger()
+ logger.notifyChannel('FTP', level, message)
+
+ def run(self):
+ autho = authorizer.authorizer()
+ ftpserver.FTPHandler.authorizer = autho
+ ftpserver.max_cons = 300
+ ftpserver.max_cons_per_ip = 50
+ ftpserver.FTPHandler.abstracted_fs = abstracted_fs.abstracted_fs
+
+ ftpserver.log = lambda msg: self.log(netsvc.LOG_INFO, msg)
+ ftpserver.logline = lambda msg: None
+ ftpserver.logerror = lambda msg: self.log(netsvc.LOG_ERROR, msg)
+
+ address = (HOST, PORT)
+ ftpd = ftpserver.FTPServer(address, ftpserver.FTPHandler)
+ ftpd.serve_forever()
ds = ftp_server()
ds.start()
diff --git a/addons/document/ftpserver/abstracted_fs.py b/addons/document/ftpserver/abstracted_fs.py
index fe624da7de4..4c0183122b8 100644
--- a/addons/document/ftpserver/abstracted_fs.py
+++ b/addons/document/ftpserver/abstracted_fs.py
@@ -12,6 +12,10 @@ import netsvc
import os
from service import security
+def log(message):
+ logger = netsvc.Logger()
+ logger.notifyChannel('DMS', netsvc.LOG_ERROR, message)
+
class file_wrapper(StringIO.StringIO):
def __init__(self, sstr='', ressource_id=False, dbname=None, uid=1, name=''):
StringIO.StringIO.__init__(self, sstr)
@@ -68,15 +72,25 @@ class abstracted_fs:
def db_list(self):
s = netsvc.LocalService('db')
result = s.list()
- self.db_name_list=[]
+ self.db_name_list = []
for db_name in result:
- db = pooler.get_db_only(db_name)
- cr = db.cursor()
- cr.execute("select id from ir_module_module where name like 'document%' and state='installed' ")
- res=cr.fetchone()
- if res and len(res):
- self.db_name_list.append(db_name)
- cr.close()
+ db, cr = None, None
+ try:
+ db = pooler.get_db_only(db_name)
+ cr = db.cursor()
+ cr.execute("SELECT 1 FROM pg_class WHERE relkind = 'r' AND relname = 'ir_module_module'")
+ if not cr.fetchone():
+ continue
+
+ cr.execute("select id from ir_module_module where name like 'document%' and state='installed' ")
+ res = cr.fetchone()
+ if res and len(res):
+ self.db_name_list.append(db_name)
+ finally:
+ if cr is not None:
+ cr.close()
+ if db is not None:
+ pooler.close_db(db_name)
return self.db_name_list
# Ok
@@ -210,7 +224,7 @@ class abstracted_fs:
s = file_wrapper('', cid, cr.dbname, uid, )
return s
except Exception,e:
- print e
+ log(e)
raise OSError(1, 'Operation not permited.')
# Ok
@@ -305,7 +319,7 @@ class abstracted_fs:
pool.get('document.directory').create(cr, uid, val)
cr.commit()
except Exception,e:
- print e
+ log(e)
raise OSError(1, 'Operation not permited.')
@@ -344,7 +358,6 @@ class abstracted_fs:
for db in self.db_list():
result.append(false_node(db))
return result
- print path.children()
return path.children()
# Ok
@@ -495,7 +508,7 @@ class abstracted_fs:
else:
raise OSError(1, 'Operation not permited.')
except Exception,err:
- print err
+ log(err)
raise OSError(1,'Operation not permited.')
diff --git a/addons/document/ftpserver/ftpserver.py b/addons/document/ftpserver/ftpserver.py
index 814b6820d3c..f8af54fbb1a 100644
--- a/addons/document/ftpserver/ftpserver.py
+++ b/addons/document/ftpserver/ftpserver.py
@@ -1754,7 +1754,6 @@ class FTPHandler(asynchat.async_chat):
- (file) file: the file[-like] object to send (if any).
"""
if self.data_channel:
- print 'DATA', data
self.respond("125 Data connection already open. Transfer starting.")
if file:
self.data_channel.file_obj = file
@@ -2075,10 +2074,8 @@ class FTPHandler(asynchat.async_chat):
self.fs.close_cr(data)
data = ''
if listing:
- print listing
listing.sort()
data = '\r\n'.join(listing) + '\r\n'
- print data
self.log('OK NLST "%s". Transfer starting.' %line)
self.push_dtp_data(data)
diff --git a/addons/hr/process/hr_process.xml b/addons/hr/process/hr_process.xml
index 1afb90f3020..5984ed7e924 100644
--- a/addons/hr/process/hr_process.xml
+++ b/addons/hr/process/hr_process.xml
@@ -17,9 +17,11 @@
-->
+
-
+
@@ -54,11 +56,20 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
@@ -76,7 +87,6 @@
-
diff --git a/addons/hr/security/hr_security.xml b/addons/hr/security/hr_security.xml
index 3001ac6895d..c79aae15dab 100644
--- a/addons/hr/security/hr_security.xml
+++ b/addons/hr/security/hr_security.xml
@@ -4,7 +4,6 @@
Human Resources / Manager
-
Human Resources / User
diff --git a/addons/hr_attendance/__terp__.py b/addons/hr_attendance/__terp__.py
index a3145e67bb7..10abc85aa66 100644
--- a/addons/hr_attendance/__terp__.py
+++ b/addons/hr_attendance/__terp__.py
@@ -28,10 +28,11 @@
"depends" : ["base","hr",],
"demo_xml" : ["hr_attendance_demo.xml"],
"update_xml" : [
+ "security/hr_security.xml",
"hr_attendance_view.xml",
"hr_attendance_wizard.xml",
"hr_attendance_report.xml",
- "security/ir.model.access.csv",
+ "security/ir.model.access.csv"
],
"active": False,
"installable": True,
diff --git a/addons/hr_attendance/hr_attendance_view.xml b/addons/hr_attendance/hr_attendance_view.xml
index 45d11269f48..5ff3c9226d9 100644
--- a/addons/hr_attendance/hr_attendance_view.xml
+++ b/addons/hr_attendance/hr_attendance_view.xml
@@ -48,7 +48,8 @@
form
tree,form
-
+
diff --git a/addons/hr_attendance/hr_attendance_wizard.xml b/addons/hr_attendance/hr_attendance_wizard.xml
index 707e63a4460..27dbe068edb 100644
--- a/addons/hr_attendance/hr_attendance_wizard.xml
+++ b/addons/hr_attendance/hr_attendance_wizard.xml
@@ -5,7 +5,8 @@
-
+
diff --git a/addons/hr_attendance/security/hr_security.xml b/addons/hr_attendance/security/hr_security.xml
new file mode 100644
index 00000000000..7973239ebcf
--- /dev/null
+++ b/addons/hr_attendance/security/hr_security.xml
@@ -0,0 +1,8 @@
+
+
+
+
+ Human Resources / Attendances User
+
+
+
diff --git a/addons/hr_expense/__terp__.py b/addons/hr_expense/__terp__.py
index 7787db5e235..1cb45d7cade 100644
--- a/addons/hr_expense/__terp__.py
+++ b/addons/hr_expense/__terp__.py
@@ -48,6 +48,7 @@
"hr_expense_workflow.xml",
"hr_expense_view.xml",
"hr_expense_report.xml",
+ "process/hr_expense_process.xml"
],
"active": False,
"installable": True
diff --git a/addons/hr_expense/process/hr_expense_process.xml b/addons/hr_expense/process/hr_expense_process.xml
new file mode 100644
index 00000000000..5a00f2dc646
--- /dev/null
+++ b/addons/hr_expense/process/hr_expense_process.xml
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/hr_holidays/process/hr_holidays_process.xml b/addons/hr_holidays/process/hr_holidays_process.xml
index 4cbddc9c423..2cdb83885ab 100644
--- a/addons/hr_holidays/process/hr_holidays_process.xml
+++ b/addons/hr_holidays/process/hr_holidays_process.xml
@@ -2,43 +2,177 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
index 37b53c1f030..7792faeecbb 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
@@ -11,9 +11,9 @@
-
+
-
+
@@ -58,8 +58,8 @@
-
-
+
+
@@ -74,8 +74,8 @@
-
-
+
+
@@ -102,21 +102,21 @@
-
+
-
+
-
-
+
+
@@ -140,9 +140,9 @@
-
+
-
+
diff --git a/addons/membership/__terp__.py b/addons/membership/__terp__.py
index 16172f9f2e4..a40c92eab5a 100644
--- a/addons/membership/__terp__.py
+++ b/addons/membership/__terp__.py
@@ -25,7 +25,7 @@
"author" : "Tiny",
"category" : "Generic Modules/Association",
"depends" : [
- "base", "product", "account",
+ "base", "product", "account","process"
],
"demo_xml" : [
#"demo_data.xml",
@@ -36,7 +36,8 @@
],
"update_xml" : [
"security/ir.model.access.csv",
- "membership_view.xml","membership_wizard.xml"
+ "membership_view.xml","membership_wizard.xml",
+ "process/membership_process.xml"
],
"active" : False,
"installable" : True,
diff --git a/addons/membership/process/membership_process.xml b/addons/membership/process/membership_process.xml
new file mode 100644
index 00000000000..5e4b9e0703b
--- /dev/null
+++ b/addons/membership/process/membership_process.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/mrp/__terp__.py b/addons/mrp/__terp__.py
index 98c88413e3c..9dcaa397b14 100644
--- a/addons/mrp/__terp__.py
+++ b/addons/mrp/__terp__.py
@@ -25,7 +25,7 @@
"author" : "Tiny",
"website" : "http://tinyerp.com/module_mrp.html",
"category" : "Generic Modules/Production",
- "depends" : ["stock", "hr", "purchase", "product", "process"],
+ "depends" : ["stock", "hr", "purchase", "product","process"],
"description": """
This is the base module to manage the manufacturing process in Tiny ERP.
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index f023436172f..c796391342b 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -285,7 +285,7 @@ class mrp_bom(osv.osv):
'workcenter_id': wc.id,
'sequence': level,
'cycle': cycle,
- 'hour': wc_use.hour_nbr + (wc.time_start+wc.time_stop+cycle*wc.time_cycle) * (wc.time_efficiency or 1.0),
+ 'hour': float(wc_use.hour_nbr + (wc.time_start+wc.time_stop+cycle*wc.time_cycle) * (wc.time_efficiency or 1.0)),
})
for bom2 in bom.bom_lines:
res = self._bom_explode(cr, uid, bom2, factor, properties, addthis=True, level=level+10)
@@ -361,6 +361,24 @@ class mrp_production(osv.osv):
res[production['id']]=move.sale_line_id and move.sale_line_id.order_id.client_order_ref or False
return res
+ def _production_calc(self, cr, uid, ids, prop, unknow_none, context={}):
+ result = {}
+ for prod in self.browse(cr, uid, ids, context=context):
+ result[prod.id] = {
+ 'hour_total': 0.0,
+ 'cycle_total': 0.0,
+ }
+ for wc in prod.workcenter_lines:
+ result[prod.id]['hour_total'] += wc.hour
+ result[prod.id]['cycle_total'] += wc.cycle
+ return result
+
+ def _production_date(self, cr, uid, ids, prop, unknow_none, context={}):
+ result = {}
+ for prod in self.browse(cr, uid, ids, context=context):
+ result[prod.id] = prod.date_planned[:10]
+ return result
+
def _sale_name_calc(self, cr, uid, ids, prop, unknow_none, unknow_dict):
return self._get_sale_order(cr,uid,ids,field_name='name')
@@ -383,11 +401,13 @@ class mrp_production(osv.osv):
'location_dest_id': fields.many2one('stock.location', 'Finnished Products Location', required=True,
help="Location where the system will stock the finnished products."),
+ 'date_planned_date': fields.function(_production_date, method=True, type='date', string='Planned Date'),
'date_planned': fields.datetime('Scheduled date', required=True, select=1),
'date_start': fields.datetime('Start Date'),
'date_finnished': fields.datetime('End Date'),
'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)]),
+ 'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null'),
'picking_id': fields.many2one('stock.picking', 'Packing list', readonly=True,
help="This is the internal picking list take bring the raw materials to the production plan."),
@@ -399,6 +419,9 @@ class mrp_production(osv.osv):
'workcenter_lines': fields.one2many('mrp.production.workcenter.line', 'production_id', 'Workcenters Utilisation'),
'state': fields.selection([('draft','Draft'),('picking_except', 'Packing Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Canceled'),('done','Done')],'Status', readonly=True),
+ 'hour_total': fields.function(_production_calc, method=True, type='float', string='Total Hours', multi='workorder'),
+ 'cycle_total': fields.function(_production_calc, method=True, type='float', string='Total Cycles', multi='workorder'),
+
'sale_name': fields.function(_sale_name_calc, method=True, type='char', string='Sale Name'),
'sale_ref': fields.function(_sale_ref_calc, method=True, type='char', string='Sale Ref'),
}
@@ -449,8 +472,9 @@ class mrp_production(osv.osv):
if not bom_point:
bom_id = self.pool.get('mrp.bom')._bom_find(cr, uid, production.product_id.id, production.product_uom.id, properties)
if bom_id:
- self.write(cr, uid, [production.id], {'bom_id': bom_id})
- bom_point = self.pool.get('mrp.bom').browse(cr, uid, [bom_id])[0]
+ bom_point = self.pool.get('mrp.bom').browse(cr, uid, bom_id)
+ routing_id = bom_point.routing_id.id or False
+ self.write(cr, uid, [production.id], {'bom_id': bom_id, 'routing_id': routing_id})
if not bom_id:
raise osv.except_osv('Error', "Couldn't find bill of material for product")
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index 36b5fa11699..dd7552dec86 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -377,9 +377,11 @@
-
+
-
+
+
+
@@ -392,31 +394,49 @@
calendar
-
+
-
+
+
+
+
+ mrp.production.gantt
+ mrp.production
+ gantt
+
+
+
+
+
+
+
+
+
+
+
mrp.production.graph
mrp.production
graph
-
-
+
+
+
-
+
mrp.production.form
mrp.production
@@ -426,7 +446,7 @@
-
+
@@ -443,7 +463,7 @@
-
+
@@ -467,6 +487,8 @@
+
+
@@ -483,17 +505,31 @@
ir.actions.act_window
mrp.production
form
- tree,form,calendar,graph
+ tree,form,calendar,graph,gantt
+
+ Production Orders Planning
+ ir.actions.act_window
+ mrp.production
+ form
+ gantt,tree,form,calendar,graph
+ [('state','in',('ready','confirmed','in_production'))]
+
+
+
Production Orders To Start
ir.actions.act_window
mrp.production
form
- tree,form,calendar,graph
+ tree,form,calendar,graph,gantt
[('state','=','ready')]
@@ -502,7 +538,7 @@
ir.actions.act_window
mrp.production
form
- tree,form,calendar,graph
+ tree,form,calendar,graph,gantt
[('state','=','in_production')]
@@ -511,7 +547,7 @@
ir.actions.act_window
mrp.production
form
- tree,form,calendar,graph
+ tree,form,calendar,graph,gantt
[('state','=','confirmed')]
@@ -521,7 +557,7 @@
ir.actions.act_window
mrp.production
form
- form,tree,calendar,graph
+ form,tree,calendar,graph,gantt
diff --git a/addons/mrp/process/procurement_process.xml b/addons/mrp/process/procurement_process.xml
index 866ad784349..d05eb28eaef 100644
--- a/addons/mrp/process/procurement_process.xml
+++ b/addons/mrp/process/procurement_process.xml
@@ -15,6 +15,16 @@
Process Node
-->
+
+
+
+
+
+
+
+
+
+
@@ -25,26 +35,34 @@
-
-
-
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -80,40 +98,40 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -126,7 +144,7 @@
-
+
@@ -152,8 +170,8 @@
-
-
+
+
@@ -164,14 +182,14 @@
-
-
+
+
-
+
@@ -183,6 +201,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -207,10 +252,10 @@
-
+
-
+
@@ -219,17 +264,7 @@
-
-
-
-
-
-
-
-
-
-
-
+
@@ -239,6 +274,15 @@
+
+
+
+
+
+
+
+
+
@@ -247,22 +291,22 @@
-
-
+
+
-
-
-
-
+
+
+
+
-
+
-
+
@@ -273,19 +317,10 @@
-
+
-
-
-
-
-
-
-
-
-
@@ -304,15 +339,6 @@
-
-
-
-
-
-
-
-
-
@@ -335,34 +361,6 @@
Process Action
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -404,6 +402,6 @@
-
+
\ No newline at end of file
diff --git a/addons/mrp/schedulers.py b/addons/mrp/schedulers.py
index 2d30df02768..cd1ddcd341e 100644
--- a/addons/mrp/schedulers.py
+++ b/addons/mrp/schedulers.py
@@ -188,41 +188,40 @@ class mrp_procurement(osv.osv):
while ids:
ids=orderpoint_obj.search(cr,uid,[],offset=offset,limit=100)
for op in orderpoint_obj.browse(cr, uid, ids):
- try:
- prods = location_obj._product_virtual_get(cr, uid,
- op.location_id.id, [op.product_id.id],
- {'uom': op.product_uom.id})[op.product_id.id]
- if prods < op.product_min_qty:
- qty = max(op.product_min_qty, op.product_max_qty)-prods
- reste = qty % op.qty_multiple
- if reste>0:
- qty += op.qty_multiple-reste
- newdate = DateTime.now() + DateTime.RelativeDateTime(
- days=op.product_id.seller_delay)
- if op.product_id.supply_method == 'buy':
- location_id = op.warehouse_id.lot_input_id
- elif op.product_id.supply_method == 'produce':
- location_id = op.warehouse_id.lot_stock_id
- else:
- continue
- proc_id = procurement_obj.create(cr, uid, {
- 'name': 'OP:'+str(op.id),
- 'date_planned': newdate.strftime('%Y-%m-%d'),
- 'product_id': op.product_id.id,
- 'product_qty': qty,
- 'product_uom': op.product_uom.id,
- 'location_id': op.warehouse_id.lot_input_id.id,
- 'procure_method': 'make_to_order',
- 'origin': op.name
- })
- wf_service.trg_validate(uid, 'mrp.procurement', proc_id,
- 'button_confirm', cr)
- wf_service.trg_validate(uid, 'mrp.procurement', proc_id,
- 'button_check', cr)
- orderpoint_obj.write(cr, uid, [op.id],
- {'procurement_id': proc_id})
- except Exception, e:
- report.append('OP %d:\n%s\n' % (op.id, str(e)))
+ if op.procurement_id and op.procurement_id.purchase_id and op.procurement_id.purchase_id.state in ('draft','confirmed'):
+ continue
+ prods = location_obj._product_virtual_get(cr, uid,
+ op.location_id.id, [op.product_id.id],
+ {'uom': op.product_uom.id})[op.product_id.id]
+ if prods < op.product_min_qty:
+ qty = max(op.product_min_qty, op.product_max_qty)-prods
+ reste = qty % op.qty_multiple
+ if reste>0:
+ qty += op.qty_multiple-reste
+ newdate = DateTime.now() + DateTime.RelativeDateTime(
+ days=op.product_id.seller_delay)
+ if op.product_id.supply_method == 'buy':
+ location_id = op.warehouse_id.lot_input_id
+ elif op.product_id.supply_method == 'produce':
+ location_id = op.warehouse_id.lot_stock_id
+ else:
+ continue
+ proc_id = procurement_obj.create(cr, uid, {
+ 'name': 'OP:'+str(op.id),
+ 'date_planned': newdate.strftime('%Y-%m-%d'),
+ 'product_id': op.product_id.id,
+ 'product_qty': qty,
+ 'product_uom': op.product_uom.id,
+ 'location_id': op.warehouse_id.lot_input_id.id,
+ 'procure_method': 'make_to_order',
+ 'origin': op.name
+ })
+ wf_service.trg_validate(uid, 'mrp.procurement', proc_id,
+ 'button_confirm', cr)
+ wf_service.trg_validate(uid, 'mrp.procurement', proc_id,
+ 'button_check', cr)
+ orderpoint_obj.write(cr, uid, [op.id],
+ {'procurement_id': proc_id})
offset += len(ids)
if use_new_cursor:
cr.commit()
diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py
index 28550179944..789236def0b 100755
--- a/addons/mrp_operations/mrp_operations.py
+++ b/addons/mrp_operations/mrp_operations.py
@@ -54,7 +54,7 @@ class mrp_production_workcenter_line(osv.osv):
}
_defaults = {
'state': lambda *a: 'draft',
- 'delay': lambda *a: '0 Days 00 hrs and 00 mins'
+ 'delay': lambda *a: 0.0
}
def modify_production_order_state(self,cr,uid,ids,action):
diff --git a/addons/product/process/product_process.xml b/addons/product/process/product_process.xml
index d7e985eca7d..1264cf09f33 100644
--- a/addons/product/process/product_process.xml
+++ b/addons/product/process/product_process.xml
@@ -29,38 +29,16 @@
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -72,23 +50,5 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/product/product.py b/addons/product/product.py
index 91f6b71285e..e830ea91cee 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -300,7 +300,7 @@ class product_template(osv.osv):
def _check_uom(self, cursor, user, ids):
for product in self.browse(cursor, user, ids):
- if product.uom_id.id <> product.uom_po_id.id:
+ if product.uom_id.category_id.id <> product.uom_po_id.category_id.id:
return False
return True
diff --git a/addons/project/process/task_process.xml b/addons/project/process/task_process.xml
index f987ba07af3..c5179ff6e23 100644
--- a/addons/project/process/task_process.xml
+++ b/addons/project/process/task_process.xml
@@ -39,7 +39,7 @@
-
+
diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml
index 10e8d067968..9b92f22c2cb 100644
--- a/addons/project/project_view.xml
+++ b/addons/project/project_view.xml
@@ -28,7 +28,7 @@
-
+
diff --git a/addons/project_mrp/process/project_mrp_process.xml b/addons/project_mrp/process/project_mrp_process.xml
index 125d325f223..3d08bd11394 100644
--- a/addons/project_mrp/process/project_mrp_process.xml
+++ b/addons/project_mrp/process/project_mrp_process.xml
@@ -6,12 +6,12 @@
Process Node
-->
-
+
-
-
+
+
@@ -33,35 +33,24 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
+
+
+
+
@@ -79,7 +68,7 @@
-
+
diff --git a/addons/purchase/process/purchase_process.xml b/addons/purchase/process/purchase_process.xml
index 23891fda515..0d17b36dc06 100644
--- a/addons/purchase/process/purchase_process.xml
+++ b/addons/purchase/process/purchase_process.xml
@@ -21,8 +21,8 @@
-
-
+
+
@@ -32,19 +32,30 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -54,8 +65,8 @@
-
-
+
+
@@ -65,8 +76,8 @@
-
-
+
+
@@ -77,8 +88,8 @@
-
-
+
+
@@ -88,14 +99,32 @@
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -122,6 +151,15 @@
+
+
+
+
+
+
+
+
+
@@ -164,7 +202,7 @@
-
+
diff --git a/addons/sale/process/sale_process.xml b/addons/sale/process/sale_process.xml
index 973c39ec2dc..231d1900ff7 100644
--- a/addons/sale/process/sale_process.xml
+++ b/addons/sale/process/sale_process.xml
@@ -1,161 +1,188 @@
-
-
-
+
-
-
+
+
-
-
-
+
-
-
-
+
+
+
- object.state=='draft'
+
-
+
-
-
-
+
+
+
- object.state in ('draft','waiting_date','manual','progress','shipping_except','invoice_except','done','cancel')
+
-
+
-
-
-
+
+
+
- object.state=='draft'
-
+
+
-
-
+
+
+
- object.state in ('waiting_date','manual','progress')
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
- object.state in ('assigned', 'confirmed')
+
+
-
-
-
+
+
+
- object.state in ('done')
+
+
-
-
-
+
+
+
+
+
-
-
-
+
+
+
+
-
-
- object.order_policy=='postpaid'
-
+
+
-
-
-
+
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
@@ -163,103 +190,103 @@
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
-
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 4090262a5b7..52a84c6cfa7 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -204,7 +204,7 @@
-
+
diff --git a/addons/sale_crm/process/sale_crm_process.xml b/addons/sale_crm/process/sale_crm_process.xml
index 6aaa146b250..307b1cfd618 100644
--- a/addons/sale_crm/process/sale_crm_process.xml
+++ b/addons/sale_crm/process/sale_crm_process.xml
@@ -2,25 +2,55 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/stock/__terp__.py b/addons/stock/__terp__.py
index d4a14976c2b..1937aad9428 100644
--- a/addons/stock/__terp__.py
+++ b/addons/stock/__terp__.py
@@ -42,6 +42,7 @@
"report_stock_view.xml",
"security/stock_security.xml",
"security/ir.model.access.csv",
+ "process/stock_process.xml"
],
"active": False,
"installable": True
diff --git a/addons/stock/process/stock_process.xml b/addons/stock/process/stock_process.xml
new file mode 100644
index 00000000000..aef4e3b89aa
--- /dev/null
+++ b/addons/stock/process/stock_process.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 63ecd5a354d..9d71666b104 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -101,7 +101,7 @@ class stock_location(osv.osv):
'child_ids': fields.one2many('stock.location', 'location_id', 'Contains'),
'chained_location_id': fields.many2one('stock.location', 'Chained Location If Fixed'),
- 'chained_location_type': fields.selection([('','None'),('customer', 'Customer'),('fixed','Fixed Location')],
+ 'chained_location_type': fields.selection([('none','None'),('customer', 'Customer'),('fixed','Fixed Location')],
'Chained Location Type', required=True),
'chained_auto_packing': fields.selection(
[('auto','Automatic Move'), ('manual','Manual Operation'),('transparent','Automatic No Step Added')],
@@ -128,7 +128,7 @@ class stock_location(osv.osv):
'active': lambda *a: 1,
'usage': lambda *a: 'internal',
'allocation_method': lambda *a: 'fifo',
- 'chained_location_type': lambda *a: '',
+ 'chained_location_type': lambda *a: 'none',
'chained_auto_packing': lambda *a: 'manual',
'posx': lambda *a: 0,
'posy': lambda *a: 0,
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index 805e49b7509..7c1d96e601b 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -492,7 +492,7 @@
-
+
@@ -804,8 +804,8 @@