Total period:
@@ -152,7 +153,7 @@
- (*) A positive delay means that the employee worked less than recorded.
- (*) A negative delay means that the employee worked more than encoded.
+ (*) A positive delay means that the employee worked less than recorded.
+ (*) A negative delay means that the employee worked more than encoded.
-
+
\ No newline at end of file
diff --git a/addons/hr_contract/__terp__.py b/addons/hr_contract/__terp__.py
index c07e6c55a5a..a03f8140f72 100644
--- a/addons/hr_contract/__terp__.py
+++ b/addons/hr_contract/__terp__.py
@@ -46,7 +46,7 @@
"demo_xml" : [],
"update_xml" : [
"security/hr_contract_security.xml",
- "security/ir.model.access.csv",
+# "security/ir.model.access.csv",
"hr_contract_view.xml",
],
"active": False,
diff --git a/addons/hr_holidays/__terp__.py b/addons/hr_holidays/__terp__.py
index dd4d6d796a5..6f3188d6acf 100644
--- a/addons/hr_holidays/__terp__.py
+++ b/addons/hr_holidays/__terp__.py
@@ -24,7 +24,7 @@
Administration \ Users \ Users
for example, you maybe will do it for the user 'admin'.
""",
- "depends" : ["hr","crm_configuration"],
+ "depends" : ["hr","crm_configuration", "process"],
"init_xml" : [],
"update_xml" : [
"security/ir.model.access.csv",
@@ -32,6 +32,7 @@
"hr_view.xml",
"hr_holidays_report.xml",
"hr_holidays_wizard.xml",
+# "process/hr_holidays_process.xml"
],
# "demo_xml" : ["hr_bel_holidays_2008.xml",],
"demo_xml" : [],
diff --git a/addons/hr_holidays/wizard/holidays_summary.py b/addons/hr_holidays/wizard/holidays_summary.py
index abea600b580..ac37fc4b081 100644
--- a/addons/hr_holidays/wizard/holidays_summary.py
+++ b/addons/hr_holidays/wizard/holidays_summary.py
@@ -43,7 +43,7 @@ form='''
zero_form='''
'''
zero_fields={
diff --git a/addons/hr_timesheet/__terp__.py b/addons/hr_timesheet/__terp__.py
index 1004f06d903..fd84f3fb051 100644
--- a/addons/hr_timesheet/__terp__.py
+++ b/addons/hr_timesheet/__terp__.py
@@ -43,7 +43,7 @@ Lots of reporting on time and employee tracking are provided.
It is completly integrated with the cost accounting module. It allows you
to set up a management by affair.
""",
- "depends" : ["account", "hr", "base", "hr_attendance"],
+ "depends" : ["account", "hr", "base", "hr_attendance", "process"],
"init_xml" : ["hr_timesheet_data.xml"],
"demo_xml" : ["hr_timesheet_demo.xml",],
"update_xml" : [
@@ -51,6 +51,7 @@ to set up a management by affair.
"hr_timesheet_view.xml",
"hr_timesheet_report.xml",
"hr_timesheet_wizard.xml",
+ "process/hr_timesheet_process.xml"
],
"active": False,
"installable": True
diff --git a/addons/hr_timesheet/process/hr_timesheet_process.xml b/addons/hr_timesheet/process/hr_timesheet_process.xml
new file mode 100644
index 00000000000..2df39b8a78c
--- /dev/null
+++ b/addons/hr_timesheet/process/hr_timesheet_process.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/hr_timesheet_project/__terp__.py b/addons/hr_timesheet_project/__terp__.py
index bc2db6c0d8c..06922784d56 100644
--- a/addons/hr_timesheet_project/__terp__.py
+++ b/addons/hr_timesheet_project/__terp__.py
@@ -33,8 +33,8 @@
"category" : "Generic Modules/Human Resources",
"description": """Auto-complete timesheet based on tasks made on the project management module.""",
"website" : "http://tinyerp.com/module_hr.html",
- "depends" : ["project", "hr_timesheet"],
- "update_xml" : ["hr_timesheet_project_view.xml"],
+ "depends" : ["project", "hr_timesheet_sheet"],
+ "update_xml" : ["hr_timesheet_project_view.xml", "process/hr_timesheet_project_process.xml"],
"active": False,
"installable": True
}
diff --git a/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml b/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml
new file mode 100644
index 00000000000..d514b14bf17
--- /dev/null
+++ b/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/hr_timesheet_sheet/__terp__.py b/addons/hr_timesheet_sheet/__terp__.py
index 4c307a5af33..f09a7d63978 100644
--- a/addons/hr_timesheet_sheet/__terp__.py
+++ b/addons/hr_timesheet_sheet/__terp__.py
@@ -51,13 +51,14 @@ The validation can be configured in te company:
* Period size (day, week, month, year)
* Maximal difference between timesheet and attendances
""",
- "depends" : ["hr_timesheet", "hr_timesheet_invoice"],
+ "depends" : ["hr_timesheet", "hr_timesheet_invoice", "process"],
"init_xml" : [],
"demo_xml" : ["hr_timesheet_sheet_demo.xml",],
"update_xml" : [
"security/ir.model.access.csv",
"hr_timesheet_sheet_view.xml",
- "hr_timesheet_workflow.xml"
+ "hr_timesheet_workflow.xml",
+ "process/hr_timesheet_sheet_process.xml",
],
"active": False,
"installable": True
diff --git a/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml b/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml
new file mode 100644
index 00000000000..24374c2a810
--- /dev/null
+++ b/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml
@@ -0,0 +1,226 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/idea/__terp__.py b/addons/idea/__terp__.py
index be8b9d8b776..d31ea7441e4 100644
--- a/addons/idea/__terp__.py
+++ b/addons/idea/__terp__.py
@@ -1,4 +1,5 @@
# -*- encoding: utf-8 -*-
+
{
"name" : "Idea Manager",
"version" : "0.1",
diff --git a/addons/l10n_be/__terp__.py b/addons/l10n_be/__terp__.py
index bf3ebe7cbb3..12a55fea2e2 100644
--- a/addons/l10n_be/__terp__.py
+++ b/addons/l10n_be/__terp__.py
@@ -30,7 +30,7 @@
"name" : "Belgium - Plan Comptable Minimum Normalise",
"version" : "1.1",
"author" : "Tiny",
- "category" : "Localisation/Account charts",
+ "category" : "Localisation/Account Charts",
"depends" : ["account", "account_report", "base_vat", "base_iban",
"account_chart"],
"init_xml" : [],
diff --git a/addons/l10n_be/l10n_be_wizard.xml b/addons/l10n_be/l10n_be_wizard.xml
index 296cdfefa65..453c35f1685 100644
--- a/addons/l10n_be/l10n_be_wizard.xml
+++ b/addons/l10n_be/l10n_be_wizard.xml
@@ -1,36 +1,38 @@
-
-
-
-
+
+
+
-
+
+
-
- Generate Chart of Accounts from a Chart Template
- Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
+
+ Generate Chart of Accounts from a Chart Template
+ Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Managament/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.
-
- open
+
+ open
-
+
diff --git a/addons/l10n_be/wizard/account_vat_declaration.py b/addons/l10n_be/wizard/account_vat_declaration.py
index cd673b3e482..f71121adf57 100644
--- a/addons/l10n_be/wizard/account_vat_declaration.py
+++ b/addons/l10n_be/wizard/account_vat_declaration.py
@@ -98,4 +98,4 @@ class wizard_vat_declaration(wizard.interface):
}
}
-wizard_vat_declaration('wizard.account.vat.declaration')
+wizard_vat_declaration('wizard.account.xml.vat.declaration')
diff --git a/addons/mrp/__terp__.py b/addons/mrp/__terp__.py
index 8fa15f145fd..cbba88cd2bf 100644
--- a/addons/mrp/__terp__.py
+++ b/addons/mrp/__terp__.py
@@ -32,7 +32,7 @@
"author" : "Tiny",
"website" : "http://tinyerp.com/module_mrp.html",
"category" : "Generic Modules/Production",
- "depends" : ["stock", "hr", "purchase", "product"],
+ "depends" : ["stock", "hr", "purchase", "product", "process"],
"description": """
This is the base module to manage the manufacturing process in Tiny ERP.
@@ -47,7 +47,8 @@
* Cost method by product: standard price, average price
* Easy analysis of troubles or needs
* Very flexible
-
+ * Allows to browse Bill of Materials in complete structure
+ that include child and phantom BoMs
It supports complete integration and planification of stockable goods,
consumable of services. Services are completly integrated with the rest
of the software. For instance, you can set up a sub-contracting service
@@ -70,6 +71,7 @@
"mrp_wizard.xml",
"mrp_report.xml",
"company_view.xml",
+ "process/procurement_process.xml",
],
"active": False,
"installable": True
diff --git a/addons/mrp/i18n/fr_FR.po b/addons/mrp/i18n/fr_FR.po
index d031b2ae17c..3e96a958e75 100644
--- a/addons/mrp/i18n/fr_FR.po
+++ b/addons/mrp/i18n/fr_FR.po
@@ -1205,7 +1205,7 @@ msgstr "Index numériques"
#. module: mrp
#: field:mrp.routing,location_id:0
msgid "Production Location"
-msgstr "Emplacement de production\\""
+msgstr "Emplacement de production"
#. module: mrp
#: selection:stock.warehouse.orderpoint,logic:0
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index 11aad76fc40..4891ea146b9 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -39,7 +39,7 @@ from mx import DateTime
#----------------------------------------------------------
# Workcenters
#----------------------------------------------------------
-# capacity_hour : capacity per hour. default: 1.0.
+# capacity_hour : capacity per hour. default: 1.0.
# Eg: If 5 concurrent operations at one time: capacity = 5 (because 5 employees)
# unit_per_cycle : how many units are produced for one cycle
#
@@ -115,7 +115,7 @@ class mrp_routing(osv.osv):
'note': fields.text('Description'),
'workcenter_lines': fields.one2many('mrp.routing.workcenter', 'routing_id', 'Workcenters'),
- 'location_id': fields.many2one('stock.location', 'Production Location',
+ 'location_id': fields.many2one('stock.location', 'Production Location',
help="Keep empty if you produce at the location where the finnished products are needed." \
"Put a location if you produce at a fixed location. This can be a partner location " \
"if you subcontract the manufacturing operations."
@@ -147,11 +147,39 @@ mrp_routing_workcenter()
class mrp_bom(osv.osv):
_name = 'mrp.bom'
_description = 'Bill of Material'
+ def _child_compute(self, cr, uid, ids, name, arg, context={}):
+ result = {}
+ for bom in self.browse(cr, uid, ids, context=context):
+ result[bom.id] = map(lambda x: x.id, bom.bom_lines)
+ ok = ((name=='child_complete_ids') and (bom.product_id.supply_method=='produce'))
+ if bom.type=='phantom' or ok:
+ sids = self.pool.get('mrp.bom').search(cr, uid, [('bom_id','=',False),('product_id','=',bom.product_id.id)])
+ if sids:
+ bom2 = self.pool.get('mrp.bom').browse(cr, uid, sids[0], context=context)
+ result[bom.id] += map(lambda x: x.id, bom2.bom_lines)
+ return result
+ def _compute_type(self, cr, uid, ids, field_name, arg, context):
+ res = dict(map(lambda x: (x,''), ids))
+ for line in self.browse(cr, uid, ids):
+ if line.type=='phantom' and not line.bom_id:
+ res[line.id] = 'set'
+ continue
+ if line.bom_lines or line.type=='phantom':
+ continue
+ if line.product_id.supply_method=='produce':
+ if line.product_id.procure_method=='make_to_stock':
+ res[line.id] = 'stock'
+ else:
+ res[line.id] = 'order'
+ return res
_columns = {
'name': fields.char('Name', size=64, required=True),
'code': fields.char('Code', size=16),
'active': fields.boolean('Active'),
'type': fields.selection([('normal','Normal BoM'),('phantom','Sets / Phantom')], 'BoM Type', required=True, help="Use a phantom bill of material in lines that have a sub-bom and that have to be automatically computed in one line, without having two production orders."),
+
+ 'method': fields.function(_compute_type, string='Method', method=True, type='selection', selection=[('',''),('stock','On Stock'),('order','On Order'),('set','Set / Pack')]),
+
'date_start': fields.date('Valid From', help="Validity of this BoM or component. Keep empty if it's always valid."),
'date_stop': fields.date('Valid Until', help="Validity of this BoM or component. Keep empty if it's always valid."),
'sequence': fields.integer('Sequence'),
@@ -168,7 +196,9 @@ class mrp_bom(osv.osv):
'routing_id': fields.many2one('mrp.routing', 'Routing', help="The list of operations (list of workcenters) to produce the finnished product. The routing is mainly used to compute workcenter costs during operations and to plan futur loads on workcenters based on production plannification."),
'property_ids': fields.many2many('mrp.property', 'mrp_bom_property_rel', 'bom_id','property_id', 'Properties'),
'revision_ids': fields.one2many('mrp.bom.revision', 'bom_id', 'BoM Revisions'),
- 'revision_type': fields.selection([('numeric','numeric indices'),('alpha','alphabetical indices')], 'indice type')
+ 'revision_type': fields.selection([('numeric','numeric indices'),('alpha','alphabetical indices')], 'indice type'),
+ 'child_ids': fields.function(_child_compute,relation='mrp.bom', method=True, string="BoM Hyerarchy", type='many2many'),
+ 'child_complete_ids': fields.function(_child_compute,relation='mrp.bom', method=True, string="BoM Hyerarchy", type='many2many')
}
_defaults = {
'active': lambda *a: 1,
@@ -181,6 +211,7 @@ class mrp_bom(osv.osv):
_sql_constraints = [
('bom_qty_zero', 'CHECK (product_qty>0)', 'All product quantities must be greater than 0 !'),
]
+
def _check_recursion(self, cr, uid, ids):
level = 500
while len(ids):
@@ -194,7 +225,7 @@ class mrp_bom(osv.osv):
(_check_recursion, 'Error ! You can not create recursive BoM.', ['parent_id'])
]
-
+
def onchange_product_id(self, cr, uid, ids, product_id, name, context={}):
if product_id:
prod=self.pool.get('product.product').browse(cr,uid,[product_id])[0]
@@ -266,7 +297,7 @@ class mrp_bom(osv.osv):
def set_indices(self, cr, uid, ids, context = {}):
if not ids or (ids and not ids[0]):
- return True
+ return True
res = self.read(cr, uid, ids, ['revision_ids', 'revision_type'])
rev_ids = res[0]['revision_ids']
idx = 1
@@ -293,7 +324,7 @@ class mrp_bom_revision(osv.osv):
'author_id': fields.many2one('res.users', 'Author'),
'bom_id': fields.many2one('mrp.bom', 'BoM', select=True),
}
-
+
_defaults = {
'author_id': lambda x,y,z,c: z,
'date': lambda *a: time.strftime('%Y-%m-%d'),
@@ -378,6 +409,13 @@ class mrp_production(osv.osv):
}
_order = 'date_planned asc, priority desc';
+ def location_id_change(self, cr, uid, ids, src, dest, context={}):
+ if dest:
+ return {}
+ if src:
+ return {'value': {'location_dest_id': src}}
+ return {}
+
def product_id_change(self, cr, uid, ids, product):
if not product:
return {}
@@ -579,7 +617,7 @@ class mrp_production(osv.osv):
'state': 'waiting'
}
res_final_id = self.pool.get('stock.move').create(cr, uid, data)
-
+
self.write(cr, uid, [production.id], {'move_created_ids': [(6, 'WTF', [res_final_id])]})
moves = []
for line in production.product_lines:
@@ -949,14 +987,14 @@ class mrp_procurement(osv.osv):
newdate = newdate - DateTime.RelativeDateTime(days=company.po_lead)
context.update({'lang':partner.lang})
product=self.pool.get('product.product').browse(cr,uid,procurement.product_id.id,context=context)
-
+
line = {
'name': product.name,
'product_qty': qty,
'product_id': procurement.product_id.id,
'product_uom': uom_id,
'price_unit': price,
- 'date_planned': newdate.strftime('%Y-%m-%d %H:%M:%S'),
+ 'date_planned': newdate.strftime('%Y-%m-%d %H:%M:%S'),
'move_dest_id': res_id,
'notes':product.description_purchase,
}
@@ -967,7 +1005,7 @@ class mrp_procurement(osv.osv):
if partner_id:
taxep_id = self.pool.get('res.partner').property_get(cr, uid,partner_id,property_pref=['property_account_supplier_tax']).get('property_account_supplier_tax',False)
if taxep_id:
- taxep=self.pool.get('account.tax').browse(cr, uid,taxep_id)
+ taxep=self.pool.get('account.tax').browse(cr, uid,taxep_id)
if not taxep or not taxep.id:
taxes_ids = [x.id for x in procurement.product_id.product_tmpl_id.supplier_taxes_id]
else:
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index f9b7fb72734..bec2216b0c5 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -1,13 +1,13 @@
-
+
-
+
-
+
mrp.property.group.form
mrp.property.group
@@ -30,7 +30,7 @@
-
+
mrp.property.tree
mrp.property
@@ -66,11 +66,11 @@
tree,form
-
+
-
+
mrp.workcenter.tree
mrp.workcenter
@@ -88,13 +88,13 @@
form
-
+
-
+
mrp.routing.workcenter.tree
mrp.routing.workcenter
@@ -147,7 +147,7 @@
-
+
mrp.routing.workcenter.form
mrp.routing.workcenter
@@ -164,7 +164,7 @@
-
+
mrp.routing.form
mrp.routing
@@ -203,31 +203,30 @@
-
+
-
+
mrp.bom.form
mrp.bom
form
-
+
+
mrp.bom.tree
mrp.bom
tree
- bom_lines
+ child_complete_ids
-
-
-
+
+
+
+
@@ -275,7 +276,7 @@
-
+
Bill of Material Structure
ir.actions.act_window
@@ -294,7 +295,7 @@
[('bom_id','=',False)]
-
+
Bill of Materials Components
ir.actions.act_window
@@ -308,18 +309,18 @@
Bill of Materials Structure
ir.actions.act_window
mrp.bom
- [('id','in',active_ids)]
+ [('id','=',active_id)]
tree
-
+
Bill of Materials Structure
-
+
mrp.bom.revision
mrp.bom.revision
@@ -347,11 +348,11 @@
-
+
-
+
mrp.production.tree
mrp.production
@@ -368,8 +369,7 @@
-
-
+
mrp.production.calendar
mrp.production
@@ -394,8 +394,7 @@
-
-
+
mrp.production.form
mrp.production
@@ -416,8 +415,8 @@
-
-
+
+
@@ -491,7 +490,7 @@
[('state','=','confirmed')]
-
+
New Production Order
ir.actions.act_window
@@ -500,7 +499,7 @@
form,tree,calendar,graph
-
+
mrp.production.workcenter.line.form
mrp.production.workcenter.line
@@ -529,7 +528,7 @@
-
+
mrp.production.lot.line.form
mrp.production.lot.line
@@ -562,9 +561,7 @@
-
-
-
+
mrp.production.product.line.form
mrp.production.product.line
@@ -594,11 +591,11 @@
-
+
-
+
mrp.procurement.tree
mrp.procurement
@@ -634,7 +631,7 @@
-
+
@@ -678,7 +675,7 @@
-
+
Draft procurements
ir.actions.act_window
@@ -697,7 +694,7 @@
[('state','=','confirmed')]
-
+
Exceptions procurements
ir.actions.act_window
@@ -707,7 +704,7 @@
[('state','=','exception')]
-
+
Exceptions procurements to fix
ir.actions.act_window
@@ -717,7 +714,7 @@
[('state','=','exception'), ('message', '<>', '')]
-
+
Temporary Procurement Exceptions
ir.actions.act_window
@@ -727,7 +724,7 @@
[('state','=','exception'), ('message', '=', '')]
-
+
New Procurement
ir.actions.act_window
@@ -736,7 +733,7 @@
form,tree
-
+
stock.warehouse.orderpoint.tree
diff --git a/addons/mrp/process/procurement_process.xml b/addons/mrp/process/procurement_process.xml
new file mode 100644
index 00000000000..583de318410
--- /dev/null
+++ b/addons/mrp/process/procurement_process.xml
@@ -0,0 +1,302 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/process/__terp__.py b/addons/process/__terp__.py
index f8cbf4ad927..ca48fada8a6 100644
--- a/addons/process/__terp__.py
+++ b/addons/process/__terp__.py
@@ -8,13 +8,13 @@
"description": """
This module allows you to manage your process for the end-users.
""",
- "depends" : ["base", "sale"],
+ "depends" : ["base"],
"init_xml" : [],
- "demo_xml" : ['process_demo.xml'],
+ "demo_xml" : [],
"update_xml" : [
"security/ir.model.access.csv",
'process_view.xml',
- ],
+ ],
"active": False,
"installable": True
}
diff --git a/addons/process/process.py b/addons/process/process.py
index ccfa9c45fb6..e4eff890061 100644
--- a/addons/process/process.py
+++ b/addons/process/process.py
@@ -117,15 +117,14 @@ class process_process(osv.osv):
data['gray'] = False
data['url'] = node.help_url
- # chech whether directory_id from inherited from document2 is available
- if hasattr(node, 'directory_id') and node.directory_id:
- data['directory'] = "ftp://localhost:8021" #TODO: implement document_directory.get_url
-
# get assosiated workflow
if data['model']:
wkf_ids = self.pool.get('workflow').search(cr, uid, [('osv', '=', data['model'])])
data['workflow'] = (wkf_ids or False) and wkf_ids[0]
+ if 'directory_id' in node and node.directory_id:
+ data['directory_id'] = node.directory_id.id
+
if node.menu_id:
data['menu'] = {'name': node.menu_id.complete_name, 'id': node.menu_id.id}
@@ -194,6 +193,10 @@ class process_process(osv.osv):
refobj = pool.get(ref_model).browse(cr, uid, [ref_id], context)[0]
fields = pool.get(ref_model).fields_get(cr, uid, context=context)
+ # chech for directory_id from inherited from document module
+ if nodes[nid].get('directory_id', False):
+ resource['directory'] = self.pool.get('document.directory').get_resource_path(cr, uid, nodes[nid]['directory_id'], ref_model, ref_id)
+
resource['name'] = refobj.name_get(context)[0][1]
resource['perm'] = pool.get(ref_model).perm_read(cr, uid, [ref_id], context)[0]
@@ -208,9 +211,7 @@ class process_process(osv.osv):
rel = refobj[n]
if rel and isinstance(rel, list) :
rel = rel[0]
- if isinstance(rel, basestring):
- print "XXX: ", rel
- try: # XXXXXXXXXXXXXXXXXXX
+ try: # XXX: rel has been reported as string (check it)
_id = (rel or False) and rel.id
_model = node['model']
update_relatives(r, _id, _model)
@@ -231,8 +232,8 @@ class process_process(osv.osv):
# fix the height problem
miny = -1
for k,v in nodes.items():
- x = graph[k]['y']
- y = graph[k]['x']
+ x = graph[k]['x']
+ y = graph[k]['y']
if miny == -1:
miny = y
miny = min(y, miny)
diff --git a/addons/product/__terp__.py b/addons/product/__terp__.py
index 34cd432b10e..0328b8d03e9 100644
--- a/addons/product/__terp__.py
+++ b/addons/product/__terp__.py
@@ -31,7 +31,7 @@
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Inventory Control",
- "depends" : ["base"],
+ "depends" : ["base", "process"],
"init_xml" : [],
"demo_xml" : ["product_demo.xml"],
"description": """
@@ -57,7 +57,9 @@
"security/ir.model.access.csv",
"product_data.xml","product_report.xml",
"product_view.xml", "pricelist_view.xml",
- "partner_view.xml", "product_wizard.xml"],
+ "partner_view.xml", "product_wizard.xml",
+ "process/product_process.xml"
+ ],
"active": False,
"installable": True
}
diff --git a/addons/product/i18n/fr_FR.po b/addons/product/i18n/fr_FR.po
index c66fbf597f1..b51209d0479 100644
--- a/addons/product/i18n/fr_FR.po
+++ b/addons/product/i18n/fr_FR.po
@@ -1,24 +1,25 @@
-# Translation of OpenERP Server.
+# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * product
#
msgid ""
msgstr ""
-"Project-Id-Version: OpenERP Server 4.3.0"
-"Report-Msgid-Bugs-To: support@openerp.com"
-"POT-Creation-Date: 2008-09-11 15:41:43+0000"
-"PO-Revision-Date: 2008-09-11 15:41:43+0000"
-"Last-Translator: <>"
-"Language-Team: "
-"MIME-Version: 1.0"
-"Content-Type: text/plain; charset=UTF-8"
-"Content-Transfer-Encoding: "
-"Plural-Forms: "
+"Project-Id-Version: OpenERP Server 4.3.0\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2008-09-05 16:29+0000\n"
+"PO-Revision-Date: 2008-10-09 09:11+0000\n"
+"Last-Translator: Olivier Laurent \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2008-10-09 09:12+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
#. module: product
#: view:product.pricelist.item:0
msgid "Max. Margin"
-msgstr "Marge Max."
+msgstr "Marge maximum"
#. module: product
#: view:product.pricelist.item:0
@@ -27,8 +28,13 @@ msgstr "Prix de base"
#. module: product
#: help:product.template,sale_delay:0
-msgid "This is the average time between the confirmation of the customer order and the delivery of the finnished products. It's the time you promise to your customers."
-msgstr "C'est le temps moyen entre la confirmation de la commande du client et la livraison du produit fini."
+msgid ""
+"This is the average time between the confirmation of the customer order and "
+"the delivery of the finnished products. It's the time you promise to your "
+"customers."
+msgstr ""
+"Temps moyen entre la confirmation par le client et la livraison des produits "
+"finis . C'est le temps que vous promettez à vos clients."
#. module: product
#: selection:product.template,type:0
@@ -37,18 +43,22 @@ msgstr "Service"
#. module: product
#: help:product.template,purchase_ok:0
-msgid "Determine if the product is visible in the list of products within a selection from a purchase order line."
-msgstr "Détermine si le produit est visible dans la liste des produits à l'intérieure d'une sélection dans une ligne d'ordre de commande."
+msgid ""
+"Determine if the product is visible in the list of products within a "
+"selection from a purchase order line."
+msgstr ""
+"Détermine si le produit est visible dans la liste des produits à "
+"l'intérieure d'une sélection dans une ligne d'ordre de commande."
#. module: product
#: view:product.product:0
msgid "Lots"
-msgstr ""
+msgstr "Lots"
#. module: product
#: model:product.template,name:product.product_product_ram512_product_template
msgid "DDR 512MB PC400"
-msgstr ""
+msgstr "DDR 512MB PC400"
#. module: product
#: model:product.template,name:product.product_product_0_product_template
@@ -85,40 +95,24 @@ msgstr "Palettisation"
msgid "Keep empty to use the default UOM"
msgstr "Laissez vide pour utiliser l'UOM par défaut"
-#. module: product
-#: model:product.category,name:product.product_category_4
-msgid "Dello Computer"
-msgstr ""
-
#. module: product
#: model:ir.actions.act_window,name:product.product_uom_form_action
#: model:ir.ui.menu,name:product.menu_product_uom_form_action
#: model:ir.ui.menu,name:product.next_id_16
#: view:product.uom:0
msgid "Unit of Measure"
-msgstr ""
+msgstr "Unité de mesure"
#. module: product
#: selection:product.template,cost_method:0
msgid "Standard Price"
msgstr "Prix standard"
-#. module: product
-#, python-format
-#: code:addons/product/product.py:0
-msgid "Products: "
-msgstr ""
-
#. module: product
#: field:product.template,uos_id:0
msgid "Unit of Sale"
msgstr "Unité secondaire"
-#. module: product
-#: model:product.category,name:product.cat1
-msgid "Sellable"
-msgstr ""
-
#. module: product
#: field:product.packaging,weight:0
msgid "Palette Weight"
@@ -143,17 +137,12 @@ msgstr "Liste de prix"
#: model:ir.actions.act_window,name:product.product_price_type_action
#: model:ir.ui.menu,name:product.menu_product_price_type_action
msgid "Prices Types"
-msgstr ""
+msgstr "Types de prix"
#. module: product
#: field:product.template,seller_delay:0
msgid "Supplier Lead Time"
-msgstr ""
-
-#. module: product
-#: model:product.category,name:product.product_category_services
-msgid "Services"
-msgstr ""
+msgstr "Délai d'exécution du fournisseur"
#. module: product
#: selection:product.template,type:0
@@ -193,7 +182,7 @@ msgstr "Catégorie enfant"
#. module: product
#: view:product.product:0
msgid "Weigths"
-msgstr ""
+msgstr "Poids"
#. module: product
#: model:product.template,name:product.product_product_fan2_product_template
@@ -213,7 +202,7 @@ msgstr "Variable"
#. module: product
#: view:product.product:0
msgid "Prices"
-msgstr ""
+msgstr "Prix"
#. module: product
#: field:product.pricelist.item,base_pricelist_id:0
@@ -238,12 +227,6 @@ msgstr "Nouveau prix ="
msgid "Fixed"
msgstr "Fixé"
-#. module: product
-#, python-format
-#: code:addons/product/pricelist.py:0
-msgid "Warning !"
-msgstr ""
-
#. module: product
#: field:product.pricelist.item,price_min_margin:0
msgid "Price Min. Margin"
@@ -259,12 +242,17 @@ msgstr "Type de liste de prix"
#. module: product
#: view:product.product:0
msgid "Base Prices"
-msgstr ""
+msgstr "Prix de base"
#. module: product
#: help:product.template,type:0
-msgid "Will change the way procurements are processed, consumable are stockable products with infinite stock, or without a stock management in the system."
+msgid ""
+"Will change the way procurements are processed, consumable are stockable "
+"products with infinite stock, or without a stock management in the system."
msgstr ""
+"Change la façon dont les commandes sont traitées. Les consommables sont des "
+"produits stockés qui ont un stock infini ou qui n'ont pas de gestion de "
+"stock dans le système"
#. module: product
#: model:ir.ui.menu,name:product.menu_config_product
@@ -274,13 +262,12 @@ msgstr "Configuration"
#. module: product
#: field:product.template,tracking:0
msgid "Track Lots"
-msgstr ""
+msgstr "Tracer les lots"
#. module: product
-#: view:product.product:0
-#: view:product.packaging:0
-msgid "Palette Dimension"
-msgstr "Dimension de la palette"
+#: field:product.template,uom_po_id:0
+msgid "Purchase UOM"
+msgstr "Unité de mesure d'achat"
#. module: product
#: view:product.pricelist.item:0
@@ -288,19 +275,19 @@ msgid "Rules Test Match"
msgstr "Test d'appliquation de la regle"
#. module: product
-#: field:product.template,uom_id:0
-msgid "Default UoM"
-msgstr ""
+#: model:product.template,name:product.product_product_26_product_template
+msgid "Kit Keyboard + Mouse"
+msgstr "Kit clavier + souris"
#. module: product
#: field:product.template,produce_delay:0
msgid "Manufacturing Lead Time"
-msgstr ""
+msgstr "Délai de fabrication"
#. module: product
#: field:product.supplierinfo,pricelist_ids:0
msgid "Supplier Pricelist"
-msgstr ""
+msgstr "Liste de prix du fournisseur"
#. module: product
#: field:product.pricelist.item,base:0
@@ -320,7 +307,7 @@ msgstr "Partenaire"
#. module: product
#: field:product.template,sale_delay:0
msgid "Customer Lead Time"
-msgstr ""
+msgstr "Délai de livraison au client"
#. module: product
#: model:product.template,name:product.product_product_25_product_template
@@ -329,13 +316,15 @@ msgstr "Souris"
#. module: product
#: help:product.template,supply_method:0
-msgid "Produce will generate production order or tasks, according to the product type. Purchase will trigger purchase orders when requested."
+msgid ""
+"Produce will generate production order or tasks, according to the product "
+"type. Purchase will trigger purchase orders when requested."
msgstr ""
#. module: product
#: selection:product.template,procure_method:0
msgid "Make to Stock"
-msgstr "Sortir du stock"
+msgstr "Livraison sur stock"
#. module: product
#: field:product.template,seller_ids:0
@@ -387,17 +376,17 @@ msgstr "En production"
#. module: product
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
-msgstr ""
+msgstr "XML non valide pour l'architecture de la vue"
#. module: product
#: view:res.partner:0
msgid "Sales"
-msgstr ""
+msgstr "Ventes"
#. module: product
#: field:product.supplierinfo,sequence:0
msgid "Priority"
-msgstr ""
+msgstr "Priorité"
#. module: product
#: model:product.template,name:product.product_product_20_product_template
@@ -408,7 +397,7 @@ msgstr "DD sur demande"
#: field:product.uom,factor_inv:0
#: field:product.uom,factor_inv_data:0
msgid "Factor"
-msgstr ""
+msgstr "Facteur"
#. module: product
#: selection:product.ul,type:0
@@ -430,7 +419,7 @@ msgstr "Variante de produit"
#: model:ir.ui.menu,name:product.menu_product_pricelist_action2
#: model:ir.ui.menu,name:product.menu_product_pricelist_main
msgid "Pricelists"
-msgstr ""
+msgstr "Listes de prix"
#. module: product
#: model:ir.model,name:product.model_product_category
@@ -448,15 +437,17 @@ msgstr "Réf. client"
msgid "The length of the palette"
msgstr "La longueur de la palette"
-#. module: product
-#: model:product.category,name:product.product_category_pc
-msgid "PC"
-msgstr ""
-
#. module: product
#: help:product.template,seller_delay:0
-msgid "This is the average delay in days between the purchase order confirmation and the reception of goods for this product and for the default supplier. It is used by the scheduler to order requests based on reordering delays."
-msgstr "C'est le temps moyen entre la confirmation de la commande du client et la réception des marchandises pour ce produit et pour le fournisseur par défaut. C'est utilisé par le planificateur pour ordonner les requètes sur base des délais de réordonnement. "
+msgid ""
+"This is the average delay in days between the purchase order confirmation "
+"and the reception of goods for this product and for the default supplier. It "
+"is used by the scheduler to order requests based on reordering delays."
+msgstr ""
+"C'est le temps moyen entre la confirmation de la commande du client et la "
+"réception des marchandises pour ce produit et pour le fournisseur par "
+"défaut. C'est utilisé par le planificateur pour ordonner les requètes sur "
+"base des délais de réordonnement."
#. module: product
#: field:product.packaging,qty:0
@@ -480,8 +471,12 @@ msgstr "Liste de prix de vente"
#. module: product
#: help:res.partner,property_product_pricelist:0
-msgid "This pricelist will be used, instead of the default one, for sales to the current partner"
+msgid ""
+"This pricelist will be used, instead of the default one, "
+"for sales to the current partner"
msgstr ""
+"Cette liste de prix sera utilisée au lieu de celle par défaut pour les "
+"ventes au partenaire courant."
#. module: product
#: model:ir.model,name:product.model_product_pricelist
@@ -497,13 +492,17 @@ msgstr "Type de produit"
#. module: product
#: help:product.template,tracking:0
-msgid "Force to use a Production Lot number during stock operations for traceability."
+msgid ""
+"Force to use a Production Lot number during stock operations for "
+"traceability."
msgstr ""
+"Force à utiliser un numéro de Production de Lot pendant les opérations de "
+"stock pour des raisons de traçabilité"
#. module: product
#: constraint:product.category:0
msgid "Error ! You can not create recursive categories."
-msgstr ""
+msgstr "Erreur ! Vous ne pouvez pas créer de catégories récursives"
#. module: product
#: selection:product.ul,type:0
@@ -514,24 +513,30 @@ msgstr "Box"
#: field:product.template,state:0
#: view:product.product:0
msgid "Status"
-msgstr ""
+msgstr "État"
#. module: product
#: model:ir.actions.act_window,name:product.product_ul_form_action
#: model:ir.ui.menu,name:product.menu_product_ul_form_action
#: view:product.ul:0
msgid "Logistical Unit"
-msgstr ""
+msgstr "Unité logistique"
#. module: product
#: help:product.template,sale_ok:0
-msgid "Determine if the product can be visible in the list of product within a selection from a sale order line."
-msgstr "Détermine si le produit peut être visible dans la liste des produit à l'intérieur d'une sélection d'une ligne de commande."
+msgid ""
+"Determine if the product can be visible in the list of product within a "
+"selection from a sale order line."
+msgstr ""
+"Détermine si le produit peut être visible dans la liste des produit à "
+"l'intérieur d'une sélection d'une ligne de commande."
#. module: product
#: constraint:product.template:0
msgid "Error: UOS must be in a different category than the UOM"
msgstr ""
+"Erreur: l'unité de vente doit appartenir à une catégorie différente que "
+"l'unité de mesure"
#. module: product
#: field:product.category,parent_id:0
@@ -543,11 +548,6 @@ msgstr "Catégorie parent"
msgid "In Development"
msgstr "En développement"
-#. module: product
-#: model:product.category,name:product.cat0
-msgid "All products"
-msgstr ""
-
#. module: product
#: view:product.pricelist:0
msgid "Products Price List"
@@ -562,17 +562,17 @@ msgstr "Approvisionnement"
#. module: product
#: model:product.template,name:product.product_product_hdd1_product_template
msgid "HDD Seagate 7200.8 80GB"
-msgstr ""
+msgstr "HDD Seagate 7200.8 80GB"
#. module: product
#: model:product.template,name:product.product_product_hdd3_product_template
msgid "HDD Seagate 7200.8 160GB"
-msgstr ""
+msgstr "HDD Seagate 7200.8 160GB"
#. module: product
#: field:product.template,loc_rack:0
msgid "Rack"
-msgstr ""
+msgstr "Rayon"
#. module: product
#: selection:product.ul,type:0
@@ -587,12 +587,12 @@ msgstr "EAN13"
#. module: product
#: field:product.template,mes_type:0
msgid "Measure Type"
-msgstr ""
+msgstr "Type de mesure"
#. module: product
#: view:product.product:0
msgid "Miscelleanous"
-msgstr ""
+msgstr "Divers"
#. module: product
#: model:product.template,name:product.product_product_22_product_template
@@ -604,11 +604,6 @@ msgstr "Processeur à la demande"
msgid "Supply method"
msgstr "Méthode d'appro."
-#. module: product
-#: help:product.template,uom_id:0
-msgid "This is the default Unit of Measure used for all stock operation."
-msgstr ""
-
#. module: product
#: field:product.supplierinfo,product_code:0
msgid "Partner product reference"
@@ -617,12 +612,7 @@ msgstr "Réf. produit du partenaire"
#. module: product
#: view:product.supplierinfo:0
msgid "Supplier Information"
-msgstr ""
-
-#. module: product
-#: model:product.template,name:product.product_product_21_product_template
-msgid "RAM on demand"
-msgstr ""
+msgstr "Informations sur le fournisseur"
#. module: product
#: field:product.supplierinfo,product_name:0
@@ -649,7 +639,7 @@ msgstr "Unité"
#: model:ir.actions.act_window,name:product.product_uom_categ_form_action
#: model:ir.ui.menu,name:product.menu_product_uom_categ_form_action
msgid "Unit of Measure Categories"
-msgstr ""
+msgstr "Catégories d'unités de mesure"
#. module: product
#: field:product.pricelist.version,date_start:0
@@ -658,23 +648,26 @@ msgstr "Date de début"
#. module: product
#: help:product.template,produce_delay:0
-msgid "Average time to produce this product. This is only for the production order and, if it is a multi-level bill of material, it's only for the level of this product. Different delays will be summed for all levels and purchase orders."
-msgstr "Temps moyen pour produire ce produit. Ceci est seulement pour l'ordre de fabrication et, si il s'agit d'une facture multi-nivaux de matériel, c'est seulement pour le niveau de ce produit. Des délais différents seront sommé pour tous les nivaux et ordres d'approvisionnement."
+msgid ""
+"Average time to produce this product. This is only for the production order "
+"and, if it is a multi-level bill of material, it's only for the level of "
+"this product. Different delays will be summed for all levels and purchase "
+"orders."
+msgstr ""
+"Temps moyen pour produire ce produit. Ceci est seulement pour l'ordre de "
+"fabrication et, si il s'agit d'une facture multi-nivaux de matériel, c'est "
+"seulement pour le niveau de ce produit. Des délais différents seront sommé "
+"pour tous les nivaux et ordres d'approvisionnement."
#. module: product
#: model:product.template,name:product.product_product_pc1_product_template
msgid "Basic PC"
msgstr "PC Basic"
-#. module: product
-#: model:product.category,name:product.product_category_3
-msgid "Computer Stuff"
-msgstr ""
-
#. module: product
#: field:product.template,loc_row:0
msgid "Row"
-msgstr ""
+msgstr "Ligne"
#. module: product
#: field:product.template,categ_id:0
@@ -684,7 +677,7 @@ msgstr "Catégorie"
#. module: product
#: model:product.template,name:product.product_product_ram_product_template
msgid "DDR 256MB PC400"
-msgstr ""
+msgstr "DDR 256MB PC400"
#. module: product
#: field:product.supplierinfo,delay:0
@@ -706,6 +699,12 @@ msgstr "Catégories de produits"
msgid "Product Unit of Measure"
msgstr "Unité de mesure du produit"
+#. module: product
+#: view:product.product:0
+#: view:product.packaging:0
+msgid "Palette Dimension"
+msgstr "Dimension de la palette"
+
#. module: product
#: field:product.template,sale_ok:0
msgid "Can be sold"
@@ -733,8 +732,14 @@ msgstr "carte mère ASUStek A7V8X-X"
#. module: product
#: help:product.template,procure_method:0
-msgid "'Make to Stock': When needed, take from the stock or wait until refurnishing. 'Make to Order': When needed, purchase or produce for the procurement request."
+msgid ""
+"'Make to Stock': When needed, take from the stock or wait until "
+"refurnishing. 'Make to Order': When needed, purchase or produce for the "
+"procurement request."
msgstr ""
+"'Livraison sur stock': au besoin, livre à partir du stock ou attend un "
+"approvisionnement. 'Fabrication à la commande': au besoin, achete ou produit "
+"d'après la commande"
#. module: product
#: field:product.uom,rounding:0
@@ -754,7 +759,7 @@ msgstr "La hauteur de la palette"
#. module: product
#: view:product.product:0
msgid "Procurement & Locations"
-msgstr ""
+msgstr "Délais et Localisations"
#. module: product
#: help:product.packaging,width:0
@@ -781,21 +786,11 @@ msgstr "Arrondi du prix"
msgid "Public Price"
msgstr ""
-#. module: product
-#: help:product.template,volume:0
-msgid "The weight in Kg."
-msgstr ""
-
#. module: product
#: view:product.pricelist.item:0
msgid "Min. Margin"
msgstr "Marge Min."
-#. module: product
-#: model:product.category,name:product.product_category_10
-msgid "IT components"
-msgstr ""
-
#. module: product
#: help:product.packaging,weight_ul:0
msgid "The weight of the empty UL"
@@ -808,9 +803,12 @@ msgstr "Le code de l'unité de transport"
#. module: product
#: help:product.uom,factor_inv:0
-msgid "The coefficient for the formula:\n"
+msgid ""
+"The coefficient for the formula:\n"
"coef (base unit) = 1 (this unit)"
msgstr ""
+"Le coefficient pour la formule:\n"
+"coef (unité de base) = 1 (cette unité)"
#. module: product
#: view:product.price.type:0
@@ -830,7 +828,7 @@ msgstr ""
#. module: product
#: model:product.template,name:product.product_product_fan_product_template
msgid "Regular case fan 80mm"
-msgstr "Ventilateur ordinaire 80mm pour boitier "
+msgstr "Ventilateur ordinaire 80mm pour boitier"
#. module: product
#: model:ir.model,name:product.model_product_supplierinfo
@@ -879,13 +877,18 @@ msgstr "Description vente"
#. module: product
#: view:product.product:0
msgid "Storage Localisation"
-msgstr ""
+msgstr "Localisation du stock"
#. module: product
#: field:product.packaging,rows:0
msgid "Number of layer"
msgstr "Nb de couches"
+#. module: product
+#: field:product.template,uom_id:0
+msgid "Default UOM"
+msgstr "Unité de mesure par défaut"
+
#. module: product
#: field:product.template,weight:0
msgid "Gross weight"
@@ -893,13 +896,19 @@ msgstr "Poids"
#. module: product
#: help:product.product,packaging:0
-msgid "Gives the different ways to package the same product. This has no impact on the packing order and is mainly used if you use the EDI module."
-msgstr "Donne les différentes manières de coliser le même produit. Ceci n'a pas d'impacte sur l'ordre de colisage et est principalement utilisé si vous utilisez le module EDI."
+msgid ""
+"Gives the different ways to package the same product. This has no impact on "
+"the packing order and is mainly used if you use the EDI module."
+msgstr ""
+"Donne les différentes manières de coliser le même produit. Ceci n'a pas "
+"d'impacte sur l'ordre de colisage et est principalement utilisé si vous "
+"utilisez le module EDI."
#. module: product
#: constraint:product.pricelist.version:0
msgid "You can not have 2 pricelist version that overlaps!"
msgstr ""
+"Vous ne pouvez pas avoir 2 version de listes de prix qui se chevauchent"
#. module: product
#: field:product.price.type,field:0
@@ -910,12 +919,12 @@ msgstr "Champ produit"
#: model:ir.actions.act_window,name:product.product_pricelist_type_action
#: model:ir.ui.menu,name:product.menu_product_pricelist_type_action
msgid "Pricelists Types"
-msgstr ""
+msgstr "Types de listes de prix"
#. module: product
#: help:product.template,state:0
msgid "Tells the user if he can use the product or not."
-msgstr ""
+msgstr "Indique à l'utilisateur s'il peut utiliser le produit ou pas"
#. module: product
#: selection:product.template,type:0
@@ -925,7 +934,7 @@ msgstr "Produit stockable"
#. module: product
#: field:pricelist.partnerinfo,min_quantity:0
msgid "Quantity"
-msgstr ""
+msgstr "Quantité"
#. module: product
#: field:product.packaging,code:0
@@ -939,11 +948,6 @@ msgstr "Code"
msgid "Seq"
msgstr "Seq"
-#. module: product
-#: model:product.category,name:product.product_category_8
-msgid "Phone Help"
-msgstr ""
-
#. module: product
#: help:product.packaging,rows:0
msgid "The number of layer on palette"
@@ -951,8 +955,11 @@ msgstr "Le nombre de couches sur la palette"
#. module: product
#: constraint:product.template:0
-msgid "Error: The default UOM and the purchase UOM must be in the same category."
+msgid ""
+"Error: The default UOM and the purchase UOM must be in the same category."
msgstr ""
+"Erreur: l'unité de mesure par défaut et l'unité de mesure d'achat doivent "
+"faire partie de la même catégorie"
#. module: product
#: model:ir.model,name:product.model_product_ul
@@ -975,7 +982,6 @@ msgid "Partner Information"
msgstr "Infos partenaire"
#. module: product
-#: model:product.category,name:product.product_category_7
#: model:product.template,name:product.product_product_1_product_template
msgid "Onsite Intervention"
msgstr "Intervention sur site"
@@ -996,8 +1002,8 @@ msgid "Public Pricelist"
msgstr ""
#. module: product
-#: model:product.category,name:product.product_category_11
-msgid "IT components kits"
+#: model:product.template,name:product.product_product_21_product_template
+msgid "RAM on demand"
msgstr ""
#. module: product
@@ -1023,23 +1029,27 @@ msgstr "Lignes de liste de prix"
#. module: product
#: constraint:ir.model:0
-msgid "The Object name must start with x_ and not contain any special character !"
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
msgstr ""
+"Le nom de l'objet doit commencer avec x_ et ne pas contenir de charactères "
+"spéciaux !"
#. module: product
#: view:res.partner:0
msgid "Sales & Purchases"
-msgstr ""
+msgstr "Ventes et achats"
#. module: product
-#: field:product.template,uom_po_id:0
-msgid "Purchase UoM"
-msgstr ""
+#: view:product.product:0
+#: view:product.packaging:0
+msgid "Other Info"
+msgstr "Autre information"
#. module: product
#: view:product.product:0
msgid "Delays"
-msgstr ""
+msgstr "Délais"
#. module: product
#: field:product.pricelist.version,items_id:0
@@ -1051,21 +1061,10 @@ msgstr "Lignes de liste de prix"
msgid "Obsolete"
msgstr "Obsolète"
-#. module: product
-#: view:product.product:0
-#: view:product.packaging:0
-msgid "Other Info"
-msgstr ""
-
#. module: product
#: field:pricelist.partnerinfo,price:0
msgid "Unit Price"
-msgstr ""
-
-#. module: product
-#: model:product.category,name:product.cat2
-msgid "Private"
-msgstr ""
+msgstr "Prix unitaire"
#. module: product
#: model:ir.model,name:product.model_product_price_type
@@ -1104,7 +1103,7 @@ msgstr "EAN13/EAN14"
#. module: product
#: view:product.product:0
msgid "Product Description"
-msgstr ""
+msgstr "Description du produit"
#. module: product
#: view:product.pricelist.item:0
@@ -1123,20 +1122,18 @@ msgstr "Unité de mesure du produit"
#. module: product
#: help:product.uom,factor:0
-msgid "The coefficient for the formula:\n"
+msgid ""
+"The coefficient for the formula:\n"
"1 (base unit) = coef (this unit)"
msgstr ""
+"Le coefficient de la formule:\n"
+"1 (unité de base) = coef (cette unité)"
#. module: product
#: field:product.template,volume:0
msgid "Volume"
msgstr "Volume"
-#. module: product
-#: model:product.template,name:product.product_product_26_product_template
-msgid "Kit Keyboard + Mouse"
-msgstr "Kit clavier + souris"
-
#. module: product
#: selection:product.template,supply_method:0
msgid "Produce"
@@ -1145,7 +1142,7 @@ msgstr "Produire"
#. module: product
#: selection:product.template,procure_method:0
msgid "Make to Order"
-msgstr "Commander"
+msgstr "Fabrication à la commande"
#. module: product
#: help:product.packaging,weight:0
@@ -1186,7 +1183,7 @@ msgstr "Descriptions"
#. module: product
#: field:product.template,loc_case:0
msgid "Case"
-msgstr ""
+msgstr "Cas"
#. module: product
#: field:product.pricelist.version,date_end:0
@@ -1196,8 +1193,9 @@ msgstr "Date de fin"
#. module: product
#: model:ir.actions.act_window,name:product.product_category_action_form
#: model:ir.ui.menu,name:product.menu_product_category_action_form
+#: view:product.category:0
msgid "Products Categories"
-msgstr ""
+msgstr "Catégories de produits"
#. module: product
#: field:product.category,complete_name:0
@@ -1215,9 +1213,11 @@ msgstr "Nom"
#. module: product
#: help:product.template,uos_coeff:0
-msgid "Coefficient to convert UOM to UOS\n"
+msgid ""
+"Coefficient to convert UOM to UOS\n"
" uom = uos * coeff"
msgstr ""
+"Coefficient de conversion \"unité de mesure\" vers \"unité de vente\""
#. module: product
#: field:product.template,purchase_ok:0
@@ -1250,7 +1250,7 @@ msgstr "Méthode de coût"
#. module: product
#: view:product.product:0
msgid "Second UoM"
-msgstr ""
+msgstr "Unité de mesure secondaire"
#. module: product
#: view:product.product:0
@@ -1273,7 +1273,7 @@ msgstr "Tour ATX Moyenne"
#: field:product.pricelist,version_id:0
#: model:ir.ui.menu,name:product.menu_product_pricelist_action
msgid "Pricelist Versions"
-msgstr ""
+msgstr "Versions de la liste de prix"
#. module: product
#: field:product.category,sequence:0
@@ -1284,12 +1284,7 @@ msgstr "Séquence"
#. module: product
#: field:product.template,list_price:0
msgid "Sale Price"
-msgstr ""
-
-#. module: product
-#: model:product.category,name:product.product_category_accessories
-msgid "Accessories"
-msgstr ""
+msgstr "Prix de vente"
#. module: product
#: field:product.packaging,ul:0
@@ -1309,12 +1304,12 @@ msgstr "Nb UL par couche"
#. module: product
#: field:product.uom,factor:0
msgid "Rate"
-msgstr ""
+msgstr "Rapport"
#. module: product
#: constraint:product.product:0
msgid "Error: Invalid ean code"
-msgstr ""
+msgstr "Erreur: code EAN invalide"
#. module: product
#: field:product.pricelist.item,min_quantity:0
@@ -1324,7 +1319,7 @@ msgstr "Quantité min."
#. module: product
#: model:ir.actions.report.xml,name:product.report_product_label
msgid "Products Labels"
-msgstr ""
+msgstr "Étiquettes de produits"
#. module: product
#: field:product.pricelist.item,price_max_margin:0
@@ -1335,4 +1330,3 @@ msgstr "Marge maximale sur le prix"
#: field:product.pricelist.item,price_discount:0
msgid "Price Discount"
msgstr "Réduction sur le prix"
-
diff --git a/addons/product/process/product_process.xml b/addons/product/process/product_process.xml
new file mode 100644
index 00000000000..9b675a11a84
--- /dev/null
+++ b/addons/product/process/product_process.xml
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/product_margin/__init__.py b/addons/product_margin/__init__.py
new file mode 100644
index 00000000000..5c3a1b13af2
--- /dev/null
+++ b/addons/product_margin/__init__.py
@@ -0,0 +1,34 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# Copyright (c) 2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
+# Fabien Pinckaers
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+##############################################################################
+
+import wizard
+import product_margin
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/product_margin/__terp__.py b/addons/product_margin/__terp__.py
new file mode 100644
index 00000000000..7341e7e498f
--- /dev/null
+++ b/addons/product_margin/__terp__.py
@@ -0,0 +1,14 @@
+# -*- encoding: utf-8 -*-
+{
+ "name":"Margins in Product",
+ "version":"1.0",
+ "author":"Tiny",
+ "category":"Custom",
+ "depends":["base","product","account"],
+ "demo_xml":[],
+ "update_xml":["product_margin_view.xml"],
+ "active": False,
+ "installable": True,
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/product_margin/product_margin.py b/addons/product_margin/product_margin.py
new file mode 100644
index 00000000000..484204c4c86
--- /dev/null
+++ b/addons/product_margin/product_margin.py
@@ -0,0 +1,133 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
+#
+# $Id: partner.py 1007 2005-07-25 13:18:09Z kayhman $
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+##############################################################################
+
+from osv import fields,osv
+import pooler
+from tools import config
+import time
+
+class product_product(osv.osv):
+ _inherit = "product.product"
+
+
+ def _product_margin(self, cr, uid, ids, field_names, arg, context):
+ res = {}
+ for val in self.browse(cr, uid, ids,context=context):
+ res[val.id] = {}
+ date_from=context.get('date_from', time.strftime('%Y-01-01'))
+ date_to=context.get('date_to', time.strftime('%Y-12-31'))
+ invoice_state=context.get('invoice_state', 'open_paid')
+ if 'date_from' in field_names:
+ res[val.id]['date_from']=date_from
+ if 'date_to' in field_names:
+ res[val.id]['date_to']=date_to
+ if 'invoice_state' in field_names:
+ res[val.id]['invoice_state']=invoice_state
+
+
+ invoice_types=[]
+ states=[]
+ if invoice_state=='paid':
+ states=['paid']
+ elif invoice_state=='open_paid':
+ states=['open','paid']
+ elif invoice_state=='draft_open_paid':
+ states=['draft','open','paid']
+
+ if 'sale_avg_price' in field_names or 'sale_num_invoiced' in field_names or 'turnover' in field_names or 'sale_expected' in field_names:
+ invoice_types=['out_invoice','in_refund']
+ if 'purchase_avg_price' in field_names or 'purchase_num_invoiced' in field_names or 'total_cost' in field_names or 'normal_cost' in field_names:
+ invoice_types=['in_invoice','out_refund']
+ if len(invoice_types):
+ sql="""
+ select
+ avg(l.price_unit) as avg_unit_price,
+ sum(l.quantity) as num_qty,
+ sum(l.quantity * l.price_unit) as total,
+ sum(l.quantity * product.list_price) as sale_expected,
+ sum(l.quantity * product.standard_price) as normal_cost
+ from account_invoice_line l
+ left join account_invoice i on (l.invoice_id = i.id)
+ left join product_template product on (product.id=l.product_id)
+ where l.product_id = %s and i.state in ('%s') and i.type in ('%s')
+ """%(val.id,"','".join(states),"','".join(invoice_types))
+ cr.execute(sql)
+ result=cr.fetchall()[0]
+ if 'sale_avg_price' in field_names or 'sale_num_invoiced' in field_names or 'turnover' in field_names or 'sale_expected' in field_names:
+ res[val.id]['sale_avg_price']=result[0] and result[0] or 0.0
+ res[val.id]['sale_num_invoiced']=result[1] and result[1] or 0.0
+ res[val.id]['turnover']=result[2] and result[2] or 0.0
+ res[val.id]['sale_expected']=result[3] and result[3] or 0.0
+ res[val.id]['sales_gap']=res[val.id]['sale_expected']-res[val.id]['turnover']
+ if 'purchase_avg_price' in field_names or 'purchase_num_invoiced' in field_names or 'total_cost' in field_names or 'normal_cost' in field_names:
+ res[val.id]['purchase_avg_price']=result[0] and result[0] or 0.0
+ res[val.id]['purchase_num_invoiced']=result[1] and result[1] or 0.0
+ res[val.id]['total_cost']=result[2] and result[2] or 0.0
+ res[val.id]['normal_cost']=result[4] and result[4] or 0.0
+ res[val.id]['purchase_gap']=res[val.id]['normal_cost']-res[val.id]['total_cost']
+
+ if 'total_margin' in field_names:
+ res[val.id]['total_margin']=val.turnover-val.total_cost
+ if 'expected_margin' in field_names:
+ res[val.id]['expected_margin']=val.sale_expected-val.normal_cost
+ if 'total_margin_rate' in field_names:
+ res[val.id]['total_margin_rate']=val.turnover and val.total_margin * 100 / val.turnover or 0.0
+ if 'expected_margin_rate' in field_names:
+ res[val.id]['expected_margin_rate']=val.sale_expected and val.expected_margin * 100 / val.sale_expected or 0.0
+ return res
+
+ _columns = {
+ 'date_from': fields.function(_product_margin, method=True, type='date', string='From Date', multi=True),
+ 'date_to': fields.function(_product_margin, method=True, type='date', string='To Date', multi=True),
+ 'invoice_state': fields.function(_product_margin, method=True, type='selection', selection=[
+ ('paid','Paid'),('open_paid','Open and Paid'),('draft_open_paid','Draft, Open and Paid')
+ ], string='Invoice State',multi=True, readonly=True),
+ 'sale_avg_price' : fields.function(_product_margin, method=True, type='float', string='Avg. Unit Price', multi='sale',help="Avg. Price in Customer Invoices)"),
+ 'purchase_avg_price' : fields.function(_product_margin, method=True, type='float', string='Avg. Unit Price', multi='purchase',help="Avg. Price in Supplier Invoices "),
+ 'sale_num_invoiced' : fields.function(_product_margin, method=True, type='float', string='# Invoiced', multi='sale',help="Sum of Quantity in Customer Invoices"),
+ 'purchase_num_invoiced' : fields.function(_product_margin, method=True, type='float', string='# Invoiced', multi='purchase',help="Sum of Quantity in Supplier Invoices"),
+ 'sales_gap' : fields.function(_product_margin, method=True, type='float', string='Sales Gap', multi='sale',help="Excepted Sale - Turn Over"),
+ 'purchase_gap' : fields.function(_product_margin, method=True, type='float', string='Purchase Gap', multi='purchase',help="Normal Cost - Total Cost"),
+ 'turnover' : fields.function(_product_margin, method=True, type='float', string='Turnover' ,multi='sale',help="Sum of Multification of Invoice price and quantity of Customer Invoices"),
+ 'total_cost' : fields.function(_product_margin, method=True, type='float', string='Total Cost', multi='purchase',help="Sum of Multification of Invoice price and quantity of Supplier Invoices "),
+ 'sale_expected' : fields.function(_product_margin, method=True, type='float', string='Expected Sale', multi='sale',help="Sum of Multification of Sale Catalog price and quantity of Customer Invoices"),
+ 'normal_cost' : fields.function(_product_margin, method=True, type='float', string='Normal Cost', multi='purchase',help="Sum of Multification of Cost price and quantity of Supplier Invoices"),
+ 'total_margin' : fields.function(_product_margin, method=True, type='float', string='Total Margin', multi='total',help="Turnorder - Total Cost"),
+ 'expected_margin' : fields.function(_product_margin, method=True, type='float', string='Expected Margin', multi='total',help="Excepted Sale - Normal Cost"),
+ 'total_margin_rate' : fields.function(_product_margin, method=True, type='float', string='Total Margin (%)', multi='margin',help="Total margin * 100 / Turnover"),
+ 'expected_margin_rate' : fields.function(_product_margin, method=True, type='float', string='Expected Margin (%)', multi='margin',help="Expected margin * 100 / Expected Sale"),
+ }
+
+
+product_product()
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/product_margin/product_margin_view.xml b/addons/product_margin/product_margin_view.xml
new file mode 100644
index 00000000000..12f2d436903
--- /dev/null
+++ b/addons/product_margin/product_margin_view.xml
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+
+ product.margin.graph
+ product.product
+ graph
+
+
+
+
+
+
+
+
+
+
+ product.margin.form.inherit
+ product.product
+ form
+ 5
+
+
+
+
+
+
+ product.margin.tree
+ product.product
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/product_margin/wizard/__init__.py b/addons/product_margin/wizard/__init__.py
new file mode 100644
index 00000000000..ed4ac23f486
--- /dev/null
+++ b/addons/product_margin/wizard/__init__.py
@@ -0,0 +1,33 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# Copyright (c) 2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
+# Fabien Pinckaers
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+##############################################################################
+
+import wizard_product_margin
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/product_margin/wizard/wizard_product_margin.py b/addons/product_margin/wizard/wizard_product_margin.py
new file mode 100644
index 00000000000..1c7376d38c1
--- /dev/null
+++ b/addons/product_margin/wizard/wizard_product_margin.py
@@ -0,0 +1,89 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved.
+#
+# $Id$
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+##############################################################################
+
+import wizard
+import pooler
+import time
+
+def _action_open_window(self, cr, uid, data, context):
+ cr.execute('select id,name from ir_ui_view where name=%s and type=%s', ('product.margin.tree', 'tree'))
+ view_res = cr.fetchone()
+ return {
+ 'name': 'Product Margins',
+ 'context':{'date_from':data['form']['from_date'],'date_to':data['form']['to_date'],'invoice_state' : data['form']['invoice_state']},
+ 'view_type': 'form',
+ "view_mode": 'tree,form,graph',
+ 'res_model':'product.product',
+ 'type': 'ir.actions.act_window',
+ 'view_id': view_res,
+ }
+
+
+class product_margins(wizard.interface):
+ form1 = '''
+ '''
+ form1_fields = {
+ 'from_date': {
+ 'string': 'From',
+ 'type': 'date',
+ 'default': lambda *a:time.strftime('%Y-01-01'),
+
+ },
+ 'to_date': {
+ 'string': 'To',
+ 'type': 'date',
+ 'default': lambda *a:time.strftime('%Y-12-31'),
+
+ },
+ 'invoice_state': {
+ 'string': 'Invoice State',
+ 'type': 'selection',
+ 'selection': [('paid','Paid'),('open_paid','Open and Paid'),('draft_open_paid','Draft, Open and Paid'),],
+ 'required': True,
+ 'default': lambda *a:"open_paid",
+ },
+ }
+
+ states = {
+ 'init': {
+ 'actions': [],
+ 'result': {'type': 'form', 'arch':form1, 'fields':form1_fields, 'state': [('end', 'Cancel','gtk-cancel'),('open', 'Open Margins','gtk-ok')]}
+ },
+ 'open': {
+ 'actions': [],
+ 'result': {'type': 'action', 'action': _action_open_window, 'state':'end'}
+ }
+ }
+product_margins('product.margins')
diff --git a/addons/profile_accounting/profile_accounting.py b/addons/profile_accounting/profile_accounting.py
index 744a66dd796..20a27f04baa 100644
--- a/addons/profile_accounting/profile_accounting.py
+++ b/addons/profile_accounting/profile_accounting.py
@@ -44,31 +44,31 @@ class profile_accounting_config_install_modules_wizard(osv.osv_memory):
return {
'view_type': 'form',
"view_mode": 'form',
- 'res_model': 'ir.module.module.configuration.wizard',
+ 'res_model': 'ir.actions.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
-
-
+
+
def action_install(self, cr, uid, ids, context=None):
- result=self.read(cr,uid,ids)
+ result=self.read(cr,uid,ids)
mod_obj = self.pool.get('ir.module.module')
for res in result:
for r in res:
if r<>'id' and res[r]:
ids += mod_obj.search(cr, uid, [('name', '=', r)])
- mod_obj.action_install(cr, uid, ids, context=context)
+ mod_obj.action_install(cr, uid, ids, context=context)
cr.commit()
db, pool = pooler.restart_pool(cr.dbname,force_demo=True, update_module=True)
return {
'view_type': 'form',
"view_mode": 'form',
- 'res_model': 'ir.module.module.configuration.wizard',
+ 'res_model': 'ir.actions.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
-
-
+
+
profile_accounting_config_install_modules_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/profile_accounting/profile_accounting.xml b/addons/profile_accounting/profile_accounting.xml
index d98b6d1f0d1..85737dcecf1 100644
--- a/addons/profile_accounting/profile_accounting.xml
+++ b/addons/profile_accounting/profile_accounting.xml
@@ -10,7 +10,7 @@
-
+
@@ -35,7 +35,7 @@
new
-
Accounting Profile : Install Extra modules
Install more modules. A few modules are proposed according to the Account Profile you selected. You will be able to install them based on our requirements.
diff --git a/addons/profile_association/profile_association.py b/addons/profile_association/profile_association.py
index 3ca64f5adbb..c68ac0dc77d 100644
--- a/addons/profile_association/profile_association.py
+++ b/addons/profile_association/profile_association.py
@@ -43,14 +43,14 @@ class profile_association_config_install_modules_wizard(osv.osv_memory):
return {
'view_type': 'form',
"view_mode": 'form',
- 'res_model': 'ir.module.module.configuration.wizard',
+ 'res_model': 'ir.actions.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
-
-
+
+
def action_install(self, cr, uid, ids, context=None):
- result=self.read(cr,uid,ids)
+ result=self.read(cr,uid,ids)
mod_obj = self.pool.get('ir.module.module')
for res in result:
for r in res:
@@ -62,12 +62,12 @@ class profile_association_config_install_modules_wizard(osv.osv_memory):
return {
'view_type': 'form',
"view_mode": 'form',
- 'res_model': 'ir.module.module.configuration.wizard',
+ 'res_model': 'ir.actions.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
-
-
+
+
profile_association_config_install_modules_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/profile_association/profile_association.xml b/addons/profile_association/profile_association.xml
index a1a8467fe51..1f70efe17b6 100644
--- a/addons/profile_association/profile_association.xml
+++ b/addons/profile_association/profile_association.xml
@@ -34,7 +34,7 @@
new
-
Association Profile : Install Extra modules
Install more modules. A few modules are proposed according to the association profile you selected. You will be able to install them based on our requirements.
diff --git a/addons/profile_manufacturing/profile_manufacturing.py b/addons/profile_manufacturing/profile_manufacturing.py
index 5ab575acde6..3ea2adbb230 100644
--- a/addons/profile_manufacturing/profile_manufacturing.py
+++ b/addons/profile_manufacturing/profile_manufacturing.py
@@ -75,12 +75,12 @@ class profile_manufacturing_config_install_modules_wizard(osv.osv_memory):
return {
'view_type': 'form',
"view_mode": 'form',
- 'res_model': 'ir.module.module.configuration.wizard',
+ 'res_model': 'ir.actions.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
def action_install(self, cr, uid, ids, context=None):
- result=self.read(cr,uid,ids)
+ result=self.read(cr,uid,ids)
mod_obj = self.pool.get('ir.module.module')
for res in result:
for r in res:
@@ -92,7 +92,7 @@ class profile_manufacturing_config_install_modules_wizard(osv.osv_memory):
return {
'view_type': 'form',
"view_mode": 'form',
- 'res_model': 'ir.module.module.configuration.wizard',
+ 'res_model': 'ir.actions.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
diff --git a/addons/profile_manufacturing/profile_manufacturing.xml b/addons/profile_manufacturing/profile_manufacturing.xml
index 2d41b6d577a..f4f917afe97 100644
--- a/addons/profile_manufacturing/profile_manufacturing.xml
+++ b/addons/profile_manufacturing/profile_manufacturing.xml
@@ -11,13 +11,13 @@
-
+
-
+
-
+
@@ -38,7 +38,7 @@
new
-
Manufacturing Profile : Install Extra modules
Install more modules. A few modules are proposed according to the manufacturing profile you selected. You will be able to install them based on our requirements.
diff --git a/addons/profile_service/profile_service.py b/addons/profile_service/profile_service.py
index 4dd4d83c24a..88755b28238 100644
--- a/addons/profile_service/profile_service.py
+++ b/addons/profile_service/profile_service.py
@@ -50,24 +50,24 @@ class profile_service_config_install_modules_wizard(osv.osv_memory):
return {
'view_type': 'form',
"view_mode": 'form',
- 'res_model': 'ir.module.module.configuration.wizard',
+ 'res_model': 'ir.actions.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
def action_install(self, cr, uid, ids, context=None):
- result=self.read(cr,uid,ids)
+ result=self.read(cr,uid,ids)
mod_obj = self.pool.get('ir.module.module')
for res in result:
for r in res:
- if r<>'id' and res[r]:
- ids = mod_obj.search(cr, uid, [('name', '=', r)])
- mod_obj.action_install(cr,uid,ids,context=context)
+ if r<>'id' and res[r]:
+ ids = mod_obj.search(cr, uid, [('name', '=', r)])
+ mod_obj.action_install(cr,uid,ids,context=context)
cr.commit()
db, pool = pooler.restart_pool(cr.dbname,force_demo=True, update_module=True)
return {
'view_type': 'form',
"view_mode": 'form',
- 'res_model': 'ir.module.module.configuration.wizard',
+ 'res_model': 'ir.actions.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
diff --git a/addons/profile_service/profile_service.xml b/addons/profile_service/profile_service.xml
index 50e90f4c1d1..d2080232f71 100644
--- a/addons/profile_service/profile_service.xml
+++ b/addons/profile_service/profile_service.xml
@@ -21,7 +21,7 @@
-
+
@@ -42,7 +42,7 @@
new
-
Service Profile : Install Extra modules
A few modules are proposed according to the 'service profile' you selected. You will be able to install them or more modules later through the Administration menu.
diff --git a/addons/project/__terp__.py b/addons/project/__terp__.py
index cbef75ca0e3..d153de14336 100644
--- a/addons/project/__terp__.py
+++ b/addons/project/__terp__.py
@@ -32,7 +32,7 @@
"author" : "Tiny",
"website" : "http://tinyerp.com/module_project.html",
"category" : "Generic Modules/Projects & Services",
- "depends" : ["product", "account", "hr"],
+ "depends" : ["product", "account", "hr", "process"],
"description": "Project management module that track multi-level projects, tasks, works done on tasks, eso. It is able to render planning, order tasks, eso.",
"init_xml" : [],
"demo_xml" : ["project_demo.xml"],
@@ -43,6 +43,7 @@
"project_wizard.xml",
"project_view.xml",
"project_report.xml",
+ "process/task_process.xml"
],
"active": False,
"installable": True
diff --git a/addons/project/process/task_process.xml b/addons/project/process/task_process.xml
new file mode 100644
index 00000000000..6be52bd3490
--- /dev/null
+++ b/addons/project/process/task_process.xml
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml
index bfb85802320..0f518ab67b2 100644
--- a/addons/project/project_view.xml
+++ b/addons/project/project_view.xml
@@ -310,13 +310,28 @@
calendar
-
+
-
+
+
+ project.task.gantt
+ project.task
+ gantt
+
+
+
+
+
+
+
+
+
+
+
project.task.graph
project.task
graph
@@ -333,7 +348,7 @@
All Tasks
project.task
form
- tree,form,calendar,graph
+ tree,form,calendar,gantt,graph
@@ -342,7 +357,7 @@
My Tasks
project.task
form
- tree,form,calendar,graph
+ tree,form,calendar,gantt,graph
[('user_id', '=', uid)]
diff --git a/addons/project_mrp/__terp__.py b/addons/project_mrp/__terp__.py
index 208b879cef7..e83b5e832db 100644
--- a/addons/project_mrp/__terp__.py
+++ b/addons/project_mrp/__terp__.py
@@ -5,7 +5,7 @@
"author" : "Tiny",
"website" : "http://tinyerp.com/module_project.html",
"category" : "Generic Modules/Projects & Services",
- "depends" : ["project", 'mrp'],
+ "depends" : ["project", 'mrp', "sale"],
"description": """
This module is used to automatically create tasks base on different
procurements: sales order, manufacturing order, ...
@@ -15,7 +15,9 @@ order on services products.
""",
"init_xml" : [],
"demo_xml" : [],
- "update_xml": ["project_workflow.xml"],
+ "update_xml": ["project_workflow.xml",
+ "process/project_mrp_process.xml"
+ ],
"active": False,
"installable": True
}
diff --git a/addons/project_mrp/process/project_mrp_process.xml b/addons/project_mrp/process/project_mrp_process.xml
new file mode 100644
index 00000000000..0c856b7a96d
--- /dev/null
+++ b/addons/project_mrp/process/project_mrp_process.xml
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/purchase/__terp__.py b/addons/purchase/__terp__.py
index d5d50f6d5f8..0c24b8df2f4 100644
--- a/addons/purchase/__terp__.py
+++ b/addons/purchase/__terp__.py
@@ -31,7 +31,7 @@
"version" : "1.0",
"author" : "Tiny",
"website" : "http://tinyerp.com/module_purchase.html",
- "depends" : ["base", "account", "stock"],
+ "depends" : ["base", "account", "stock", "process"],
"category" : "Generic Modules/Sales & Purchases",
"init_xml" : [],
"demo_xml" : ["purchase_demo.xml",
@@ -47,7 +47,8 @@
"purchase_report.xml",
"purchase_wizard.xml",
"stock_view.xml",
- "partner_view.xml"
+ "partner_view.xml",
+ "process/purchase_process.xml"
],
"active": False,
"installable": True
diff --git a/addons/purchase/process/purchase_process.xml b/addons/purchase/process/purchase_process.xml
new file mode 100644
index 00000000000..d100c4a772c
--- /dev/null
+++ b/addons/purchase/process/purchase_process.xml
@@ -0,0 +1,155 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index d0f2951de54..84074b0a0ae 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -228,7 +228,7 @@ class purchase_order(osv.osv):
return {'value':{'partner_address_id': False}}
addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['default'])
pricelist = self.pool.get('res.partner').property_get(cr, uid,
- part,property_pref=['property_product_pricelist_purchase']).get('property_product_pricelist_purchase',False)
+ part,property_pref=['property_product_pricelist_purchase']).get('property_product_pricelist_purchase',False)
return {'value':{'partner_address_id': addr['default'], 'pricelist_id': pricelist}}
def wkf_approve_order(self, cr, uid, ids):
@@ -419,11 +419,11 @@ class purchase_order_line(osv.osv):
def product_id_change(self, cr, uid, ids, pricelist, product, qty, uom,
partner_id, date_order=False):
- prod= self.pool.get('product.product').browse(cr, uid,product)
if not pricelist:
raise osv.except_osv(_('No Pricelist !'), _('You have to select a pricelist in the purchase form !\nPlease set one before choosing a product.'))
if not product:
return {'value': {'price_unit': 0.0, 'name':'','notes':'', 'product_uom' : False}, 'domain':{'product_uom':[]}}
+ prod= self.pool.get('product.product').browse(cr, uid,product)
lang=False
if partner_id:
lang=self.pool.get('res.partner').read(cr, uid, partner_id)['lang']
@@ -452,9 +452,9 @@ class purchase_order_line(osv.osv):
if partner_id:
taxep_id = self.pool.get('res.partner').property_get(cr, uid,partner_id,property_pref=['property_account_supplier_tax']).get('property_account_supplier_tax',False)
if taxep_id:
- taxep=self.pool.get('account.tax').browse(cr, uid,taxep_id)
+ taxep=self.pool.get('account.tax').browse(cr, uid,taxep_id)
if not taxep or not taxep.id:
- res['value']['taxes_id'] = [x.id for x in product.taxes_id]
+ res['value']['taxes_id'] = [x.id for x in prod['supplier_taxes_id']]
else:
res5 = [taxep.id]
for t in taxes:
diff --git a/addons/purchase/report/order.rml b/addons/purchase/report/order.rml
index f46c47e6a6b..86fb8008807 100644
--- a/addons/purchase/report/order.rml
+++ b/addons/purchase/report/order.rml
@@ -10,7 +10,11 @@
-
+
+
+
+
+
@@ -95,8 +99,11 @@
-
-
+
+
+
+
+
@@ -133,40 +140,70 @@
[[ repeatIn(objects,'o') ]]
-
+
-
+
|
- [[ repeatIn(o.dest_address_id and [o.dest_address_id] or [],'addr') ]]
- Shipping address :
- [[ addr.partner_id.title or '' ]][[ addr.partner_id.name ]]
- [[ addr.title or '' ]][[ addr.name ]]
- [[ addr.street ]]
- [[ addr.street2 or '' ]]
- [[ addr.zip or '' ]] [[ addr.city or '' ]]
- [[ addr.state_id and addr.state_id.name or '' ]]
- [[ addr.country_id and addr.country_id.name or '' ]]
- |
-
- [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]
- [[ o.partner_address_id.title or '' ]] [[ o.partner_address_id.name ]]
- [[ o.partner_address_id.street ]]
- [[ o.partner_address_id.street2 or '' ]]
- [[ o.partner_address_id.zip or '' ]] [[ o.partner_address_id.city or '' ]]
- [[ o.partner_address_id.state_id and o.partner_address_id.state_id.name or '' ]]
- [[ o.partner_address_id.country_id and o.partner_address_id.country_id.name or '' ]]
-
+
+
+ |
+
+
+
+ |
+
+
+ |
+ [[ repeatIn(o.dest_address_id and [o.dest_address_id] or [],'addr') ]]
+ Shipping address :
+ [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]
+ [[ addr.title or '' ]] [[ addr.name ]]
+ [[ addr.street ]]
+ [[ addr.street2 or '' ]]
+ [[ addr.zip or '' ]] [[ addr.city or '' ]]
+ [[ addr.state_id and addr.state_id.name or '' ]]
+ [[ addr.country_id and addr.country_id.name or '' ]]
+ |
+
+
+
- Tél. : [[ o.partner_address_id.phone or '' ]]
- Fax : [[ o.partner_address_id.fax or '' ]]
- TVA :[[ o.partner_id.vat or '' ]]
+ |
+
+
+
+
+ |
+
+ [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]
+ [[ o.partner_address_id.title or '' ]] [[ o.partner_address_id.name ]]
+ [[ o.partner_address_id.street ]]
+ [[ o.partner_address_id.street2 or '' ]]
+ [[ o.partner_address_id.zip or '' ]] [[ o.partner_address_id.city or '' ]]
+ [[ o.partner_address_id.state_id and o.partner_address_id.state_id.name or '' ]]
+ [[ o.partner_address_id.country_id and o.partner_address_id.country_id.name or '' ]]
+
+
+
+ Tel. : [[ o.partner_address_id.phone or '' ]]
+ Fax : [[ o.partner_address_id.fax or '' ]]
+ TVA : [[ o.partner_id.vat or '' ]]
|
- Request for Quotation [[ (o.state=='draft' or removeParentNode('font')) and '' ]] Order [[ (o.state<>'draft' or removeParentNode('font')) and '' ]] N° :[[ o.name ]]
+
+
+
+
+
+
+
+
+
+ [[ (o.state=='draft' or removeParentNode('font')) and 'Request for Quotation' ]] [[ (o.state<>'draft' or removeParentNode('font')) and 'Purchase Order Confirmation' ]] N° [[ o.name ]]
@@ -198,7 +235,7 @@
[[ o.partner_ref or '' ]]
|
- [[ time.strftime('%d/%m/%Y', time.strptime(o.date_order, '%Y-%m-%d')) ]]
+ [[ time.strftime('%d/%m/%Y', time.strptime(line.date_planned, '%Y-%m-%d %H:%M:%S')) ]]
|
[[ o.validator and o.validator.name or '' ]]
@@ -208,7 +245,7 @@
-
+
Description
@@ -232,7 +269,7 @@
[[ repeatIn(o.order_line,'line') ]]
-
+
|
[[ line.name ]]
@@ -241,7 +278,7 @@
[[ ', '.join(map(lambda x: x.name, line.taxes_id)) ]]
|
- [[ time.strftime('%d/%m/%Y', time.strptime(line.date_planned, '%Y-%m-%d %H:%M:%S')) ]]
+ [[ time.strftime('%d/%m/%Y', time.strptime( line.date_planned, '%Y-%m-%d')) ]]
|
[[ line.product_qty ]]
@@ -258,7 +295,7 @@
|
|
- [[ line.notes or removeParentNode('tr') ]]
+ [[ line.notes or removeParentNode('tr') ]]
|
@@ -293,7 +330,7 @@
|
-
+
|
@@ -333,7 +370,7 @@
|
- Total :
+ Total :
|
[[ o.amount_total ]]
diff --git a/addons/purchase/report/request_quotation.rml b/addons/purchase/report/request_quotation.rml
index 40feb54ed89..06935910d35 100644
--- a/addons/purchase/report/request_quotation.rml
+++ b/addons/purchase/report/request_quotation.rml
@@ -161,10 +161,6 @@
- [[ user.name or '' ]]
-
-
-
[[ user.signature or '' ]]
diff --git a/addons/report_analytic_line/report_analytic_line_view.xml b/addons/report_analytic_line/report_analytic_line_view.xml
index 90e31c99d93..f0f2311f703 100644
--- a/addons/report_analytic_line/report_analytic_line_view.xml
+++ b/addons/report_analytic_line/report_analytic_line_view.xml
@@ -57,9 +57,7 @@
tree,graph
-
-
-
+
diff --git a/addons/report_document/__init__.py b/addons/report_document/__init__.py
new file mode 100644
index 00000000000..ca50266ac0c
--- /dev/null
+++ b/addons/report_document/__init__.py
@@ -0,0 +1,4 @@
+# -*- encoding: utf-8 -*-
+import report_document
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/report_document/__terp__.py b/addons/report_document/__terp__.py
new file mode 100644
index 00000000000..f0e19fe4de9
--- /dev/null
+++ b/addons/report_document/__terp__.py
@@ -0,0 +1,20 @@
+# -*- encoding: utf-8 -*-
+{
+ "name" : "Document Management - Reporting",
+ "version" : "1.0",
+ "author" : "Tiny",
+ "depends" : ["document"],
+ "category" : "Generic Modules/Document Management",
+ "description": """
+ Reporting for the Document Management module:
+ * Files by my
+ * Files by all users
+ """,
+ "init_xml" : [],
+ "demo_xml" : [],
+ "update_xml" : ["report_document_view.xml"],
+ "active": False,
+ "installable": True
+ }
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/report_document/report_document.py b/addons/report_document/report_document.py
new file mode 100644
index 00000000000..1743f6921c7
--- /dev/null
+++ b/addons/report_document/report_document.py
@@ -0,0 +1,155 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
+#
+# $Id: sale.py 1005 2005-07-25 08:41:42Z nicoe $
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+##############################################################################
+
+from osv import fields,osv
+import time
+
+
+class report_document_user(osv.osv):
+ _name = "report.document.user"
+ _description = "Files details by Users"
+ _auto = False
+ _columns = {
+ 'name': fields.date('Month', readonly=True),
+ 'month': fields.char('Month', size=24,readonly=True),
+ 'user_id':fields.integer('Owner', readonly=True),
+ 'user':fields.char('User',size=64,readonly=True),
+ 'file_title': fields.char('File Name',size=64,readonly=True),
+ 'directory': fields.char('Directory',size=64,readonly=True),
+ 'create_date': fields.datetime('Date Created', readonly=True),
+ 'change_date': fields.datetime('Modified Date', readonly=True),
+ 'file_size': fields.integer('File Size', readonly=True),
+ 'nbr':fields.integer('# of Files', readonly=True),
+ 'type':fields.char('Directory Type',size=64,readonly=True),
+ 'partner':fields.char('Partner',size=64,readonly=True),
+ }
+ def init(self, cr):
+ cr.execute("""
+ create or replace view report_document_user as (
+ select
+ min(f.id) as id,
+ f.user_id as user_id,
+ u.name as user,
+ count(*) as nbr,
+ to_char(f.create_date,'YYYY-MM')||'-'||'01' as name,
+ d.name as directory,
+ f.create_date as create_date,
+ f.file_size as file_size,
+ min(f.title) as file_title,
+ min(d.type) as type,
+ min(EXTRACT(MONTH FROM f.create_date)||'-'||substring(to_char(f.create_date,'YY-Month-DD') from 4 for 9)) as month,
+ f.write_date as change_date
+ from ir_attachment f
+ left join document_directory d on (f.parent_id=d.id and d.name<>'')
+ inner join res_users u on (f.user_id=u.id)
+ group by d.name,f.parent_id,d.type,f.create_date,f.user_id,f.file_size,u.name,d.type,f.write_date
+ )
+ """)
+report_document_user()
+
+class report_files_partenr(osv.osv):
+ _name = "report.files.partenr"
+ _description = "Files details by Partners"
+ _auto = False
+ _columns = {
+ 'name': fields.date('Month', readonly=True),
+ 'file_title': fields.char('File Name',size=64,readonly=True),
+ 'directory': fields.char('Directory',size=64,readonly=True),
+ 'create_date': fields.datetime('Date Created', readonly=True),
+ 'change_date': fields.datetime('Modified Date', readonly=True),
+ 'file_size': fields.integer('File Size', readonly=True),
+ 'nbr':fields.integer('# of Files', readonly=True),
+ 'type':fields.char('Directory Type',size=64,readonly=True),
+ 'partner':fields.char('Partner',size=64,readonly=True),
+ }
+ def init(self, cr):
+ cr.execute("""
+ create or replace view report_files_partenr as (
+ select min(f.id) as id,count(*) as nbr,min(to_char(f.create_date,'YYYY-MM')||'-'||'01') as name,min(f.title) as file_title,p.name as partner from ir_attachment f inner join res_partner p on (f.partner_id=p.id) group by p.name
+ )
+ """)
+report_files_partenr()
+
+class report_document_file(osv.osv):
+ _name = "report.document.file"
+ _description = "Files details by Directory"
+ _auto = False
+ _columns = {
+ 'file_size': fields.integer('File Size', readonly=True),
+ 'nbr':fields.integer('# of Files', readonly=True),
+ 'month': fields.char('Month', size=24,readonly=True),
+ }
+ _order = "month"
+ def init(self, cr):
+ cr.execute("""
+ create or replace view report_document_file as (
+ select min(f.id) as id,count(*) as nbr,
+ min(EXTRACT(MONTH FROM f.create_date)||'-'||substring(to_char(f.create_date,'YY-Month-DD') from 4 for 9)) as month,
+ sum(f.file_size) as file_size
+ from ir_attachment f
+ group by EXTRACT(MONTH FROM f.create_date)
+ )
+ """)
+
+report_document_file()
+
+class report_document_wall(osv.osv):
+ _name = "report.document.wall"
+ _description = "Users that did not inserted documents since one month"
+ _auto = False
+ _columns = {
+ 'name': fields.date('Month', readonly=True),
+ 'user_id':fields.many2one('res.users', 'Owner',readonly=True),
+ 'user':fields.char('User',size=64,readonly=True),
+ 'month': fields.char('Month', size=24,readonly=True),
+ 'file_name':fields.char('Last Posted File Name',size=64,readonly=True),
+ 'last':fields.datetime('Last Posted Time', readonly=True),
+ }
+
+ def init(self, cr):
+ cr.execute("""
+ create or replace view report_document_wall as (
+ select max(f.id) as id,
+ min(title) as file_name,
+ to_char(min(f.create_date),'YYYY-MM-DD HH24:MI:SS') as last,
+ f.user_id as user_id,f.user_id as user,
+ substring(to_char(f.create_date,'YY-Month-DD') from 4 for 9) as month
+ from ir_attachment f
+ where create_date in (
+ select max(create_date)
+ from ir_attachment i
+ inner join res_users u on (i.user_id=u.id)
+ group by i.user_id) group by f.user_id,f.create_date
+ having (to_date(substring(CURRENT_DATE for 10),'YYYY-MM-DD') - to_date(substring(f.create_date for 10),'YYYY-MM-DD')) > 30
+ )
+ """)
+report_document_wall()
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/report_document/report_document_view.xml b/addons/report_document/report_document_view.xml
new file mode 100644
index 00000000000..c0a67d101e4
--- /dev/null
+++ b/addons/report_document/report_document_view.xml
@@ -0,0 +1,288 @@
+
+
+
+
+
+ report.document.user.form
+ report.document.user
+ form
+
+
+
+
+
+
+
+ report.document.user.tree
+ report.document.user
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ My files (This months)
+ report.document.user
+ form
+ tree
+ [('user_id','=',uid),('name','=',time.strftime('%Y-%m-01'))]
+
+
+
+
+
+
+
+
+ My files (All months)
+ report.document.user
+ form
+ tree,graph
+ [('user_id','=',uid)]
+
+
+
+
+
+
+ All Users files (This month)
+ report.document.user
+ form
+ tree,graph
+ [('name','=',time.strftime('%Y-%m-01'))]
+
+
+
+
+
+ All Users files (All months)
+ report.document.user
+ form
+ tree
+
+
+
+
+
+
+ report.document.wall.form
+ report.document.wall
+ form
+
+
+
+
+
+
+
+ report.document.wall.tree
+ report.document.wall
+ tree
+
+
+
+
+
+
+
+
+
+
+
+ Wall of Shame
+ report.document.wall
+ form
+ tree,form
+
+
+
+
+
+
+
+ report.document.resource.graph
+ report.document.user
+ graph
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Files by Resource Type
+ report.document.user
+
+ form
+ tree
+
+
+
+
+
+ report.document.user.graph
+ report.document.file
+ graph
+
+
+
+
+
+
+
+
+
+ report.document.user.tree
+ report.document.file
+ tree
+
+
+
+
+
+
+
+
+ File Size by Month
+ report.document.file
+
+ form
+ tree
+
+
+
+
+
+
+ report.file.month.graph
+ report.document.user
+ graph
+
+
+
+
+
+
+
+
+
+
+
+
+ report.file.month.tree
+ report.document.user
+ tree
+
+
+
+
+
+
+
+
+
+ Files by Month
+ report.document.user
+
+ form
+ tree
+
+
+
+
+
+
+ report.document.user.graph
+ report.document.user
+ graph
+
+
+
+
+
+
+
+
+
+ Files By Users
+ report.document.user
+
+ form
+ tree
+
+
+
+
+
+
+ view.files.partenr.graph
+ report.files.partenr
+ graph
+
+
+
+
+
+
+
+
+
+
+ view.files.partner.tree
+ report.files.partenr
+ tree
+
+
+
+
+
+
+
+
+
+ Files Per Month
+ report.files.partenr
+
+ form
+ tree
+
+
+
+
+
diff --git a/addons/report_intrastat/report_intrastat_view.xml b/addons/report_intrastat/report_intrastat_view.xml
index 50349d32d87..9432091beca 100644
--- a/addons/report_intrastat/report_intrastat_view.xml
+++ b/addons/report_intrastat/report_intrastat_view.xml
@@ -96,7 +96,8 @@
[('name','=',time.strftime('%Y-%m-01'))]
-
+
+
Intrastat
@@ -106,6 +107,7 @@
tree
-
+
+
diff --git a/addons/sale/__terp__.py b/addons/sale/__terp__.py
index f540f33ea4b..b7965f3f316 100644
--- a/addons/sale/__terp__.py
+++ b/addons/sale/__terp__.py
@@ -31,7 +31,7 @@
"version" : "1.0",
"author" : "Tiny",
"website" : "http://tinyerp.com/module_sale.html",
- "depends" : ["product", "stock", "mrp"],
+ "depends" : ["product", "stock", "mrp", "process"],
"category" : "Generic Modules/Sales & Purchases",
"init_xml" : [],
"demo_xml" : ["sale_demo.xml"],
@@ -62,6 +62,7 @@
"sale_report.xml",
"sale_wizard.xml",
"stock_view.xml",
+ "process/sale_process.xml",
"product_view.xml",
],
"active": False,
diff --git a/addons/sale/process/sale_process.xml b/addons/sale/process/sale_process.xml
new file mode 100644
index 00000000000..e6b7c1a3c52
--- /dev/null
+++ b/addons/sale/process/sale_process.xml
@@ -0,0 +1,274 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/sale/product.py b/addons/sale/product.py
index 5054aabeabf..bbae1427ae7 100644
--- a/addons/sale/product.py
+++ b/addons/sale/product.py
@@ -32,53 +32,46 @@
from osv import fields, osv
from tools import config
-class product_pricelist(osv.osv):
- _inherit = "product.pricelist"
- def _compute_price(self, cr, uid, ids, field_name, arg, context):
- res = {}
- for id in ids:
- res[id]=0.0
- return res
- _columns = {
- 'price': fields.function(_compute_price, type='float', method=True, string='Price', digits=(16, int(config['price_accuracy']))),
- }
-product_pricelist()
+
class product_product(osv.osv):
_name = 'product.product'
_inherit = 'product.product'
- def _pricelist_sale_ids(self, cr, uid, ids, name, arg, context=None):
+ def _pricelist_calculate(self, cr, uid, ids, name, arg, context=None):
result = {}
- if not context:
- context={}
+ format=""
pricelist_obj=self.pool.get('product.pricelist')
- for product in self.browse(cr, uid, ids, context):
- pricelist_ids=pricelist_obj.search(cr,uid,[('type','=','sale')], context=context)
- result[product.id]=pricelist_ids
- return result
-
- def _pricelist_purchase_ids(self, cr, uid, ids, name, arg, context=None):
- result = {}
- pricelist_obj=self.pool.get('product.pricelist')
- for product in self.browse(cr, uid, ids, context):
+ if name=='pricelist_purchase':
pricelist_ids=pricelist_obj.search(cr,uid,[('type','=','purchase')])
- result[product.id]=pricelist_ids
+ else:
+ pricelist_ids=pricelist_obj.search(cr,uid,[('type','=','sale')])
+ pricelist_browse=pricelist_obj.browse(cr,uid,pricelist_ids)
+ for product in self.browse(cr, uid, ids, context):
+ for pricelist in pricelist_browse:
+ for version in pricelist.version_id:
+ for items in version.items_id:
+ qty=items.min_quantity
+ price=pricelist_obj.price_get(cr, uid,[pricelist.id],product.id,qty,partner=None, context=None)
+ if name=='pricelist_purchase':
+ format+=pricelist.name + "\t" +str(qty) +" \t\t" + str(price[pricelist.id]) + "\n"
+ else:
+ format+=pricelist.name + "\t\t\t" +str(qty) +" \t\t\t" + str(price[pricelist.id]) + "\n"
+ result[product.id]=format
+ format=""
return result
_columns = {
'pricelist_sale':fields.function(
- _pricelist_sale_ids,
+ _pricelist_calculate,
method=True,
- relation='product.pricelist',
string='Sale Pricelists',
- type="many2many"),
+ type="text"),
'pricelist_purchase':fields.function(
- _pricelist_purchase_ids,
+ _pricelist_calculate,
method=True,
- relation='product.pricelist',
string='Purchase Pricelists',
- type="many2many"),
+ type="text"),
}
product_product()
diff --git a/addons/sale/product_view.xml b/addons/sale/product_view.xml
index 582bffa3cd9..a32b7a536f7 100644
--- a/addons/sale/product_view.xml
+++ b/addons/sale/product_view.xml
@@ -10,20 +10,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
diff --git a/addons/sale/report/shipping.rml b/addons/sale/report/shipping.rml
index 82b3eac3cc0..35bc22beba9 100644
--- a/addons/sale/report/shipping.rml
+++ b/addons/sale/report/shipping.rml
@@ -241,10 +241,10 @@
[[ line.product_uom and line.product_uom.name ]]
|
- [[ line.sale_line_id.price_unit ]]
+ [[ line.sale_line_id and line.sale_line_id.price_unit ]]
|
- [[ line.sale_line_id.price_subtotal ]]
+ [[ line.sale_line_id and line.sale_line_id.price_subtotal ]]
|
@@ -263,7 +263,7 @@
Net Total :
|
- [[ o.sale_id.amount_untaxed ]]
+ [[ o.sale_id and o.sale_id.amount_untaxed ]]
|
@@ -276,7 +276,7 @@
Total :
|
- [[ o.sale_id.amount_total ]]
+ [[ o.sale_id and o.sale_id.amount_total ]]
|
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 1fd812db08b..3bbc650816b 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -812,7 +812,7 @@ class sale_order_line(osv.osv):
'message': warn_msg
}
result['product_uom_qty'] = qty
-
+
if uom:
uom2 = product_uom_obj.browse(cr, uid, uom)
if product_obj.uom_id.category_id.id <> uom2.category_id.id:
@@ -839,7 +839,7 @@ class sale_order_line(osv.osv):
taxep_id = self.pool.get('res.partner').property_get(cr, uid,
partner_id,property_pref=['property_account_tax']).get('property_account_tax',False)
if taxep_id:
- taxep=self.pool.get('account.tax').browse(cr, uid,taxep_id)
+ taxep=self.pool.get('account.tax').browse(cr, uid,taxep_id)
if not taxep or not taxep.id:
result['tax_id'] = [x.id for x in product_obj.taxes_id]
else:
@@ -884,7 +884,7 @@ class sale_order_line(osv.osv):
# Round the quantity up
# get unit price
-
+
if not pricelist:
warning={
'title':'No Pricelist !',
@@ -904,9 +904,9 @@ class sale_order_line(osv.osv):
'message':
"Couldn't find a pricelist line matching this product and quantity.\n"
"You have to change either the product, the quantity or the pricelist."
- }
+ }
else:
- result.update({'price_unit': price})
+ result.update({'price_unit': price})
return {'value': result, 'domain': domain,'warning':warning}
def product_uom_change(self, cursor, user, ids, pricelist, product, qty=0,
@@ -962,7 +962,7 @@ class sale_config_picking_policy(osv.osv_memory):
return {
'view_type': 'form',
"view_mode": 'form',
- 'res_model': 'ir.module.module.configuration.wizard',
+ 'res_model': 'ir.actions.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
@@ -970,7 +970,7 @@ class sale_config_picking_policy(osv.osv_memory):
return {
'view_type': 'form',
"view_mode": 'form',
- 'res_model': 'ir.module.module.configuration.wizard',
+ 'res_model': 'ir.actions.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 3dfeb6d9872..0e672a62112 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -44,7 +44,7 @@
-
+
sale.order.calendar
sale.order
@@ -116,20 +116,20 @@
-
@@ -479,7 +479,7 @@
-
+
Select the default picking policy for Sale Order
This Configuration step use to set default picking policy when make sale order
diff --git a/addons/sale_journal/sale_journal_view.xml b/addons/sale_journal/sale_journal_view.xml
index 7647a7b2bfb..17975fe9755 100644
--- a/addons/sale_journal/sale_journal_view.xml
+++ b/addons/sale_journal/sale_journal_view.xml
@@ -285,7 +285,7 @@
form
-
+
diff --git a/addons/scrum/__terp__.py b/addons/scrum/__terp__.py
index 7be9cb422be..dfb466307c0 100644
--- a/addons/scrum/__terp__.py
+++ b/addons/scrum/__terp__.py
@@ -30,7 +30,7 @@
"name" : "Scrum, Agile Development Method",
"version": "1.0",
"author" : "Tiny",
- "depends" : ["project"],
+ "depends" : ["project", "process"],
"category" : "Enterprise Specific Modules/Information Technology",
"init_xml" : [],
"description": """
@@ -61,6 +61,7 @@
"scrum_view.xml",
"scrum_report.xml",
"scrum_wizard.xml",
+ "process/scrum_process.xml",
],
"active": False,
"installable": True
diff --git a/addons/scrum/process/scrum_process.xml b/addons/scrum/process/scrum_process.xml
new file mode 100644
index 00000000000..344669f06c0
--- /dev/null
+++ b/addons/scrum/process/scrum_process.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 7f824dfd701..a981f21f674 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -808,7 +808,12 @@ class stock_move(osv.osv):
return (res and res[0]) or False
_name = "stock.move"
_description = "Stock Move"
-
+ def name_get(self, cr, uid, ids, context={}):
+ res = []
+ for line in self.browse(cr, uid, ids, context):
+ res.append((line.id, (line.product_id.code or '/')+': '+line.location_id.name+' > '+line.location_dest_id.name))
+ return res
+
def _check_tracking(self, cr, uid, ids):
for move in self.browse(cr, uid, ids):
if not move.prodlot_id and \
|