From 6164d129ab39fb51db558049315906776d9837c2 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Fri, 13 Aug 2010 12:06:27 +0530 Subject: [PATCH 001/116] [FIX]: caldav: Keep event specific timezone on import instead of User timezone bzr revid: rpa@tinyerp.com-20100813063627-cq3qcznxf5ghupg4 --- addons/caldav/calendar.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/addons/caldav/calendar.py b/addons/caldav/calendar.py index fd533c098a1..37224fb2f50 100644 --- a/addons/caldav/calendar.py +++ b/addons/caldav/calendar.py @@ -266,11 +266,9 @@ class CalDAV(object): continue if cal_data.name.lower() in self.__attribute__: if cal_data.params.get('X-VOBJ-ORIGINAL-TZID'): - # since we do convert, do we also need to save the original tzid? - # self.ical_set('vtimezone', cal_data.params.get('X-VOBJ-ORIGINAL-TZID'), 'value') - - date_local = cal_data.value.astimezone(_server_tzinfo) - self.ical_set(cal_data.name.lower(), date_local, 'value') + self.ical_set('vtimezone', cal_data.params.get('X-VOBJ-ORIGINAL-TZID'), 'value') + date_utc = cal_data.value.astimezone(pytz.utc) + self.ical_set(cal_data.name.lower(), date_utc, 'value') continue self.ical_set(cal_data.name.lower(), cal_data.value, 'value') vals = map_data(cr, uid, self, context=context) From d781b93335abeeaa38b251c2db7f4d472821be41 Mon Sep 17 00:00:00 2001 From: "MTR(OpenERP)" <> Date: Fri, 13 Aug 2010 12:58:43 +0530 Subject: [PATCH 002/116] [IMP] product_margin, product_expiry,product_manufacturer: improve and cleaning bzr revid: mra@mra-laptop-20100813072843-l72opp20yoiik3pg --- addons/product_expiry/product_expiry.py | 12 +- addons/product_expiry/product_expiry_view.xml | 2 +- addons/product_manufacturer/__init__.py | 5 +- addons/product_manufacturer/__openerp__.py | 9 +- .../i18n/{product_electronic.pot => en_US.po} | 30 ++--- addons/product_manufacturer/i18n/es.po | 108 ------------------ addons/product_manufacturer/i18n/et.po | 106 ----------------- addons/product_manufacturer/i18n/fr.po | 105 ----------------- addons/product_manufacturer/i18n/fr_BE.po | 30 ++--- .../i18n/{nl.po => product_manufacturer.pot} | 54 ++++----- addons/product_manufacturer/i18n/ru.po | 107 ----------------- addons/product_manufacturer/i18n/sl.po | 106 ----------------- .../product_manufacturer.py | 11 +- .../product_manufacturer_view.xml | 2 +- addons/product_margin/__openerp__.py | 2 +- addons/product_margin/product_margin.py | 23 ++-- .../product_margin/wizard/product_margin.py | 16 +-- .../wizard/product_margin_view.xml | 54 ++++----- addons/product_visible_discount/__init__.py | 3 +- .../product_visible_discount/__openerp__.py | 2 +- ...product.py => product_visible_discount.py} | 10 +- ....xml => product_visible_discount_view.xml} | 0 22 files changed, 110 insertions(+), 687 deletions(-) rename addons/product_manufacturer/i18n/{product_electronic.pot => en_US.po} (79%) delete mode 100644 addons/product_manufacturer/i18n/es.po delete mode 100644 addons/product_manufacturer/i18n/et.po delete mode 100644 addons/product_manufacturer/i18n/fr.po rename addons/product_manufacturer/i18n/{nl.po => product_manufacturer.pot} (59%) delete mode 100644 addons/product_manufacturer/i18n/ru.po delete mode 100644 addons/product_manufacturer/i18n/sl.po rename addons/product_visible_discount/{product.py => product_visible_discount.py} (97%) rename addons/product_visible_discount/{product_view.xml => product_visible_discount_view.xml} (100%) diff --git a/addons/product_expiry/product_expiry.py b/addons/product_expiry/product_expiry.py index 72f18412af4..fbfa7dc1610 100644 --- a/addons/product_expiry/product_expiry.py +++ b/addons/product_expiry/product_expiry.py @@ -23,7 +23,6 @@ from osv import fields, osv import pooler class stock_production_lot(osv.osv): - _name = 'stock.production.lot' _inherit = 'stock.production.lot' def _get_date(dtype): @@ -51,7 +50,7 @@ class stock_production_lot(osv.osv): help='The date the lot starts deteriorating without becoming dangerous.'), 'removal_date': fields.datetime('Removal Date', help='The date the lot should be removed.'), - 'alert_date': fields.datetime('Alert Date'), + 'alert_date': fields.datetime('Alert Date', help="The date signifying an alert to notify about the production lot."), } # Assign dates according to products data def create(self, cr, uid, vals, context=None): @@ -76,15 +75,14 @@ stock_production_lot() class product_product(osv.osv): _inherit = 'product.product' - _name = 'product.product' _columns = { - 'life_time': fields.integer('Product lifetime', + 'life_time': fields.integer('Product Life Time', help='The number of days before a production lot may become dangerous and should not be consumed.'), - 'use_time': fields.integer('Product usetime', + 'use_time': fields.integer('Product Use Time', help='The number of days before a production lot starts deteriorating without becoming dangerous.'), - 'removal_time': fields.integer('Product removal time', + 'removal_time': fields.integer('Product Removal Time', help='The number of days before a production lot should be removed.'), - 'alert_time': fields.integer('Product alert time'), + 'alert_time': fields.integer('Product Alert Time', help="The number of days after which, needs an alert to notify about the production lot."), } product_product() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/product_expiry/product_expiry_view.xml b/addons/product_expiry/product_expiry_view.xml index 245a4a2c600..e0a249d09eb 100644 --- a/addons/product_expiry/product_expiry_view.xml +++ b/addons/product_expiry/product_expiry_view.xml @@ -13,6 +13,7 @@ + @@ -25,7 +26,6 @@ - diff --git a/addons/product_manufacturer/__init__.py b/addons/product_manufacturer/__init__.py index 3c3dce04d51..9b2446b4a44 100644 --- a/addons/product_manufacturer/__init__.py +++ b/addons/product_manufacturer/__init__.py @@ -1,5 +1,5 @@ ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -14,10 +14,11 @@ # 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 . +# along with this program. If not, see . # ############################################################################## import product_manufacturer + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/product_manufacturer/__openerp__.py b/addons/product_manufacturer/__openerp__.py index bccabe95283..1ad5068be0f 100644 --- a/addons/product_manufacturer/__openerp__.py +++ b/addons/product_manufacturer/__openerp__.py @@ -1,5 +1,5 @@ ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -14,7 +14,7 @@ # 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 . +# along with this program. If not, see . # ############################################################################## { @@ -22,7 +22,7 @@ "version" : "1.0", "author" : "OpenERP SA", "category" : "Enterprise Specific Modules/Manufacturer Industries", - "depends" : ["base", "account", "product", "stock"], + "depends" : ["stock"], "init_xml" : [], "demo_xml" : [], "description": "A module that add manufacturers and attributes on the product form", @@ -30,5 +30,4 @@ "active": False, "installable": True } -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/product_manufacturer/i18n/product_electronic.pot b/addons/product_manufacturer/i18n/en_US.po similarity index 79% rename from addons/product_manufacturer/i18n/product_electronic.pot rename to addons/product_manufacturer/i18n/en_US.po index 41372e6597f..91281fdacd4 100644 --- a/addons/product_manufacturer/i18n/product_electronic.pot +++ b/addons/product_manufacturer/i18n/en_US.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2009-11-25 13:27:55+0000\n" -"PO-Revision-Date: 2009-11-25 13:27:55+0000\n" +"POT-Creation-Date: 2010-08-12 12:35:32+0000\n" +"PO-Revision-Date: 2010-08-12 12:35:32+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -22,7 +22,7 @@ msgstr "" #. module: product_manufacturer #: field:product.product,manufacturer_pref:0 -msgid "Manufacturer product code" +msgid "Manufacturer Product Code" msgstr "" #. module: product_manufacturer @@ -41,18 +41,14 @@ msgid "The Object name must start with x_ and not contain any special character msgstr "" #. module: product_manufacturer -#: model:ir.model,name:product_manufacturer.model_product_electronic_attribute +#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute msgid "Product attributes" msgstr "" #. module: product_manufacturer +#: view:product.manufacturer.attribute:0 #: view:product.product:0 -msgid "Manufacturing data" -msgstr "" - -#. module: product_manufacturer -#: view:product.product:0 -msgid "Product reference" +msgid "Product Attributes" msgstr "" #. module: product_manufacturer @@ -61,6 +57,7 @@ msgid "Attribute" msgstr "" #. module: product_manufacturer +#: model:ir.model,name:product_manufacturer.model_product_product #: field:product.manufacturer.attribute,product_id:0 msgid "Product" msgstr "" @@ -70,16 +67,6 @@ msgstr "" msgid "Value" msgstr "" -#. module: product_manufacturer -#: view:product.product:0 -msgid "Manufacturing Data" -msgstr "" - -#. module: product_manufacturer -#: view:product.product:0 -msgid "Product name" -msgstr "" - #. module: product_manufacturer #: view:product.product:0 #: field:product.product,attribute_ids:0 @@ -93,10 +80,11 @@ msgstr "" #. module: product_manufacturer #: field:product.product,manufacturer_pname:0 -msgid "Manufacturer product name" +msgid "Manufacturer Product Name" msgstr "" #. module: product_manufacturer +#: view:product.product:0 #: field:product.product,manufacturer:0 msgid "Manufacturer" msgstr "" diff --git a/addons/product_manufacturer/i18n/es.po b/addons/product_manufacturer/i18n/es.po deleted file mode 100644 index a50fde79269..00000000000 --- a/addons/product_manufacturer/i18n/es.po +++ /dev/null @@ -1,108 +0,0 @@ -# Spanish translation for openobject-addons -# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR , 2010. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-11-25 13:27+0000\n" -"PO-Revision-Date: 2010-06-27 21:56+0000\n" -"Last-Translator: Borja López Soilán (Pexego) \n" -"Language-Team: Spanish \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-08-12 04:08+0000\n" -"X-Generator: Launchpad (build Unknown)\n" - -#. module: product_electronic -#: model:ir.module.module,description:product_electronic.module_meta_information -msgid "A module that add manufacturers and attributes on the product form" -msgstr "" -"Un módulo que añade fabricantes y atributos en el formulario de producto" - -#. module: product_electronic -#: field:product.product,manufacturer_pref:0 -msgid "Manufacturer product code" -msgstr "Código de producto del fabricante" - -#. module: product_electronic -#: constraint:ir.ui.view:0 -msgid "Invalid XML for View Architecture!" -msgstr "¡XML inválido para la estructura de la vista!" - -#. module: product_electronic -#: view:product.electronic.attribute:0 -msgid "Product Template Name" -msgstr "Nombre de plantilla de producto" - -#. module: product_electronic -#: constraint:ir.model:0 -msgid "" -"The Object name must start with x_ and not contain any special character !" -msgstr "" -"¡El nombre del objeto debe empezar con x_ y no puede contener ningún " -"carácter especial!" - -#. module: product_electronic -#: model:ir.model,name:product_electronic.model_product_electronic_attribute -msgid "Product attributes" -msgstr "Atributos de producto" - -#. module: product_electronic -#: view:product.product:0 -msgid "Manufacturing data" -msgstr "Datos de fabricación" - -#. module: product_electronic -#: view:product.product:0 -msgid "Product reference" -msgstr "Referencia del producto" - -#. module: product_electronic -#: field:product.electronic.attribute,name:0 -msgid "Attribute" -msgstr "Atributo" - -#. module: product_electronic -#: field:product.electronic.attribute,product_id:0 -msgid "Product" -msgstr "Producto" - -#. module: product_electronic -#: field:product.electronic.attribute,value:0 -msgid "Value" -msgstr "Valor" - -#. module: product_electronic -#: view:product.product:0 -msgid "Manufacturing Data" -msgstr "Datos de fabricación" - -#. module: product_electronic -#: view:product.product:0 -msgid "Product name" -msgstr "Nombre del producto" - -#. module: product_electronic -#: view:product.product:0 -#: field:product.product,attribute_ids:0 -msgid "Attributes" -msgstr "Atributos" - -#. module: product_electronic -#: model:ir.module.module,shortdesc:product_electronic.module_meta_information -msgid "Products Attributes & Manufacturers" -msgstr "Fabricantes y atributos de los productos" - -#. module: product_electronic -#: field:product.product,manufacturer_pname:0 -msgid "Manufacturer product name" -msgstr "Nombre del fabricante del producto" - -#. module: product_electronic -#: field:product.product,manufacturer:0 -msgid "Manufacturer" -msgstr "Fabricante" diff --git a/addons/product_manufacturer/i18n/et.po b/addons/product_manufacturer/i18n/et.po deleted file mode 100644 index 2d9bd1740b9..00000000000 --- a/addons/product_manufacturer/i18n/et.po +++ /dev/null @@ -1,106 +0,0 @@ -# Estonian translation for openobject-addons -# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR , 2010. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-11-25 13:27+0000\n" -"PO-Revision-Date: 2010-06-25 18:10+0000\n" -"Last-Translator: lyyser \n" -"Language-Team: Estonian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-08-12 04:08+0000\n" -"X-Generator: Launchpad (build Unknown)\n" - -#. module: product_electronic -#: model:ir.module.module,description:product_electronic.module_meta_information -msgid "A module that add manufacturers and attributes on the product form" -msgstr "" - -#. module: product_electronic -#: field:product.product,manufacturer_pref:0 -msgid "Manufacturer product code" -msgstr "Tootja tootekood" - -#. module: product_electronic -#: constraint:ir.ui.view:0 -msgid "Invalid XML for View Architecture!" -msgstr "Vigane XML vaate arhitektuurile!" - -#. module: product_electronic -#: view:product.electronic.attribute:0 -msgid "Product Template Name" -msgstr "Toote Malli nimi" - -#. module: product_electronic -#: constraint:ir.model:0 -msgid "" -"The Object name must start with x_ and not contain any special character !" -msgstr "" -"Objekti nimi peab algama x_'ga ja ei tohi sisaldada ühtegi erisümbolit !" - -#. module: product_electronic -#: model:ir.model,name:product_electronic.model_product_electronic_attribute -msgid "Product attributes" -msgstr "Toote omadused" - -#. module: product_electronic -#: view:product.product:0 -msgid "Manufacturing data" -msgstr "Tootmise andmed" - -#. module: product_electronic -#: view:product.product:0 -msgid "Product reference" -msgstr "Toote viide" - -#. module: product_electronic -#: field:product.electronic.attribute,name:0 -msgid "Attribute" -msgstr "Atribuut" - -#. module: product_electronic -#: field:product.electronic.attribute,product_id:0 -msgid "Product" -msgstr "Toode" - -#. module: product_electronic -#: field:product.electronic.attribute,value:0 -msgid "Value" -msgstr "Väärtus" - -#. module: product_electronic -#: view:product.product:0 -msgid "Manufacturing Data" -msgstr "Valmistusandmeid" - -#. module: product_electronic -#: view:product.product:0 -msgid "Product name" -msgstr "Toote nimi" - -#. module: product_electronic -#: view:product.product:0 -#: field:product.product,attribute_ids:0 -msgid "Attributes" -msgstr "Omadused" - -#. module: product_electronic -#: model:ir.module.module,shortdesc:product_electronic.module_meta_information -msgid "Products Attributes & Manufacturers" -msgstr "" - -#. module: product_electronic -#: field:product.product,manufacturer_pname:0 -msgid "Manufacturer product name" -msgstr "Toote nimetus" - -#. module: product_electronic -#: field:product.product,manufacturer:0 -msgid "Manufacturer" -msgstr "Tootja" diff --git a/addons/product_manufacturer/i18n/fr.po b/addons/product_manufacturer/i18n/fr.po deleted file mode 100644 index 0a50e49cd62..00000000000 --- a/addons/product_manufacturer/i18n/fr.po +++ /dev/null @@ -1,105 +0,0 @@ -# French translation for openobject-addons -# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR , 2010. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-11-25 13:27+0000\n" -"PO-Revision-Date: 2010-07-22 09:16+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: French \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-08-12 04:08+0000\n" -"X-Generator: Launchpad (build Unknown)\n" - -#. module: product_electronic -#: model:ir.module.module,description:product_electronic.module_meta_information -msgid "A module that add manufacturers and attributes on the product form" -msgstr "" - -#. module: product_electronic -#: field:product.product,manufacturer_pref:0 -msgid "Manufacturer product code" -msgstr "" - -#. module: product_electronic -#: constraint:ir.ui.view:0 -msgid "Invalid XML for View Architecture!" -msgstr "" - -#. module: product_electronic -#: view:product.electronic.attribute:0 -msgid "Product Template Name" -msgstr "" - -#. module: product_electronic -#: constraint:ir.model:0 -msgid "" -"The Object name must start with x_ and not contain any special character !" -msgstr "" - -#. module: product_electronic -#: model:ir.model,name:product_electronic.model_product_electronic_attribute -msgid "Product attributes" -msgstr "" - -#. module: product_electronic -#: view:product.product:0 -msgid "Manufacturing data" -msgstr "" - -#. module: product_electronic -#: view:product.product:0 -msgid "Product reference" -msgstr "" - -#. module: product_electronic -#: field:product.electronic.attribute,name:0 -msgid "Attribute" -msgstr "" - -#. module: product_electronic -#: field:product.electronic.attribute,product_id:0 -msgid "Product" -msgstr "" - -#. module: product_electronic -#: field:product.electronic.attribute,value:0 -msgid "Value" -msgstr "" - -#. module: product_electronic -#: view:product.product:0 -msgid "Manufacturing Data" -msgstr "" - -#. module: product_electronic -#: view:product.product:0 -msgid "Product name" -msgstr "" - -#. module: product_electronic -#: view:product.product:0 -#: field:product.product,attribute_ids:0 -msgid "Attributes" -msgstr "" - -#. module: product_electronic -#: model:ir.module.module,shortdesc:product_electronic.module_meta_information -msgid "Products Attributes & Manufacturers" -msgstr "" - -#. module: product_electronic -#: field:product.product,manufacturer_pname:0 -msgid "Manufacturer product name" -msgstr "" - -#. module: product_electronic -#: field:product.product,manufacturer:0 -msgid "Manufacturer" -msgstr "" diff --git a/addons/product_manufacturer/i18n/fr_BE.po b/addons/product_manufacturer/i18n/fr_BE.po index 41372e6597f..bcf9aabbe06 100644 --- a/addons/product_manufacturer/i18n/fr_BE.po +++ b/addons/product_manufacturer/i18n/fr_BE.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2009-11-25 13:27:55+0000\n" -"PO-Revision-Date: 2009-11-25 13:27:55+0000\n" +"POT-Creation-Date: 2010-08-13 06:18:00+0000\n" +"PO-Revision-Date: 2010-08-13 06:18:00+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -22,7 +22,7 @@ msgstr "" #. module: product_manufacturer #: field:product.product,manufacturer_pref:0 -msgid "Manufacturer product code" +msgid "Manufacturer Product Code" msgstr "" #. module: product_manufacturer @@ -41,18 +41,14 @@ msgid "The Object name must start with x_ and not contain any special character msgstr "" #. module: product_manufacturer -#: model:ir.model,name:product_manufacturer.model_product_electronic_attribute +#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute msgid "Product attributes" msgstr "" #. module: product_manufacturer +#: view:product.manufacturer.attribute:0 #: view:product.product:0 -msgid "Manufacturing data" -msgstr "" - -#. module: product_manufacturer -#: view:product.product:0 -msgid "Product reference" +msgid "Product Attributes" msgstr "" #. module: product_manufacturer @@ -61,6 +57,7 @@ msgid "Attribute" msgstr "" #. module: product_manufacturer +#: model:ir.model,name:product_manufacturer.model_product_product #: field:product.manufacturer.attribute,product_id:0 msgid "Product" msgstr "" @@ -70,16 +67,6 @@ msgstr "" msgid "Value" msgstr "" -#. module: product_manufacturer -#: view:product.product:0 -msgid "Manufacturing Data" -msgstr "" - -#. module: product_manufacturer -#: view:product.product:0 -msgid "Product name" -msgstr "" - #. module: product_manufacturer #: view:product.product:0 #: field:product.product,attribute_ids:0 @@ -93,10 +80,11 @@ msgstr "" #. module: product_manufacturer #: field:product.product,manufacturer_pname:0 -msgid "Manufacturer product name" +msgid "Manufacturer Product Name" msgstr "" #. module: product_manufacturer +#: view:product.product:0 #: field:product.product,manufacturer:0 msgid "Manufacturer" msgstr "" diff --git a/addons/product_manufacturer/i18n/nl.po b/addons/product_manufacturer/i18n/product_manufacturer.pot similarity index 59% rename from addons/product_manufacturer/i18n/nl.po rename to addons/product_manufacturer/i18n/product_manufacturer.pot index 69153f9d6cb..91281fdacd4 100644 --- a/addons/product_manufacturer/i18n/nl.po +++ b/addons/product_manufacturer/i18n/product_manufacturer.pot @@ -1,21 +1,19 @@ -# Dutch translation for openobject-addons -# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR , 2010. +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * product_manufacturer # msgid "" msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-11-25 13:27+0000\n" -"PO-Revision-Date: 2010-08-02 11:29+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Dutch \n" +"Project-Id-Version: OpenERP Server 6.0dev\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2010-08-12 12:35:32+0000\n" +"PO-Revision-Date: 2010-08-12 12:35:32+0000\n" +"Last-Translator: <>\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: 2010-08-12 04:08+0000\n" -"X-Generator: Launchpad (build Unknown)\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" #. module: product_manufacturer #: model:ir.module.module,description:product_manufacturer.module_meta_information @@ -24,7 +22,7 @@ msgstr "" #. module: product_manufacturer #: field:product.product,manufacturer_pref:0 -msgid "Manufacturer product code" +msgid "Manufacturer Product Code" msgstr "" #. module: product_manufacturer @@ -39,23 +37,18 @@ msgstr "" #. module: product_manufacturer #: 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 "" #. module: product_manufacturer -#: model:ir.model,name:product_manufacturer.model_product_electronic_attribute +#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute msgid "Product attributes" msgstr "" #. module: product_manufacturer +#: view:product.manufacturer.attribute:0 #: view:product.product:0 -msgid "Manufacturing data" -msgstr "" - -#. module: product_manufacturer -#: view:product.product:0 -msgid "Product reference" +msgid "Product Attributes" msgstr "" #. module: product_manufacturer @@ -64,6 +57,7 @@ msgid "Attribute" msgstr "" #. module: product_manufacturer +#: model:ir.model,name:product_manufacturer.model_product_product #: field:product.manufacturer.attribute,product_id:0 msgid "Product" msgstr "" @@ -73,16 +67,6 @@ msgstr "" msgid "Value" msgstr "" -#. module: product_manufacturer -#: view:product.product:0 -msgid "Manufacturing Data" -msgstr "" - -#. module: product_manufacturer -#: view:product.product:0 -msgid "Product name" -msgstr "" - #. module: product_manufacturer #: view:product.product:0 #: field:product.product,attribute_ids:0 @@ -96,10 +80,12 @@ msgstr "" #. module: product_manufacturer #: field:product.product,manufacturer_pname:0 -msgid "Manufacturer product name" +msgid "Manufacturer Product Name" msgstr "" #. module: product_manufacturer +#: view:product.product:0 #: field:product.product,manufacturer:0 msgid "Manufacturer" msgstr "" + diff --git a/addons/product_manufacturer/i18n/ru.po b/addons/product_manufacturer/i18n/ru.po deleted file mode 100644 index dbbb7e12456..00000000000 --- a/addons/product_manufacturer/i18n/ru.po +++ /dev/null @@ -1,107 +0,0 @@ -# Russian translation for openobject-addons -# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR , 2010. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-11-25 13:27+0000\n" -"PO-Revision-Date: 2010-07-10 20:09+0000\n" -"Last-Translator: Pomazan Bogdan \n" -"Language-Team: Russian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-08-12 04:08+0000\n" -"X-Generator: Launchpad (build Unknown)\n" - -#. module: product_electronic -#: model:ir.module.module,description:product_electronic.module_meta_information -msgid "A module that add manufacturers and attributes on the product form" -msgstr "" - -#. module: product_electronic -#: field:product.product,manufacturer_pref:0 -msgid "Manufacturer product code" -msgstr "" - -#. module: product_electronic -#: constraint:ir.ui.view:0 -msgid "Invalid XML for View Architecture!" -msgstr "Неправильный XML для просмотра структуры!" - -#. module: product_electronic -#: view:product.electronic.attribute:0 -msgid "Product Template Name" -msgstr "" - -#. module: product_electronic -#: constraint:ir.model:0 -msgid "" -"The Object name must start with x_ and not contain any special character !" -msgstr "" -"Название объекта должно начинаться с x_ и не должно содержать специальных " -"символов !" - -#. module: product_electronic -#: model:ir.model,name:product_electronic.model_product_electronic_attribute -msgid "Product attributes" -msgstr "" - -#. module: product_electronic -#: view:product.product:0 -msgid "Manufacturing data" -msgstr "" - -#. module: product_electronic -#: view:product.product:0 -msgid "Product reference" -msgstr "" - -#. module: product_electronic -#: field:product.electronic.attribute,name:0 -msgid "Attribute" -msgstr "Атрибут" - -#. module: product_electronic -#: field:product.electronic.attribute,product_id:0 -msgid "Product" -msgstr "Продукция" - -#. module: product_electronic -#: field:product.electronic.attribute,value:0 -msgid "Value" -msgstr "Значение" - -#. module: product_electronic -#: view:product.product:0 -msgid "Manufacturing Data" -msgstr "" - -#. module: product_electronic -#: view:product.product:0 -msgid "Product name" -msgstr "Название продукта" - -#. module: product_electronic -#: view:product.product:0 -#: field:product.product,attribute_ids:0 -msgid "Attributes" -msgstr "Атрибуты" - -#. module: product_electronic -#: model:ir.module.module,shortdesc:product_electronic.module_meta_information -msgid "Products Attributes & Manufacturers" -msgstr "" - -#. module: product_electronic -#: field:product.product,manufacturer_pname:0 -msgid "Manufacturer product name" -msgstr "" - -#. module: product_electronic -#: field:product.product,manufacturer:0 -msgid "Manufacturer" -msgstr "Производитель" diff --git a/addons/product_manufacturer/i18n/sl.po b/addons/product_manufacturer/i18n/sl.po deleted file mode 100644 index 5476b158c12..00000000000 --- a/addons/product_manufacturer/i18n/sl.po +++ /dev/null @@ -1,106 +0,0 @@ -# Slovenian translation for openobject-addons -# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR , 2010. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-11-25 13:27+0000\n" -"PO-Revision-Date: 2010-07-28 12:29+0000\n" -"Last-Translator: Simon Vidmar \n" -"Language-Team: Slovenian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-08-12 04:08+0000\n" -"X-Generator: Launchpad (build Unknown)\n" - -#. module: product_electronic -#: model:ir.module.module,description:product_electronic.module_meta_information -msgid "A module that add manufacturers and attributes on the product form" -msgstr "" - -#. module: product_electronic -#: field:product.product,manufacturer_pref:0 -msgid "Manufacturer product code" -msgstr "" - -#. module: product_electronic -#: constraint:ir.ui.view:0 -msgid "Invalid XML for View Architecture!" -msgstr "Neveljaven XML za arhitekturo pogleda!" - -#. module: product_electronic -#: view:product.electronic.attribute:0 -msgid "Product Template Name" -msgstr "" - -#. module: product_electronic -#: constraint:ir.model:0 -msgid "" -"The Object name must start with x_ and not contain any special character !" -msgstr "" -"Naziv objekta se mora začeti z 'x_' in ne sme vsebovati posebnih znakov!" - -#. module: product_electronic -#: model:ir.model,name:product_electronic.model_product_electronic_attribute -msgid "Product attributes" -msgstr "" - -#. module: product_electronic -#: view:product.product:0 -msgid "Manufacturing data" -msgstr "" - -#. module: product_electronic -#: view:product.product:0 -msgid "Product reference" -msgstr "" - -#. module: product_electronic -#: field:product.electronic.attribute,name:0 -msgid "Attribute" -msgstr "Lastnost" - -#. module: product_electronic -#: field:product.electronic.attribute,product_id:0 -msgid "Product" -msgstr "Proizvod" - -#. module: product_electronic -#: field:product.electronic.attribute,value:0 -msgid "Value" -msgstr "Vrednost" - -#. module: product_electronic -#: view:product.product:0 -msgid "Manufacturing Data" -msgstr "" - -#. module: product_electronic -#: view:product.product:0 -msgid "Product name" -msgstr "Ime proizvoda" - -#. module: product_electronic -#: view:product.product:0 -#: field:product.product,attribute_ids:0 -msgid "Attributes" -msgstr "Lastnosti" - -#. module: product_electronic -#: model:ir.module.module,shortdesc:product_electronic.module_meta_information -msgid "Products Attributes & Manufacturers" -msgstr "" - -#. module: product_electronic -#: field:product.product,manufacturer_pname:0 -msgid "Manufacturer product name" -msgstr "" - -#. module: product_electronic -#: field:product.product,manufacturer:0 -msgid "Manufacturer" -msgstr "Proizvajalec" diff --git a/addons/product_manufacturer/product_manufacturer.py b/addons/product_manufacturer/product_manufacturer.py index 969b4ce69cf..93f4a6f1a8e 100644 --- a/addons/product_manufacturer/product_manufacturer.py +++ b/addons/product_manufacturer/product_manufacturer.py @@ -1,5 +1,5 @@ ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -14,15 +14,14 @@ # 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 . +# along with this program. If not, see . # ############################################################################## -from osv import fields,osv +from osv import fields, osv class product_product(osv.osv): _inherit = 'product.product' - _name = 'product.product' _columns = { 'manufacturer' : fields.many2one('res.partner', 'Manufacturer'), 'manufacturer_pname' : fields.char('Manufacturer Product Name', size=64), @@ -41,6 +40,4 @@ class product_attribute(osv.osv): } product_attribute() - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/product_manufacturer/product_manufacturer_view.xml b/addons/product_manufacturer/product_manufacturer_view.xml index 1d1f952cd4d..0f901173caa 100644 --- a/addons/product_manufacturer/product_manufacturer_view.xml +++ b/addons/product_manufacturer/product_manufacturer_view.xml @@ -15,7 +15,7 @@ - + diff --git a/addons/product_margin/__openerp__.py b/addons/product_margin/__openerp__.py index 495c3a76b53..0f95e8ff7dd 100644 --- a/addons/product_margin/__openerp__.py +++ b/addons/product_margin/__openerp__.py @@ -30,7 +30,7 @@ and other interesting indicators based on invoices. The wizard to launch the report has several options to help you get the data you need. """, 'author': 'OpenERP SA', - 'depends': ['base', 'product', 'account'], + 'depends': ['account'], 'update_xml': [ 'security/ir.model.access.csv', 'wizard/product_margin_view.xml', diff --git a/addons/product_margin/product_margin.py b/addons/product_margin/product_margin.py index b5421d3798c..ad6ef680a98 100644 --- a/addons/product_margin/product_margin.py +++ b/addons/product_margin/product_margin.py @@ -19,28 +19,30 @@ # ############################################################################## -from osv import fields,osv -import pooler -from tools import config import time +from osv import fields, osv + class product_product(osv.osv): _inherit = "product.product" + def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} + if context is None: + context = {} 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') + 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=() + invoice_types = () + states = () if invoice_state=='paid': states=('paid',) elif invoice_state=='open_paid': @@ -109,8 +111,7 @@ class product_product(osv.osv): '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: - +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/product_margin/wizard/product_margin.py b/addons/product_margin/wizard/product_margin.py index a717e54dcdb..811477571d4 100644 --- a/addons/product_margin/wizard/product_margin.py +++ b/addons/product_margin/wizard/product_margin.py @@ -18,15 +18,13 @@ # along with this program. If not, see . # ############################################################################## -import time -from osv import osv -from osv import fields -import netsvc import time + +from osv import fields, osv from tools.translate import _ -class product_margin(osv.osv_memory): +class product_margin(osv.osv_memory): _name = 'product.margin' _description = 'Product Margin' _columns = { @@ -39,9 +37,9 @@ class product_margin(osv.osv_memory): ],'Invoice State', select=True, required=True), } _defaults = { - 'from_date': lambda *a:time.strftime('%Y-01-01'), - 'to_date':lambda *a:time.strftime('%Y-12-31'), - 'invoice_state': lambda *a:"open_paid", + 'from_date': time.strftime('%Y-01-01'), + 'to_date': time.strftime('%Y-12-31'), + 'invoice_state': "open_paid", } def action_open_window(self, cr, uid, ids, context=None): """ @@ -77,3 +75,5 @@ class product_margin(osv.osv_memory): } product_margin() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/product_margin/wizard/product_margin_view.xml b/addons/product_margin/wizard/product_margin_view.xml index 404022e21fd..20a38148d3d 100644 --- a/addons/product_margin/wizard/product_margin_view.xml +++ b/addons/product_margin/wizard/product_margin_view.xml @@ -1,32 +1,32 @@ - - - product.margin.form - product.margin - form - -
- - - - - - - diff --git a/addons/account_voucher_payment/wizard/account_voucher_unreconcile.py b/addons/account_voucher_payment/wizard/account_voucher_unreconcile.py index ef30e1af69f..d12bee51894 100644 --- a/addons/account_voucher_payment/wizard/account_voucher_unreconcile.py +++ b/addons/account_voucher_payment/wizard/account_voucher_unreconcile.py @@ -52,8 +52,9 @@ class account_voucher_unreconcile(osv.osv_memory): reconcile_pool.unlink(cr, uid, rec) if res.remove: - wf_service = netsvc.LocalService("workflow") - wf_service.trg_validate(uid, 'account.voucher', context.get('active_id'), 'cancel_voucher', cr) + voucher_pool.cancel_voucher(cr, uid, [context.get('active_id')], context) +# wf_service = netsvc.LocalService("workflow") +# wf_service.trg_validate(uid, 'account.voucher', context.get('active_id'), 'cancel_voucher', cr) return {} From 0abd2431920fedddadafa6185f5380ed33c9e80f Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Tue, 17 Aug 2010 10:13:27 +0530 Subject: [PATCH 104/116] [REF] bzr revid: mra@mra-laptop-20100817044327-6xa65a0tqqqyl7eq --- addons/account_tax_include/account_tax_include.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/account_tax_include/account_tax_include.py b/addons/account_tax_include/account_tax_include.py index 597050f9b2c..ed89207a98e 100644 --- a/addons/account_tax_include/account_tax_include.py +++ b/addons/account_tax_include/account_tax_include.py @@ -18,6 +18,7 @@ # along with this program. If not, see . # ############################################################################## + import time from osv import fields, osv @@ -28,7 +29,7 @@ class account_invoice(osv.osv): 'price_type': fields.selection([('tax_included','Tax included'), ('tax_excluded','Tax excluded')], 'Price method', required=True, readonly=True, - states={'draft':[('readonly',False)]}), + states={'draft': [('readonly', False)]}), } _defaults = { 'price_type': 'tax_excluded', @@ -96,7 +97,7 @@ class account_invoice_line(osv.osv): res[line.id]['price_subtotal'] = res[line.id]['price_subtotal_incl'] for tax in tax_obj.compute_inv(cr, uid, line.invoice_line_tax_id, res[line.id]['price_subtotal_incl']/line.quantity, line.quantity): res[line.id]['price_subtotal'] = res[line.id]['price_subtotal'] - tax['amount'] - res[line.id]['data'].append( tax) + res[line.id]['data'].append(tax) res[line.id]['price_subtotal']= round(res[line.id]['price_subtotal'], dec_obj.precision_get(cr, uid, 'Account')) res[line.id]['price_subtotal_incl']= round(res[line.id]['price_subtotal_incl'], dec_obj.precision_get(cr, uid, 'Account')) @@ -164,7 +165,7 @@ class account_invoice_line(osv.osv): # print "str context:", context ctx = (context and context.copy()) or {} - ctx.update({'price_type': ctx.get('price_type','tax_excluded')}) + ctx.update({'price_type': ctx.get('price_type', 'tax_excluded')}) return super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id=currency_id, context=ctx) account_invoice_line() From b217bcf3c5cab4d7a4008b2fb93cb6af121020d4 Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Tue, 17 Aug 2010 10:35:59 +0530 Subject: [PATCH 105/116] [MOD/IMP] lunch : Usability Improvements bzr revid: vir@tinyerp.com-20100817050559-e1lj750cnw58wuoh --- addons/lunch/lunch.py | 2 +- addons/lunch/lunch_view.xml | 26 ++++++++++++++++++- .../lunch/report/report_lunch_order_view.xml | 6 ++--- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/addons/lunch/lunch.py b/addons/lunch/lunch.py index 8dfce4acaff..9e98d503149 100644 --- a/addons/lunch/lunch.py +++ b/addons/lunch/lunch.py @@ -94,7 +94,7 @@ class lunch_cashmove(osv.osv): _description = "Cash Move" _columns = { - 'name': fields.char('Name', size=128), + 'name': fields.char('Description', size=128), 'user_cashmove': fields.many2one('res.users', 'User Name', required=True), 'amount': fields.float('Amount', digits=(16, 2)), 'box': fields.many2one('lunch.cashbox', 'Box Name', size=30, required=True), diff --git a/addons/lunch/lunch_view.xml b/addons/lunch/lunch_view.xml index 5d0fe20c801..71a89124101 100644 --- a/addons/lunch/lunch_view.xml +++ b/addons/lunch/lunch_view.xml @@ -77,6 +77,7 @@ + @@ -193,7 +194,8 @@ - + + @@ -331,6 +333,27 @@
+ + + + Lunch amount + report.lunch.amount + search + + + + + + + + + + + + + + + @@ -338,6 +361,7 @@ report.lunch.amount form tree,form + - + @@ -62,8 +62,8 @@ {'search_default_month':1,'search_default_User':1} - + +
\ No newline at end of file From daee31229852c2983aff30d52a3e09f4f99b9f0b Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Tue, 17 Aug 2010 10:40:27 +0530 Subject: [PATCH 106/116] [IMP] Analytic: Clean Code bzr revid: mra@mra-laptop-20100817051027-6272d912lo05hzj6 --- addons/analytic/__openerp__.py | 3 +- addons/analytic/analytic.py | 73 +++++++++++++++++++--------------- 2 files changed, 41 insertions(+), 35 deletions(-) diff --git a/addons/analytic/__openerp__.py b/addons/analytic/__openerp__.py index e0411506dd8..80585ee39da 100644 --- a/addons/analytic/__openerp__.py +++ b/addons/analytic/__openerp__.py @@ -19,7 +19,6 @@ # ############################################################################## - { "name" : "Analytic Account", "version": "1.1", @@ -37,4 +36,4 @@ 'installable': True, 'active': False, } -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index 77a881744bc..e5dd9d52ce1 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -25,19 +25,15 @@ import operator from osv import fields, osv import decimal_precision as dp -# -# Object definition -# - class account_analytic_account(osv.osv): _name = 'account.analytic.account' _description = 'Analytic Account' - def _compute_currency_for_level_tree(self, cr, uid, ids, ids2, res, context={}): + def _compute_currency_for_level_tree(self, cr, uid, ids, ids2, res, context=None): # Handle multi-currency on each level of analytic account # This is a refactoring of _balance_calc computation cr.execute("SELECT a.id, r.currency_id FROM account_analytic_account a INNER JOIN res_company r ON (a.company_id = r.id) where a.id IN %s" , (tuple(ids2),)) - currency= dict(cr.fetchall()) + currency = dict(cr.fetchall()) res_currency= self.pool.get('res.currency') for id in ids: if id not in ids2: @@ -50,7 +46,7 @@ class account_analytic_account(osv.osv): else: res[id] += res.get(child, 0.0) - cur_obj = res_currency.browse(cr, uid, currency.values(), context) + cur_obj = res_currency.browse(cr, uid, currency.values(), context=context) cur_obj = dict([(o.id, o) for o in cur_obj]) for id in ids: if id in ids2: @@ -58,9 +54,10 @@ class account_analytic_account(osv.osv): return dict([(i, res[i]) for i in ids ]) - - def _credit_calc(self, cr, uid, ids, name, arg, context={}): + def _credit_calc(self, cr, uid, ids, name, arg, context=None): res = {} + if context is None: + context = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) for i in ids: res.setdefault(i,0.0) @@ -69,16 +66,18 @@ class account_analytic_account(osv.osv): return res where_date = '' - if context.get('from_date',False): + if context.get('from_date', False): where_date += " AND l.date >= '" + context['from_date'] + "'" - if context.get('to_date',False): + if context.get('to_date', False): where_date += " AND l.date <= '" + context['to_date'] + "'" cr.execute("SELECT a.id, COALESCE(SUM(l.amount_currency),0) FROM account_analytic_account a LEFT JOIN account_analytic_line l ON (a.id=l.account_id "+where_date+") WHERE l.amount_currency<0 and a.id IN %s GROUP BY a.id",(tuple(parent_ids),)) r = dict(cr.fetchall()) return self._compute_currency_for_level_tree(cr, uid, ids, parent_ids, r, context) - def _debit_calc(self, cr, uid, ids, name, arg, context={}): + def _debit_calc(self, cr, uid, ids, name, arg, context=None): res = {} + if context is None: + context = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) for i in ids: res.setdefault(i,0.0) @@ -92,11 +91,14 @@ class account_analytic_account(osv.osv): if context.get('to_date',False): where_date += " AND l.date <= '" + context['to_date'] + "'" cr.execute("SELECT a.id, COALESCE(SUM(l.amount_currency),0) FROM account_analytic_account a LEFT JOIN account_analytic_line l ON (a.id=l.account_id "+where_date+") WHERE l.amount_currency>0 and a.id IN %s GROUP BY a.id" ,(tuple(parent_ids),)) - r= dict(cr.fetchall()) - return self._compute_currency_for_level_tree(cr, uid, ids, parent_ids, r, context) + r = dict(cr.fetchall()) + return self._compute_currency_for_level_tree(cr, uid, ids, parent_ids, r, context=context) - def _balance_calc(self, cr, uid, ids, name, arg, context={}): + def _balance_calc(self, cr, uid, ids, name, arg, context=None): res = {} + if context is None: + context = {} + parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) for i in ids: res.setdefault(i,0.0) @@ -114,11 +116,14 @@ class account_analytic_account(osv.osv): for account_id, sum in cr.fetchall(): res[account_id] = sum - return self._compute_currency_for_level_tree(cr, uid, ids, parent_ids, res, context) + return self._compute_currency_for_level_tree(cr, uid, ids, parent_ids, res, context=context) - def _quantity_calc(self, cr, uid, ids, name, arg, context={}): + def _quantity_calc(self, cr, uid, ids, name, arg, context=None): #XXX must convert into one uom res = {} + if context is None: + context = {} + parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) for i in ids: @@ -150,7 +155,7 @@ class account_analytic_account(osv.osv): res[id] += res.get(child, 0.0) return dict([(i, res[i]) for i in ids]) - def name_get(self, cr, uid, ids, context={}): + def name_get(self, cr, uid, ids, context=None): if not len(ids): return [] res = [] @@ -168,13 +173,13 @@ class account_analytic_account(osv.osv): res = self.name_get(cr, uid, ids) return dict(res) - def _get_company_currency(self, cr, uid, ids, field_name, arg, context={}): + def _get_company_currency(self, cr, uid, ids, field_name, arg, context=None): result = {} for rec in self.browse(cr, uid, ids, context): result[rec.id] = (rec.company_id.currency_id.id,rec.company_id.currency_id.code) or False return result - def _get_account_currency(self, cr, uid, ids, field_name, arg, context={}): + def _get_account_currency(self, cr, uid, ids, field_name, arg, context=None): result=self._get_company_currency(cr, uid, ids, field_name, arg, context={}) return result @@ -209,19 +214,20 @@ class account_analytic_account(osv.osv): 'currency_id': fields.function(_get_account_currency, method=True, type='many2one', relation='res.currency', string='Account currency', store=True), } - def _default_company(self, cr, uid, context={}): + def _default_company(self, cr, uid, context=None): user = self.pool.get('res.users').browse(cr, uid, uid, context=context) if user.company_id: return user.company_id.id return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0] + _defaults = { - 'type' : lambda *a : 'normal', + 'type' : 'normal', 'company_id': _default_company, - 'state' : lambda *a : 'open', + 'state' : 'open', 'user_id' : lambda self, cr, uid, ctx : uid, 'partner_id': lambda self, cr, uid, ctx: ctx.get('partner_id', False), 'contact_id': lambda self, cr, uid, ctx: ctx.get('contact_id', False), - 'date_start': lambda *a: time.strftime('%Y-%m-%d') + 'date_start': time.strftime('%Y-%m-%d') } def check_recursion(self, cr, uid, ids, parent=None): @@ -238,14 +244,13 @@ class account_analytic_account(osv.osv): vals['code'] = self.pool.get('ir.sequence').get(cr, uid, 'account.analytic.account') return super(account_analytic_account, self).create(cr, uid, vals, context=context) - def copy(self, cr, uid, id, default=None, context={}): + def copy(self, cr, uid, id, default=None, context=None): if not default: default = {} default['code'] = False default['line_ids'] = [] return super(account_analytic_account, self).copy(cr, uid, id, default, context=context) - def on_change_parent(self, cr, uid, id, parent_id): if not parent_id: return {} @@ -281,9 +286,9 @@ account_analytic_account() class account_analytic_line(osv.osv): _name = 'account.analytic.line' _description = 'Analytic Line' - def _amount_currency(self, cr, uid, ids, field_name, arg, context={}): + def _amount_currency(self, cr, uid, ids, field_name, arg, context=None): result = {} - for rec in self.browse(cr, uid, ids, context): + for rec in self.browse(cr, uid, ids, context=context): cmp_cur_id=rec.company_id.currency_id.id aa_cur_id=rec.account_id.currency_id.id # Always provide the amount in currency @@ -298,14 +303,14 @@ class account_analytic_line(osv.osv): else: result[rec.id]=rec.amount return result - - def _get_account_currency(self, cr, uid, ids, field_name, arg, context={}): + + def _get_account_currency(self, cr, uid, ids, field_name, arg, context=None): result = {} for rec in self.browse(cr, uid, ids, context): # Always provide second currency result[rec.id] = (rec.account_id.currency_id.id,rec.account_id.currency_id.code) return result - def _get_account_line(self, cr, uid, ids, context={}): + def _get_account_line(self, cr, uid, ids, context=None): aac_ids = {} for acc in self.pool.get('account.analytic.account').browse(cr, uid, ids): aac_ids[acc.id] = True @@ -337,10 +342,12 @@ class account_analytic_line(osv.osv): } _defaults = { - 'date': lambda *a: time.strftime('%Y-%m-%d'), + 'date': time.strftime('%Y-%m-%d'), 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=c), } + _order = 'date' + account_analytic_line() - +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file From cbea6a2d9a37b768b84716ca85849f17c7ebc827 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Tue, 17 Aug 2010 10:51:55 +0530 Subject: [PATCH 107/116] [FIX] Account Tax include: refund method on invoice argument mismatch with parent bzr revid: mra@mra-laptop-20100817052155-smhw979ym8iwnas8 --- addons/account_tax_include/account_tax_include.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_tax_include/account_tax_include.py b/addons/account_tax_include/account_tax_include.py index ed89207a98e..20adc9bcfcc 100644 --- a/addons/account_tax_include/account_tax_include.py +++ b/addons/account_tax_include/account_tax_include.py @@ -35,11 +35,11 @@ class account_invoice(osv.osv): 'price_type': 'tax_excluded', } - def refund(self, cr, uid, ids, date=None, period_id=None, description=None): + def refund(self, cr, uid, ids, date=None, period_id=None, description=None, journal_id=None): map_old_new = {} refund_ids = [] for old_inv_id in ids: - new_id = super(account_invoice,self).refund(cr, uid, ids, date=date, period_id=period_id, description=description) + new_id = super(account_invoice,self).refund(cr, uid, ids, date=date, period_id=period_id, description=description, journal_id=journal_id) refund_ids += new_id map_old_new[old_inv_id] = new_id[0] From 68686b10740e2b5b613a7962c2f664acb0c998bb Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Tue, 17 Aug 2010 11:18:28 +0530 Subject: [PATCH 108/116] [IMP] Account_invoice_layout bzr revid: mra@mra-laptop-20100817054828-splbbuyn10jfgsn0 --- addons/account_invoice_layout/__init__.py | 5 ++-- addons/account_invoice_layout/__openerp__.py | 2 +- .../account_invoice_layout.py | 27 ++++++++++--------- .../account_invoice_layout_report.xml | 6 ----- .../account_invoice_layout_view.xml | 5 ++-- .../report/report_account_invoice_layout.py | 6 ++--- .../report/special_message_invoice.py | 5 ++-- .../account_invoice_layout/wizard/__init__.py | 1 + .../wizard/account_invoice_special_message.py | 7 +++-- 9 files changed, 33 insertions(+), 31 deletions(-) diff --git a/addons/account_invoice_layout/__init__.py b/addons/account_invoice_layout/__init__.py index 89827ee40ad..779249d794c 100644 --- a/addons/account_invoice_layout/__init__.py +++ b/addons/account_invoice_layout/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,12 +15,13 @@ # 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 . +# along with this program. If not, see . # ############################################################################## import account_invoice_layout import report import wizard + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_invoice_layout/__openerp__.py b/addons/account_invoice_layout/__openerp__.py index c0503539956..77a6e428de6 100644 --- a/addons/account_invoice_layout/__openerp__.py +++ b/addons/account_invoice_layout/__openerp__.py @@ -37,7 +37,7 @@ """, 'author': 'OpenERP SA', 'website': 'http://www.openerp.com', - 'depends': ['base', 'account'], + 'depends': ['account'], 'init_xml': [], 'update_xml': [ 'security/ir.model.access.csv', diff --git a/addons/account_invoice_layout/account_invoice_layout.py b/addons/account_invoice_layout/account_invoice_layout.py index c4a4f64efbe..e596dd0a959 100644 --- a/addons/account_invoice_layout/account_invoice_layout.py +++ b/addons/account_invoice_layout/account_invoice_layout.py @@ -19,22 +19,21 @@ # ############################################################################## -from osv import fields,osv - +from osv import fields, osv class notify_message(osv.osv): _name = 'notify.message' _description = 'Notify By Messages' _columns = { - 'name' : fields.char('Title', size=64, required=True), - 'msg' : fields.text('Special Message', size=125, required=True, help='This notification will appear at the bottom of the Invoices when printed.', translate=True) + 'name': fields.char('Title', size=64, required=True), + 'msg': fields.text('Special Message', size=128, required=True, help='This notification will appear at the bottom of the Invoices when printed.', translate=True) } notify_message() class account_invoice_line(osv.osv): - def move_line_get_item(self, cr, uid, line, context={}): + def move_line_get_item(self, cr, uid, line, context=None): if line.state != 'article': return None return super(account_invoice_line, self).move_line_get_item(cr, uid, line, context) @@ -70,7 +69,7 @@ class account_invoice_line(osv.osv): res[field]['states'][key] = value return res - def onchange_invoice_line_view(self, cr, uid, id, type, context={}, *args): + def onchange_invoice_line_view(self, cr, uid, id, type, context=None, *args): if (not type): return {} @@ -131,7 +130,7 @@ class account_invoice_line(osv.osv): default['state'] = self.browse(cr, uid, id).state return super(account_invoice_line, self).copy_data(cr, uid, id, default, context) - def _fnct(self, cr, uid, id, name, args, context): + def _fnct(self, cr, uid, id, name, args, context=None): res = {} for m in self.browse(cr, uid, id): if m.state != 'article': @@ -165,18 +164,19 @@ class account_invoice_line(osv.osv): def _default_account(self, cr, uid, context=None): cr.execute("select id from account_account where parent_id IS NULL LIMIT 1") - res=cr.fetchone() + res = cr.fetchone() return res[0] _defaults = { - 'state': lambda *a: 'article', - 'sequence': lambda *a : 0, + 'state': 'article', + 'sequence': 0, # 'account_id': _default_account } + account_invoice_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 = {} @@ -210,6 +210,7 @@ class account_invoice(osv.osv): 'abstract_line_ids': fields.one2many('account.invoice.line', 'invoice_id', 'Invoice Lines',readonly=True, states={'draft':[('readonly',False)]}), 'invoice_line': one2many_mod2('account.invoice.line', 'invoice_id', 'Invoice Lines',readonly=True, states={'draft':[('readonly',False)]}), } -account_invoice() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: +account_invoice() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/account_invoice_layout/account_invoice_layout_report.xml b/addons/account_invoice_layout/account_invoice_layout_report.xml index 747bc83d4c2..4b21fcd5b33 100644 --- a/addons/account_invoice_layout/account_invoice_layout_report.xml +++ b/addons/account_invoice_layout/account_invoice_layout_report.xml @@ -1,12 +1,6 @@ - + @@ -73,6 +74,7 @@
+ @@ -83,10 +85,9 @@ form tree,form + - -
diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.py b/addons/account_invoice_layout/report/report_account_invoice_layout.py index b2c1f37fb2b..54c0daadb79 100644 --- a/addons/account_invoice_layout/report/report_account_invoice_layout.py +++ b/addons/account_invoice_layout/report/report_account_invoice_layout.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,12 +15,12 @@ # 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 . +# along with this program. If not, see . # ############################################################################## import time -import pooler + from report import report_sxw class account_invoice_1(report_sxw.rml_parse): diff --git a/addons/account_invoice_layout/report/special_message_invoice.py b/addons/account_invoice_layout/report/special_message_invoice.py index fdda2e65278..aaa79787072 100644 --- a/addons/account_invoice_layout/report/special_message_invoice.py +++ b/addons/account_invoice_layout/report/special_message_invoice.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,11 +15,12 @@ # 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 . +# along with this program. If not, see . # ############################################################################## import time + from report import report_sxw import pooler diff --git a/addons/account_invoice_layout/wizard/__init__.py b/addons/account_invoice_layout/wizard/__init__.py index 3b724adbe39..87cfa0d263b 100644 --- a/addons/account_invoice_layout/wizard/__init__.py +++ b/addons/account_invoice_layout/wizard/__init__.py @@ -20,5 +20,6 @@ ############################################################################## import account_invoice_special_message + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_invoice_layout/wizard/account_invoice_special_message.py b/addons/account_invoice_layout/wizard/account_invoice_special_message.py index 5936e4c1579..adc3261fa64 100644 --- a/addons/account_invoice_layout/wizard/account_invoice_special_message.py +++ b/addons/account_invoice_layout/wizard/account_invoice_special_message.py @@ -18,6 +18,7 @@ # along with this program. If not, see . # ############################################################################## + from osv import osv, fields class account_invoice_special_msg(osv.osv_memory): @@ -32,17 +33,19 @@ class account_invoice_special_msg(osv.osv_memory): datas = {} if context is None: context = {} + data = self.read(cr, uid, ids, [])[0] datas = { 'ids': context.get('active_ids',[]), 'model': 'account.invoice', 'form': data - } + } return { 'type': 'ir.actions.report.xml', 'report_name': 'notify_account.invoice', 'datas': datas, - } + } account_invoice_special_msg() + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file From 82048605c460286ad6c83feefa12560708986076 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Tue, 17 Aug 2010 11:30:50 +0530 Subject: [PATCH 109/116] [Fix]project_mrp: Fix the process [IMP] mrp: Move the service node into procurement bzr revid: sbh@tinyerp.com-20100817060050-h88jd42gmku3vp1z --- addons/mrp/process/procurement_process.xml | 6 ++--- .../mrp/process/service_product_process.xml | 25 +++---------------- .../process/procurement_process.xml | 16 ++++++++++++ addons/project_mrp/__openerp__.py | 2 +- .../process/project_mrp_process.xml | 4 +-- 5 files changed, 25 insertions(+), 28 deletions(-) diff --git a/addons/mrp/process/procurement_process.xml b/addons/mrp/process/procurement_process.xml index 449a99bc056..ca08481d4e4 100644 --- a/addons/mrp/process/procurement_process.xml +++ b/addons/mrp/process/procurement_process.xml @@ -55,7 +55,7 @@ - + @@ -67,7 +67,7 @@ - + @@ -132,7 +132,7 @@ - + diff --git a/addons/mrp/process/service_product_process.xml b/addons/mrp/process/service_product_process.xml index 5c8fc1066f2..c23ed6e7a65 100644 --- a/addons/mrp/process/service_product_process.xml +++ b/addons/mrp/process/service_product_process.xml @@ -2,30 +2,11 @@ - - - - - - - - - - - - - - - - - @@ -33,7 +14,7 @@ - + @@ -45,7 +26,7 @@ - + @@ -60,7 +41,7 @@ - + diff --git a/addons/procurement/process/procurement_process.xml b/addons/procurement/process/procurement_process.xml index d6a1c0a0489..42ee50782a1 100644 --- a/addons/procurement/process/procurement_process.xml +++ b/addons/procurement/process/procurement_process.xml @@ -22,5 +22,21 @@ + + + + + + + + + + + + + + + +
diff --git a/addons/project_mrp/__openerp__.py b/addons/project_mrp/__openerp__.py index 7ca37e87d13..8d531efc8fa 100644 --- a/addons/project_mrp/__openerp__.py +++ b/addons/project_mrp/__openerp__.py @@ -50,7 +50,7 @@ automatically created via sale orders. 'depends': ['project', 'procurement', 'sale', 'mrp_jit'], 'init_xml': [], 'update_xml': ['project_mrp_workflow.xml', - #'process/project_mrp_process.xml', + 'process/project_mrp_process.xml', 'project_mrp_view.xml' ], 'demo_xml': [], diff --git a/addons/project_mrp/process/project_mrp_process.xml b/addons/project_mrp/process/project_mrp_process.xml index 78c858f43dc..33d8698ce3d 100644 --- a/addons/project_mrp/process/project_mrp_process.xml +++ b/addons/project_mrp/process/project_mrp_process.xml @@ -36,7 +36,7 @@ - + @@ -67,7 +67,7 @@ - + From 68841dc860f80606f249749b3fa4da355038b18b Mon Sep 17 00:00:00 2001 From: "JMA(OpenERP)" <> Date: Tue, 17 Aug 2010 11:39:05 +0530 Subject: [PATCH 110/116] [FIX] Stock : Internal location domain corrected lp bug: https://launchpad.net/bugs/618333 fixed bzr revid: jvo@tinyerp.com-20100817060905-kgpadfyrvboy6y8k --- addons/stock/stock_view.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 9665d3967ab..9bb678cc265 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -400,11 +400,11 @@ + string="Internal" domain="[('usage', '=', 'internal')]" help="Internal Locations" /> + string="Customer" domain="[('usage', '=', 'customer')]" help="Customer Locations" /> + string="Supplier" domain="[('usage', '=', 'supplier')]" help="Supplier Locations" /> @@ -433,6 +433,7 @@ ir.actions.act_window form + {'full':1, 'search_default_in_location':1} From b1f39a97fe0954ca02c49c6dd87a213a26911247 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Tue, 17 Aug 2010 11:45:57 +0530 Subject: [PATCH 111/116] [FIX] Account: invoice line product id onchange=> Description updated with product changes now bzr revid: mra@mra-laptop-20100817061557-19vap51ps2itufm1 --- addons/account/invoice.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 940d9cba0f6..a463a7d48c9 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -598,9 +598,9 @@ class account_invoice(osv.osv): def copy(self, cr, uid, id, default={}, context=None): default.update({ - 'state':'draft', - 'number':False, - 'move_id':False, + 'state':'draft', + 'number':False, + 'move_id':False, 'move_name':False, 'internal_number': False, }) @@ -941,7 +941,7 @@ class account_invoice(osv.osv): def action_number(self, cr, uid, ids, *args): #TODO: not correct fix but required a frech values before reading it. self.write(cr, uid, ids, {}) - + for obj_inv in self.browse(cr, uid, ids): id = obj_inv.id invtype = obj_inv.type @@ -950,7 +950,7 @@ class account_invoice(osv.osv): reference = obj_inv.reference or '' self.write(cr, uid, ids, {'internal_number':number}) - + if invtype in ('in_invoice', 'in_refund'): ref = reference else: @@ -967,7 +967,7 @@ class account_invoice(osv.osv): 'WHERE account_move_line.move_id = %s ' \ 'AND account_analytic_line.move_id = account_move_line.id', (ref, move_id)) - + for inv_id, name in self.name_get(cr, uid, [id]): message = _('Invoice ') + " '" + name + "' "+ _("is validated.") self.log(cr, uid, inv_id, message) @@ -1367,8 +1367,8 @@ class account_invoice_line(osv.osv): else: result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id}) - if not name: - result['name'] = res.partner_ref +# if not name: + result['name'] = res.partner_ref domain = {} result['uos_id'] = res.uom_id.id or uom or False From 1193201fb0e7b3b9e8895f55f686a4f4afa6f22f Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Tue, 17 Aug 2010 12:06:47 +0530 Subject: [PATCH 112/116] [FIX] Account_payment: Bank statement openning with payment lines button on it bzr revid: mra@mra-laptop-20100817063647-5t41vnrqdf4f3723 --- addons/account_payment/account_payment_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_payment/account_payment_view.xml b/addons/account_payment/account_payment_view.xml index 52bad6012bf..880ac0de94b 100644 --- a/addons/account_payment/account_payment_view.xml +++ b/addons/account_payment/account_payment_view.xml @@ -299,7 +299,7 @@ form - +