|
Sequence
|
- Name
+ Name [[ o.workcenter_lines ==[] and removeParentNode('blockTable')]]
|
WorkCenter
@@ -301,7 +286,7 @@
[[ repeatIn(o.workcenter_lines,'line2') ]]
-
+
[[ line2.sequence ]]
@@ -324,17 +309,14 @@
-
+
Bill Of Material
-
- Products to Consume
-
- [[ o.move_lines ==[] and removeParentNode('section')]]
+
|
Product
@@ -350,76 +332,58 @@
|
-
-
- [[ repeatIn(o.move_lines,'line') ]]
-
- |
- [[ line.product_id.code ]] [[ line.product_id.name ]]
- |
-
- [[ formatLang( line.product_qty) ]]
- |
-
- [[line.product_uom.name]]
- |
-
- [[ line.location_id.name ]]
- |
-
- [[ line.location_dest_id.name ]]
- |
-
-
-
-
-
-
-
- Consumed Products
-
-
- [[ o.move_lines2 ==[] and removeParentNode('section')]]
-
- |
- Product
- |
-
- Quantity
- |
-
- Source Location
- |
-
- Destination Location
- |
-
-
-
+ Products to Consume [[ o.move_lines ==[] and removeParentNode('section')]]
-
- [[ repeatIn(o.move_lines2,'line2') ]]
-
- |
- [[ line2.product_id.code ]] [[ line2.product_id.name ]]
- |
-
- [[ formatLang( line2.product_qty) ]]
- |
-
- [[line2.product_uom.name]]
- |
-
- [[ line2.location_id.name ]]
- |
-
- [[ line2.location_dest_id.name ]]
- |
-
-
-
+ [[ repeatIn(o.move_lines,'line') ]]
+
+
+ |
+ [[ line.product_id.code ]] [[ line.product_id.name ]]
+ |
+
+ [[ formatLang( line.product_qty) ]]
+ |
+
+ [[line.product_uom.name]]
+ |
+
+ [[ line.location_id.name ]]
+ |
+
+ [[ line.location_dest_id.name ]]
+ |
+
+
+
+
+
+ Consumed Products [[ o.move_lines2 ==[] and removeParentNode('section')]]
+
+ [[ repeatIn(o.move_lines2,'line2') ]]
+
+
+ |
+ [[ line2.product_id.code ]] [[ line2.product_id.name ]]
+ |
+
+ [[ formatLang( line2.product_qty) ]]
+ |
+
+ [[line2.product_uom.name]]
+ |
+
+ [[ line2.location_id.name ]]
+ |
+
+ [[ line2.location_dest_id.name ]]
+ |
+
+
+
+
+
+
-
-
\ No newline at end of file
+
diff --git a/addons/mrp/wizard/change_production_qty_view.xml b/addons/mrp/wizard/change_production_qty_view.xml
index 63d9dbcb451..b73d8bcc529 100644
--- a/addons/mrp/wizard/change_production_qty_view.xml
+++ b/addons/mrp/wizard/change_production_qty_view.xml
@@ -15,7 +15,7 @@
-
diff --git a/addons/partner_geo_assign/__openerp__.py b/addons/partner_geo_assign/__openerp__.py
index 2d18649236e..ccfe6ba7c45 100644
--- a/addons/partner_geo_assign/__openerp__.py
+++ b/addons/partner_geo_assign/__openerp__.py
@@ -26,12 +26,14 @@
'category': 'Generic Modules/Production',
'description': """
This is the module used by OpenERP SA to redirect customers to his partners,
-based on geolocalisation.
+based on geolocalization.
""",
'author': 'OpenERP SA',
'depends': ['crm'],
- 'update_xml': ['res_partner_view.xml'],
- 'demo_xml': [],
+ 'data': [
+ 'res_partner_view.xml',
+ 'crm_lead_view.xml',
+ ],
'installable': True,
'active': False,
'certificate': False,
diff --git a/addons/partner_geo_assign/partner_geo_assign.py b/addons/partner_geo_assign/partner_geo_assign.py
index 97bca0b1073..0134dd04e72 100644
--- a/addons/partner_geo_assign/partner_geo_assign.py
+++ b/addons/partner_geo_assign/partner_geo_assign.py
@@ -39,14 +39,14 @@ def geo_find(addr):
except Exception, e:
raise osv.except_osv(_('Network error'),
_('Could not contact geolocation servers, please make sure you have a working internet connection (%s)') % e)
-
+
class res_partner(osv.osv):
_inherit = "res.partner"
_columns = {
'partner_latitude': fields.float('Geo Latitude'),
'partner_longitude': fields.float('Geo Longitude'),
- 'date_assign': fields.date('Assignation Date'),
+ 'date_localization': fields.date('Geo Localization Date'),
'partner_weight': fields.integer('Weight',
help="Gives the probability to assign a lead to this partner. (0 means no assignation.)"),
}
@@ -64,7 +64,7 @@ class res_partner(osv.osv):
self.write(cr, uid, [partner.id], {
'partner_latitude': result[0],
'partner_longitude': result[1],
- 'date_assign': time.strftime('%Y-%m-%d')
+ 'date_localization': time.strftime('%Y-%m-%d')
}, context=context)
return True
res_partner()
@@ -74,33 +74,7 @@ class crm_lead(osv.osv):
_columns = {
'partner_latitude': fields.float('Geo Latitude'),
'partner_longitude': fields.float('Geo Longitude'),
- 'partner_assigned_id': fields.many2one('res.partner','Assigned Partner'),
- 'date_assign': fields.date('Assignation Date')
}
- def forward_to_partner(self, cr, uid, ids, context=None):
- fobj = self.pool.get('crm.lead.forward.to.partner')
- for lead in self.browse(cr, uid, ids, context=context):
- context = {'active_id': lead.id, 'active_ids': [lead.id], 'active_model': 'crm.lead'}
- if lead.partner_assigned_id:
- email = False
- if lead.partner_assigned_id.address:
- email = lead.partner_assigned_id.address[0].email
- if not email:
- raise osv.except_osv(_('Error !'), _('No email on the partner assigned to this opportunity'))
-
- values = fobj.default_get(cr, uid, ['name', 'email_from'], context=context)
- if not values.get('email_from'):
- raise osv.except_osv(_('Error !'), _('Please set an email address in your user preferences'))
- values.update({
- 'history': 'whole',
- 'email_to': email,
- 'message': fobj._get_case_history(cr, uid, 'whole', lead.id, context) or False,
- })
- forward = fobj.create(cr, uid, values, context)
- fobj.action_forward(cr, uid, [forward], context)
- else:
- raise osv.except_osv(_('Error !'), _('No partner assigned to this opportunity'))
- return True
def assign_partner(self, cr, uid, ids, context=None):
ok = False
diff --git a/addons/partner_geo_assign/res_partner_view.xml b/addons/partner_geo_assign/res_partner_view.xml
index 26322f23495..f9310fdfbd0 100644
--- a/addons/partner_geo_assign/res_partner_view.xml
+++ b/addons/partner_geo_assign/res_partner_view.xml
@@ -1,33 +1,6 @@
-
- crm.lead.geo_assign.inherit
- crm.lead
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
res.partner.geo.inherit
res.partner
@@ -35,7 +8,7 @@
-
+
-
+
-
diff --git a/addons/profile_tools/misc_tools_installer.xml b/addons/profile_tools/misc_tools_installer.xml
index efef1dc3649..84b47128fff 100644
--- a/addons/profile_tools/misc_tools_installer.xml
+++ b/addons/profile_tools/misc_tools_installer.xml
@@ -20,7 +20,10 @@
Here are a few useful applications which, while they don't directly contribute to your business, can improve on it or improve your OpenERP experience
+ >Here are a few useful applications which, while they do not directly contribute to your business, can help you to improve your organization.
+
+
+ Configure
diff --git a/addons/project/wizard/project_task_delegate_view.xml b/addons/project/wizard/project_task_delegate_view.xml
index 762810eba64..68ebb1692d2 100644
--- a/addons/project/wizard/project_task_delegate_view.xml
+++ b/addons/project/wizard/project_task_delegate_view.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py
index f1b4ab804c9..e1233bc413e 100644
--- a/addons/project_long_term/project_long_term.py
+++ b/addons/project_long_term/project_long_term.py
@@ -93,8 +93,8 @@ class project_phase(osv.osv):
_columns = {
'name': fields.char("Name", size=64, required=True),
- 'date_start': fields.datetime('Start Date', help="Starting Date of the phase"),
- 'date_end': fields.datetime('End Date', help="Ending Date of the phase"),
+ 'date_start': fields.date('Start Date', help="Starting Date of the phase"),
+ 'date_end': fields.date('End Date', help="Ending Date of the phase"),
'constraint_date_start': fields.datetime('Start Date', help='force the phase to start after this date'),
'constraint_date_end': fields.datetime('End Date', help='force the phase to finish before this date'),
'project_id': fields.many2one('project.project', 'Project', required=True),
@@ -114,7 +114,7 @@ class project_phase(osv.osv):
'responsible_id': lambda obj,cr,uid,context: uid,
'state': 'draft',
'sequence': 10,
- 'product_uom': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', 'day')], context=c)[0]
+ 'product_uom': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('Day'))], context=c)[0]
}
_order = "name"
_constraints = [
diff --git a/addons/sale_layout/__init__.py b/addons/sale_layout/__init__.py
new file mode 100755
index 00000000000..e0a5a2b9f9c
--- /dev/null
+++ b/addons/sale_layout/__init__.py
@@ -0,0 +1,25 @@
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+import sale_layout
+import report
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/sale_layout/__openerp__.py b/addons/sale_layout/__openerp__.py
new file mode 100755
index 00000000000..c8868de9c2b
--- /dev/null
+++ b/addons/sale_layout/__openerp__.py
@@ -0,0 +1,48 @@
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+{
+ "name" : "Sale Order Layout Improvement",
+ "version" : "1.0",
+ "depends" : ["base", "sale"],
+ "author" : "Tiny",
+ "description": """
+ This module provides some features to improve the layout of the Sale Order.
+
+ It gives you the possibility to
+ * order all the lines of an sale order
+ * add titles, comment lines, sub total lines
+ * draw horizontal lines and put page breaks
+
+ """,
+ "website" : "http://www.openerp.com",
+ "category" : "Generic Modules/Sales & Purchases",
+ "init_xml" : [],
+ "demo_xml" : [],
+ "update_xml" : [
+# "security/ir.model.access.csv",
+ "sale_layout_view.xml",
+ "sale_layout_report.xml",
+ ],
+ "active": False,
+ "installable": True
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/sale_layout/i18n/fr.po b/addons/sale_layout/i18n/fr.po
new file mode 100755
index 00000000000..41c3115135c
--- /dev/null
+++ b/addons/sale_layout/i18n/fr.po
@@ -0,0 +1,291 @@
+# translation of fr_FR.po to Français
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * sale_layout
+#
+# Numerigraphe , 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: fr_FR\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-11-26 08:45+0000\n"
+"PO-Revision-Date: 2010-01-19 05:23+0000\n"
+"Last-Translator: Numérigraphe \n"
+"Language-Team: Français\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-05-21 03:45+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Sub Total"
+msgstr "Sous-total"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Title"
+msgstr "Titre"
+
+#. module: sale_layout
+#: model:ir.module.module,shortdesc:sale_layout.module_meta_information
+msgid "sale_layout"
+msgstr "sale_layout"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Disc. (%)"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Note"
+msgstr "Remarque"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Unit Price"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Order N°"
+msgstr ""
+
+#. module: sale_layout
+#: field:sale.order,abstract_line_ids:0
+msgid "Order Lines"
+msgstr "Lignes de commande"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Disc.(%)"
+msgstr ""
+
+#. module: sale_layout
+#: field:sale.order.line,layout_type:0
+msgid "Layout Type"
+msgstr "Mise en page"
+
+#. module: sale_layout
+#: view:sale.order:0
+#: view:sale.order.line:0
+msgid "Seq."
+msgstr "Séq."
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Product"
+msgstr "Produit"
+
+#. module: sale_layout
+#: model:ir.module.module,description:sale_layout.module_meta_information
+msgid ""
+"\n"
+" This module provides some features to improve the layout of the Sale "
+"Order.\n"
+"\n"
+" It gives you the possibility to\n"
+" * order all the lines of an sale order\n"
+" * add titles, comment lines, sub total lines\n"
+" * draw horizontal lines and put page breaks \n"
+"\n"
+" "
+msgstr ""
+"\n"
+" Ce module ajoute des options pour améliorer la mise en page des "
+"commandes de vente.\n"
+"\n"
+" Il vous permet :\n"
+" * de réordonner toutes les lignes d'une commande\n"
+" * d'ajouter des titres, des lignes de remarques, des sous-totaux\n"
+" * de tracer des lignes horizontales et de faire des sauts de page "
+"\n"
+"\n"
+" "
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Description"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Manual Description"
+msgstr "Description manuelle"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Our Salesman"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Automatic Declaration"
+msgstr "Déclaration automatique"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Invoice Lines"
+msgstr "Lignes de facture"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Quantity"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Quotation N°"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "VAT"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Make Invoice"
+msgstr "Créer facture"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Properties"
+msgstr "Propriétés"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Invoice address :"
+msgstr ""
+
+#. module: sale_layout
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "XML non valide pour l'architecture de la vue"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Page Break"
+msgstr "Saut de page"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Notes"
+msgstr "Notes"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Date Ordered"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Shipping address :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Taxes"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Net Total :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Tel. :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Total :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Payment Terms"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "History"
+msgstr "Historique"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Sale Order Lines"
+msgstr "Lignes de commande"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Separator Line"
+msgstr "Ligne de séparation"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Your Reference"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Sales order lines"
+msgstr "Lignes de commande"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Qty"
+msgstr "Qté"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "States"
+msgstr "États"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "TVA :"
+msgstr ""
+
+#. module: sale_layout
+#: model:ir.actions.report.xml,name:sale_layout.sale_order_1
+msgid "Order with Layout"
+msgstr "Commande avec mise en page"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Extra Info"
+msgstr "Info supplémentaires"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "UoM"
+msgstr "UDM"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Fax :"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Order Line"
+msgstr "Commande client"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Price"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Taxes :"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Stock Moves"
+msgstr "Mouvements de stocks"
diff --git a/addons/sale_layout/i18n/fr_BE.po b/addons/sale_layout/i18n/fr_BE.po
new file mode 100755
index 00000000000..6a44937a3d3
--- /dev/null
+++ b/addons/sale_layout/i18n/fr_BE.po
@@ -0,0 +1,276 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * sale_layout
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.6\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-11-26 08:45:52+0000\n"
+"PO-Revision-Date: 2009-11-26 08:45:52+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Sub Total"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Title"
+msgstr ""
+
+#. module: sale_layout
+#: model:ir.module.module,shortdesc:sale_layout.module_meta_information
+msgid "sale_layout"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Disc. (%)"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Note"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Unit Price"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Order N°"
+msgstr ""
+
+#. module: sale_layout
+#: field:sale.order,abstract_line_ids:0
+msgid "Order Lines"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Disc.(%)"
+msgstr ""
+
+#. module: sale_layout
+#: field:sale.order.line,layout_type:0
+msgid "Layout Type"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+#: view:sale.order.line:0
+msgid "Seq."
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Product"
+msgstr ""
+
+#. module: sale_layout
+#: model:ir.module.module,description:sale_layout.module_meta_information
+msgid "\n"
+" This module provides some features to improve the layout of the Sale Order.\n"
+"\n"
+" It gives you the possibility to\n"
+" * order all the lines of an sale order\n"
+" * add titles, comment lines, sub total lines\n"
+" * draw horizontal lines and put page breaks \n"
+"\n"
+" "
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Description"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Manual Description"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Our Salesman"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Automatic Declaration"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Invoice Lines"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Quantity"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Quotation N°"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "VAT"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Make Invoice"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Properties"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Invoice address :"
+msgstr ""
+
+#. module: sale_layout
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Page Break"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Notes"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Date Ordered"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Shipping address :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Taxes"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Net Total :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Tel. :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Total :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Payment Terms"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "History"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Sale Order Lines"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Separator Line"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Your Reference"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Sales order lines"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Qty"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "States"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "TVA :"
+msgstr ""
+
+#. module: sale_layout
+#: model:ir.actions.report.xml,name:sale_layout.sale_order_1
+msgid "Order with Layout"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Extra Info"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "UoM"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Fax :"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Order Line"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Price"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Taxes :"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Stock Moves"
+msgstr ""
+
diff --git a/addons/sale_layout/i18n/fr_FR.po b/addons/sale_layout/i18n/fr_FR.po
new file mode 100755
index 00000000000..349a32e2c84
--- /dev/null
+++ b/addons/sale_layout/i18n/fr_FR.po
@@ -0,0 +1,179 @@
+# translation of fr_FR.po to Français
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * sale_layout
+#
+# Numerigraphe , 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: fr_FR\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-03-25 10:13:19+0000\n"
+"PO-Revision-Date: 2009-03-25 11:25+0100\n"
+"Last-Translator: Numerigraphe \n"
+"Language-Team: Français\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Sub Total"
+msgstr "Sous-total"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Title"
+msgstr "Titre"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Sale Order Lines"
+msgstr "Lignes de commande"
+
+#. module: sale_layout
+#: field:sale.order,abstract_line_ids:0
+msgid "Order Lines"
+msgstr "Lignes de commande"
+
+#. module: sale_layout
+#: model:ir.module.module,description:sale_layout.module_name_translation
+msgid ""
+"\n"
+" This module provides some features to improve the layout of the Sale Order.\n"
+"\n"
+" It gives you the possibility to\n"
+" * order all the lines of an sale order\n"
+" * add titles, comment lines, sub total lines\n"
+" * draw horizontal lines and put page breaks \n"
+"\n"
+" "
+msgstr ""
+"\n"
+" Ce module ajoute des options pour améliorer la mise en page des commandes de vente.\n"
+"\n"
+" Il vous permet :\n"
+" * de réordonner toutes les lignes d'une commande\n"
+" * d'ajouter des titres, des lignes de remarques, des sous-totaux\n"
+" * de tracer des lignes horizontales et de faire des sauts de page \n"
+"\n"
+" "
+
+#. module: sale_layout
+#: field:sale.order.line,layout_type:0
+msgid "Layout Type"
+msgstr "Mise en page"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Product"
+msgstr "Produit"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Manual Description"
+msgstr "Description manuelle"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Automatic Declaration"
+msgstr "Déclaration automatique"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Invoice Lines"
+msgstr "Lignes de facture"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Make Invoice"
+msgstr "Créer facture"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Properties"
+msgstr "Propriétés"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "UoM"
+msgstr "UDM"
+
+#. module: sale_layout
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "XML non valide pour l'architecture de la vue"
+
+#. module: sale_layout
+#: view:sale.order:0
+#: view:sale.order.line:0
+msgid "Seq."
+msgstr "Séq."
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Notes"
+msgstr "Notes"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "History"
+msgstr "Historique"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Note"
+msgstr "Remarque"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Separator Line"
+msgstr "Ligne de séparation"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Sales order lines"
+msgstr "Lignes de commande"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Qty"
+msgstr "Qté"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "States"
+msgstr "États"
+
+#. module: sale_layout
+#: model:ir.actions.report.xml,name:sale_layout.sale_order_1
+msgid "Order with Layout"
+msgstr "Commande avec mise en page"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Extra Info"
+msgstr "Info supplémentaires"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Page Break"
+msgstr "Saut de page"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Order Line"
+msgstr "Commande client"
+
+#. module: sale_layout
+#: model:ir.module.module,shortdesc:sale_layout.module_name_translation
+msgid "sale_layout"
+msgstr "sale_layout"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Stock Moves"
+msgstr "Mouvements de stocks"
+
diff --git a/addons/sale_layout/i18n/sale_layout.pot b/addons/sale_layout/i18n/sale_layout.pot
new file mode 100755
index 00000000000..6a44937a3d3
--- /dev/null
+++ b/addons/sale_layout/i18n/sale_layout.pot
@@ -0,0 +1,276 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * sale_layout
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.6\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-11-26 08:45:52+0000\n"
+"PO-Revision-Date: 2009-11-26 08:45:52+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Sub Total"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Title"
+msgstr ""
+
+#. module: sale_layout
+#: model:ir.module.module,shortdesc:sale_layout.module_meta_information
+msgid "sale_layout"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Disc. (%)"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Note"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Unit Price"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Order N°"
+msgstr ""
+
+#. module: sale_layout
+#: field:sale.order,abstract_line_ids:0
+msgid "Order Lines"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Disc.(%)"
+msgstr ""
+
+#. module: sale_layout
+#: field:sale.order.line,layout_type:0
+msgid "Layout Type"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+#: view:sale.order.line:0
+msgid "Seq."
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Product"
+msgstr ""
+
+#. module: sale_layout
+#: model:ir.module.module,description:sale_layout.module_meta_information
+msgid "\n"
+" This module provides some features to improve the layout of the Sale Order.\n"
+"\n"
+" It gives you the possibility to\n"
+" * order all the lines of an sale order\n"
+" * add titles, comment lines, sub total lines\n"
+" * draw horizontal lines and put page breaks \n"
+"\n"
+" "
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Description"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Manual Description"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Our Salesman"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Automatic Declaration"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Invoice Lines"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Quantity"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Quotation N°"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "VAT"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Make Invoice"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Properties"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Invoice address :"
+msgstr ""
+
+#. module: sale_layout
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Page Break"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Notes"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Date Ordered"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Shipping address :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Taxes"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Net Total :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Tel. :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Total :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Payment Terms"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "History"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Sale Order Lines"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Separator Line"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Your Reference"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Sales order lines"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Qty"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "States"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "TVA :"
+msgstr ""
+
+#. module: sale_layout
+#: model:ir.actions.report.xml,name:sale_layout.sale_order_1
+msgid "Order with Layout"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Extra Info"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "UoM"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Fax :"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Order Line"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Price"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Taxes :"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Stock Moves"
+msgstr ""
+
diff --git a/addons/sale_layout/report/__init__.py b/addons/sale_layout/report/__init__.py
new file mode 100755
index 00000000000..21b30a51454
--- /dev/null
+++ b/addons/sale_layout/report/__init__.py
@@ -0,0 +1,24 @@
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+import report_sale_layout
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/sale_layout/report/order.rml b/addons/sale_layout/report/order.rml
new file mode 100755
index 00000000000..8c7cfaa0d2d
--- /dev/null
+++ b/addons/sale_layout/report/order.rml
@@ -0,0 +1,378 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [[ repeatIn(objects,'o') ]]
+ [[ setLang(o.partner_id.lang) ]]
+
+
+ |
+ Shipping address :
+ [[ o.partner_id.title or '' ]][[ o.partner_id.name ]]
+ [[ o.partner_shipping_id.title or '' ]][[ o.partner_shipping_id.name ]]
+ [[ o.partner_shipping_id.street ]]
+ [[ o.partner_shipping_id.street2 or '' ]]
+ [[ o.partner_shipping_id.city or '' ]] [[ o.partner_shipping_id.zip or '' ]]
+ [[ o.partner_shipping_id.state_id and o.partner_shipping_id.state_id.name or '' ]][[ o.partner_shipping_id.country_id and o.partner_shipping_id.country_id.name or '' ]]
+
+
+
+ Invoice address :
+ [[ o.partner_invoice_id.street ]][[ o.partner_invoice_id.street2 and (', %s' % o.partner_invoice_id.street2 or '') ]]
+ [[ o.partner_invoice_id.city or '' ]] [[ o.partner_invoice_id.zip or '' ]]
+ [[ o.partner_invoice_id.country_id and ('%s' % (o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '')) ]]
+ |
+
+
+
+
+ |
+
+ [[ o.partner_id.title or '' ]][[ o.partner_id.name ]]
+ [[ o.partner_order_id.title or '' ]][[ o.partner_order_id.name ]]
+ [[ o.partner_order_id.street ]]
+ [[ o.partner_order_id.street2 or '' ]]
+ [[ o.partner_order_id.city or '' ]] [[ o.partner_order_id.zip or '' ]]
+ [[ o.partner_order_id.state_id and o.partner_order_id.state_id.name or '' ]][[ o.partner_order_id.country_id and o.partner_order_id.country_id.name or '' ]]
+
+
+
+ Tel. : [[ o.partner_order_id.phone or removeParentNode('para') ]]
+ Fax : [[ o.partner_order_id.fax or removeParentNode('para') ]]
+ TVA : [[ o.partner_id.vat or removeParentNode('para') ]]
+
+
+
+ |
+
+
+
+
+
+ [[ o.state<>'draft' and removeParentNode('para') ]] Quotation N° [[ o.name ]]
+ [[ o.state=='draft' and removeParentNode('para') ]] Order N° [[ o.name ]]
+
+
+
+
+
+ |
+ Your Reference
+ |
+
+ Date Ordered
+ |
+
+ Our Salesman
+ |
+
+ Payment Terms
+ |
+
+
+
+
+ |
+ [[ o.name ]]
+ |
+
+ [[ o.date_order ]]
+ |
+
+ [[ o.user_id.name ]]
+ |
+
+ [[ o.payment_term.name ]]
+ |
+
+
+
+
+
+
+
+ |
+ Description
+ |
+
+ VAT
+ |
+
+ Quantity
+ |
+
+ Unit Price
+ |
+
+ Disc.(%)
+ |
+
+ Price
+ |
+
+
+
+ [[ repeatIn(o.order_line,'line') ]]
+
+
+ |
+ [[ line.name ]]
+ |
+
+ [[ ', '.join(map(lambda x: x.name, line.tax_id)) or '0.00' ]]
+ |
+
+ [[ line.product_uos and line.product_uos_qty or line.product_uom_qty or '0.00']]
+ |
+
+ [[ line.product_uos and line.product_uos.name or line.product_uom.name ]]
+ |
+
+ [[ line.price_unit or '0.00' ]]
+ |
+
+ [[ line.discount and str(line.discount) or '0.00' ]]
+ |
+
+ [[ line.price_subtotal or '0.00' ]]
+ |
+
+
+ |
+ [[ format(line.notes or removeParentNode('tr')) ]]
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+ |
+
+ Net Total :
+ |
+
+ [[ o.amount_untaxed or '0.00' ]]
+ |
+
+ [[ o.pricelist_id.currency_id.name ]]
+ |
+
+
+ |
+
+
+
+ |
+
+ Taxes :
+ |
+
+ [[ o.amount_tax or '0.00' ]]
+ |
+
+ [[ o.pricelist_id.currency_id.name ]]
+ |
+
+
+ |
+
+
+
+ |
+
+ Total :
+ |
+
+ [[ o.amount_total or '0.00' ]]
+ |
+
+ [[ o.pricelist_id.currency_id.name ]]
+ |
+
+
+
+
+
+
+
+ |
+ [[ format(o.note or '') ]]
+ |
+
+
+ |
+ [[ format((o.partner_id.property_payment_term and o.partner_id.property_payment_term.note) or '') ]]
+ |
+
+
+
+
+
+
+
diff --git a/addons/sale_layout/report/report_sale_layout.py b/addons/sale_layout/report/report_sale_layout.py
new file mode 100755
index 00000000000..20ad66313a2
--- /dev/null
+++ b/addons/sale_layout/report/report_sale_layout.py
@@ -0,0 +1,140 @@
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+import time
+import pooler
+from report import report_sxw
+
+
+rml_parents = {
+ 'tr':1,
+ 'li':1,
+ 'story': 0,
+ 'section': 0
+}
+class sale_order_1(report_sxw.rml_parse):
+ def __init__(self, cr, uid, name, context):
+ super(sale_order_1, self).__init__(cr, uid, name, context)
+ self.localcontext.update({
+ 'time': time,
+ 'sale_order_lines': self.sale_order_lines,
+ # 'repeat_In':self.repeat_In,
+ })
+ self.context = context
+
+#
+
+ def sale_order_lines(self,sale_order):
+ result =[]
+ sub_total={}
+ info=[]
+ order_lines=[]
+ res={}
+ list_in_seq=[]
+ ids = self.pool.get('sale.order.line').search(self.cr, self.uid, [('order_id', '=', sale_order.id)])
+ for id in range(0,len(ids)):
+ order = self.pool.get('sale.order.line').browse(self.cr, self.uid,ids[id], self.context.copy())
+ order_lines.append(order)
+
+ i=1
+ j=0
+ sum_flag={}
+ sum_flag[j]=-1
+ for entry in order_lines:
+ res={}
+
+ if entry.layout_type=='article':
+ res['tax_id']=', '.join(map(lambda x: x.name, entry.tax_id)) or ''
+ res['name']=entry.name
+ res['product_uom_qty']="%.2f"%(entry.product_uos and entry.product_uos_qty or entry.product_uom_qty or 0.00)
+ res['product_uom']=entry.product_uos and entry.product_uos.name or entry.product_uom.name
+ res['price_unit']="%.2f"%(entry.price_unit or 0.00)
+ res['discount']="%.2f"%(entry.discount and entry.discount or 0.00)
+ res['price_subtotal']="%.2f"%(entry.price_subtotal and entry.price_subtotal or 0.00)
+ sub_total[i]= entry.price_subtotal and entry.price_subtotal
+ i=i+1
+ res['note']=entry.notes or ''
+ res['currency']=sale_order.pricelist_id.currency_id.name
+ res['layout_type']=entry.layout_type
+
+ else:
+
+ res['product_uom_qty']=''
+ res['price_unit']=''
+ res['discount']=''
+ res['tax_id']=''
+ res['layout_type']=entry.layout_type
+ res['note']=entry.notes or ''
+ res['product_uom']=''
+
+ if entry.layout_type=='subtotal':
+ res['name']=entry.name
+ sum=0
+ sum_id=0
+ if sum_flag[j]==-1:
+ temp=1
+ else:
+ temp=sum_flag[j]
+
+ for sum_id in range(temp,len(sub_total)+1):
+ sum+=sub_total[sum_id]
+ sum_flag[j+1]= sum_id +1
+
+ j=j+1
+ res['price_subtotal']="%.2f"%(sum)
+ res['currency']=sale_order.pricelist_id.currency_id.name
+ res['quantity']=''
+ res['price_unit']=''
+ res['discount']=''
+ res['tax_id']=''
+ res['product_uom']=''
+ elif entry.layout_type=='title':
+ res['name']=entry.name
+ res['price_subtotal']=''
+ res['currency']=''
+ elif entry.layout_type=='text':
+ res['name']=entry.name
+ res['price_subtotal']=''
+ res['currency']=''
+ elif entry.layout_type=='line':
+ res['product_uom_qty']='__________'
+ res['price_unit']='______________'
+ res['discount']='___________'
+ res['tax_id']='_________________'
+ res['product_uom']='_____'
+ res['name']='_______________________________________'
+ res['price_subtotal']='_________'
+ res['currency']='_______'
+ elif entry.layout_type=='break':
+ res['layout_type']=entry.layout_type
+ res['name']=entry.name
+ res['price_subtotal']=''
+ res['currency']=''
+ else:
+ res['name']=entry.name
+ res['price_subtotal']=''
+ res['currency']=sale_order.pricelist_id.currency_id.name
+
+ result.append(res)
+ return result
+report_sxw.report_sxw('report.sale.order.layout', 'sale.order', 'addons/sale_layout/report/report_sale_layout.rml', parser=sale_order_1)
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
+
diff --git a/addons/sale_layout/report/report_sale_layout.rml b/addons/sale_layout/report/report_sale_layout.rml
new file mode 100755
index 00000000000..28e007ecfdc
--- /dev/null
+++ b/addons/sale_layout/report/report_sale_layout.rml
@@ -0,0 +1,352 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [[repeatIn(objects,'o')]]
+ [[ setLang(o.partner_id.lang) ]]
+
+
+
+
+
+ |
+ Shipping address :
+ [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]
+ [[ o.partner_shipping_id.title or '' ]] [[ o.partner_shipping_id.name ]]
+ [[ o.partner_shipping_id.street ]]
+ [[ o.partner_shipping_id.street2 or '' ]]
+ [[ o.partner_shipping_id.city or '' ]] [[ o.partner_shipping_id.zip or '' ]]
+ [[ o.partner_shipping_id.state_id and o.partner_shipping_id.state_id.name or '' ]] [[ o.partner_shipping_id.country_id and o.partner_shipping_id.country_id.name or '' ]]
+
+
+
+ Invoice address :
+ [[ o.partner_invoice_id.street ]] [[ o.partner_invoice_id.street2 and (', %s' % o.partner_invoice_id.street2 or '') ]]
+ [[ o.partner_invoice_id.zip or '' ]] [[ o.partner_invoice_id.city or '' ]] [[ o.partner_invoice_id.country_id and (', %s' % (o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '')) ]]
+ |
+
+
+
+
+ |
+
+ [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]
+ [[ o.partner_order_id.title or '' ]] [[ o.partner_order_id.name ]]
+ [[ o.partner_order_id.street ]]
+ [[ o.partner_order_id.street2 or '' ]]
+ [[ o.partner_order_id.zip or '' ]] [[ o.partner_order_id.city or '' ]]
+ [[ o.partner_order_id.state_id and o.partner_order_id.state_id.name or '' ]] [[ o.partner_order_id.country_id and o.partner_order_id.country_id.name or '' ]]
+
+
+
+ Tel. : [[ o.partner_order_id.phone or removeParentNode('para') ]]
+ Fax : [[ o.partner_order_id.fax or removeParentNode('para') ]]
+ TVA : [[ o.partner_id.vat or removeParentNode('para') ]]
+
+
+
+ |
+
+
+
+
+
+ [[ o.state<>'draft' and removeParentNode('para') ]] Quotation N° [[ o.name ]]
+ [[ o.state=='draft' and removeParentNode('para') ]] Order N° [[ o.name ]]
+
+
+
+
+
+ |
+ Your Reference
+ |
+
+ Date Ordered
+ |
+
+ Our Salesman
+ |
+
+ Payment Terms
+ |
+
+
+
+
+ |
+ [[ o.name ]]
+ |
+
+ [[ o.date_order ]]
+ |
+
+ [[ o.user_id.name ]]
+ |
+
+ [[ o.payment_term.name ]]
+ |
+
+
+
+
+
+
+
+ |
+ Description
+ |
+
+ VAT
+ |
+
+ Quantity
+ |
+
+ Unit Price
+ |
+
+ Disc.(%)
+ |
+
+ Price
+ |
+
+
+
+
+ [[ repeatIn(sale_order_lines(o),'a') ]]
+
+
+ |
+ [[ a['layout_type']=='text' and removeParentNode('blockTable')]]
+ |
+
+ [[ (a['layout_type']=='title' or a['layout_type']=='subtotal') and ( setTag('para','para',{'fontName':'Helvetica-bold'})) or removeParentNode('font') ]][[ a['name'] ]]
+ |
+
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['tax_id'] ]]
+ |
+
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['product_uom_qty'] ]]
+ |
+
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['product_uom'] ]]
+ |
+
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]] [[ a['price_unit'] ]]
+ |
+
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['discount'] ]]
+ |
+
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['price_subtotal'] ]]
+ |
+
+
+
+
+ |
+ [[ a['layout_type']=='text' and a['name'] or removeParentNode('blockTable') ]]
+ |
+
+
+ |
+
+
+
+
+ |
+
+ [[ a['note']=='' and removeParentNode('blockTable') ]][[ repeatIn(( a['note'] and a['note'].splitlines()) or [], 'note') ]]
+ |
+
+ [[ a['note'] and note or removeParentNode('blockTable') ]]
+ |
+
+
+ [[ a['layout_type']!='break' and removeParentNode('pageBreak')]]
+
+
+ |
+ Description [[ a['layout_type']!='break' and removeParentNode('blockTable')]]
+ |
+
+ Taxes
+ |
+
+ Quantity
+ |
+
+ Unit Price
+ |
+
+ Disc. (%)
+ |
+
+ Price
+ |
+
+
+
+
+
+
diff --git a/addons/sale_layout/sale_layout.py b/addons/sale_layout/sale_layout.py
new file mode 100755
index 00000000000..d493b7d6840
--- /dev/null
+++ b/addons/sale_layout/sale_layout.py
@@ -0,0 +1,160 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved
+# $Id$
+#
+# 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 3 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, see .
+#
+##############################################################################
+from osv import fields,osv
+from tools import config
+import decimal_precision as dp
+from tools.translate import _
+class sale_order_line(osv.osv):
+
+ def _amount_line(self, cr, uid, ids, field_name, arg, context=None):
+ tax_obj = self.pool.get('account.tax')
+ cur_obj = self.pool.get('res.currency')
+ res = {}
+ context = context or {}
+ for line in self.browse(cr, uid, ids, context=context):
+ if line.layout_type=='article':
+ return super(sale_order_line, self)._amount_line(cr, uid, ids, field_name, arg, context)
+ return res
+ def invoice_line_create(self, cr, uid, ids, context={}):
+ new_ids = []
+ list_seq = []
+ for line in self.browse(cr, uid, ids, context):
+ if line.layout_type == 'article':
+ new_ids.append(line.id)
+ list_seq.append(line.sequence)
+ invoice_line_ids = super(sale_order_line, self).invoice_line_create(cr, uid, new_ids, context)
+ pool_inv_line = self.pool.get('account.invoice.line')
+ seq = 0
+ for obj_inv_line in pool_inv_line.browse(cr, uid, invoice_line_ids, context=context):
+ pool_inv_line.write(cr, uid, [obj_inv_line.id], {'sequence': list_seq[seq]}, context=context)
+ seq += 1
+ return invoice_line_ids
+
+ def onchange_sale_order_line_view(self, cr, uid, id, type, context={}, *args):
+ temp ={}
+ temp['value']= {}
+ if (not type):
+ return {}
+ if type != 'article':
+ temp = {'value': {
+ 'product_id': False,
+ 'uos_id': False,
+ 'account_id': False,
+ 'price_unit': 0.0,
+ 'price_subtotal': 0.0,
+ 'quantity': 0,
+ 'discount': 0.0,
+ 'invoice_line_tax_id': False,
+ 'account_analytic_id': False,
+ 'product_uom_qty':0.0,
+ },
+ }
+ if type == 'line':
+ temp['value']['name'] = ' '
+ if type == 'break':
+ temp['value']['name'] = ' '
+ if type == 'subtotal':
+ temp['value']['name'] = 'Sub Total'
+ return temp
+ return {}
+
+ def create(self, cr, user, vals, context=None):
+ if vals.has_key('layout_type'):
+ if vals['layout_type'] == 'line':
+ vals['name'] = ' '
+ if vals['layout_type'] == 'break':
+ vals['name'] = ' '
+ if vals['layout_type'] != 'article':
+ vals['product_uom_qty']= 0
+ return super(sale_order_line, self).create(cr, user, vals, context)
+
+ def write(self, cr, user, ids, vals, context=None):
+ if vals.has_key('layout_type'):
+ if vals['layout_type'] == 'line':
+ vals['name'] = ' '
+ if vals['layout_type'] == 'break':
+ vals['name'] = ' '
+ return super(sale_order_line, self).write(cr, user, ids, vals, context)
+
+ def copy(self, cr, uid, id, default=None, context=None):
+ if default is None:
+ default = {}
+ default['layout_type'] = self.browse(cr, uid, id).layout_type
+ return super(sale_order_line, self).copy(cr, uid, id, default, context)
+
+
+ _name = "sale.order.line"
+ _order = "order_id, sequence asc"
+ _description = "Sale Order line"
+ _inherit = "sale.order.line"
+ _columns = {
+ 'layout_type': fields.selection([
+ ('article','Product'),
+ ('title','Title'),
+ ('text','Note'),
+ ('subtotal','Sub Total'),
+ ('line','Separator Line'),
+ ('break','Page Break'),]
+ ,'Layout Type', select=True, required=True),
+ 'sequence': fields.integer('Sequence Number'),
+ 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price'), readonly=True, states={'draft':[('readonly',False)]}),
+ 'product_uom_qty': fields.float('Quantity (UoM)', digits=(16,2)),
+ 'product_uom': fields.many2one('product.uom', 'Product UoM'),
+ }
+
+ _defaults = {
+ 'layout_type': lambda *a: 'article',
+ }
+sale_order_line()
+
+
+class one2many_mod2(fields.one2many):
+ def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None):
+ if not context:
+ context = {}
+ if not values:
+ values = {}
+ res = {}
+ for id in ids:
+ res[id] = []
+ ids2 = obj.pool.get(self._obj).search(cr, user, [(self._fields_id,'in',ids),('layout_type','=','article')], limit=self._limit)
+ for r in obj.pool.get(self._obj)._read_flat(cr, user, ids2, [self._fields_id], context=context, load='_classic_write'):
+ res[r[self._fields_id]].append( r['id'] )
+ return res
+
+
+class sale_order(osv.osv):
+
+ def copy(self, cr, uid, id, default=None, context=None):
+ if default is None:
+ default = {}
+ default['order_line'] = False
+ return super(sale_order, self).copy(cr, uid, id, default, context)
+
+ _inherit = "sale.order"
+ _columns = {
+ 'abstract_line_ids': fields.one2many('sale.order.line', 'order_id', 'Order Lines',readonly=True, states={'draft':[('readonly',False)]}),
+ 'order_line': one2many_mod2('sale.order.line', 'order_id', 'Order Lines',readonly=True, states={'draft':[('readonly',False)]}),
+ }
+sale_order()
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/sale_layout/sale_layout_report.xml b/addons/sale_layout/sale_layout_report.xml
new file mode 100755
index 00000000000..53775fdb149
--- /dev/null
+++ b/addons/sale_layout/sale_layout_report.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
diff --git a/addons/sale_layout/sale_layout_view.xml b/addons/sale_layout/sale_layout_view.xml
new file mode 100755
index 00000000000..2cfd109f52d
--- /dev/null
+++ b/addons/sale_layout/sale_layout_view.xml
@@ -0,0 +1,117 @@
+
+
+
+
+
+ sale.order.line.form2.inherit_1
+ sale.order.line
+
+ form
+
+
+
+
+
+
+
+
+
+ sale.order.line.tree.inherit_1
+ sale.order.line
+
+ tree
+
+
+
+
+
+
+
+
+
+
+ sale.order.form.inherit_1
+ sale.order
+
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index fb4c0046cec..6f744ce784d 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -604,7 +604,7 @@
-
+
@@ -714,7 +714,7 @@
-
+
@@ -774,7 +774,7 @@
-
+
@@ -978,7 +978,7 @@
-
+
@@ -1175,7 +1175,7 @@
-
+
diff --git a/addons/stock_planning/stock_planning_view.xml b/addons/stock_planning/stock_planning_view.xml
index 7da194d91e1..0bb9222df35 100644
--- a/addons/stock_planning/stock_planning_view.xml
+++ b/addons/stock_planning/stock_planning_view.xml
@@ -153,7 +153,7 @@
-
+
| |