[IMP] product_margin, product_expiry,product_manufacturer: improve and cleaning

bzr revid: mra@mra-laptop-20100813072843-l72opp20yoiik3pg
This commit is contained in:
MTR(OpenERP) 2010-08-13 12:58:43 +05:30 committed by Mustufa Rangwala
parent 1250d1cac7
commit d781b93335
22 changed files with 110 additions and 687 deletions

View File

@ -23,7 +23,6 @@ from osv import fields, osv
import pooler import pooler
class stock_production_lot(osv.osv): class stock_production_lot(osv.osv):
_name = 'stock.production.lot'
_inherit = 'stock.production.lot' _inherit = 'stock.production.lot'
def _get_date(dtype): def _get_date(dtype):
@ -51,7 +50,7 @@ class stock_production_lot(osv.osv):
help='The date the lot starts deteriorating without becoming dangerous.'), help='The date the lot starts deteriorating without becoming dangerous.'),
'removal_date': fields.datetime('Removal Date', 'removal_date': fields.datetime('Removal Date',
help='The date the lot should be removed.'), 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 # Assign dates according to products data
def create(self, cr, uid, vals, context=None): def create(self, cr, uid, vals, context=None):
@ -76,15 +75,14 @@ stock_production_lot()
class product_product(osv.osv): class product_product(osv.osv):
_inherit = 'product.product' _inherit = 'product.product'
_name = 'product.product'
_columns = { _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.'), 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.'), 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.'), 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() product_product()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -13,6 +13,7 @@
<field name="use_date" /> <field name="use_date" />
<field name="removal_date" /> <field name="removal_date" />
<field name="alert_date" /> <field name="alert_date" />
<separator colspan="4" />
</field> </field>
</field> </field>
</record> </record>
@ -25,7 +26,6 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<notebook position="inside"> <notebook position="inside">
<page string="Dates"> <page string="Dates">
<separator string="Dates" colspan="4" />
<field name="life_time" /> <field name="life_time" />
<field name="use_time" /> <field name="use_time" />
<field name="removal_time" /> <field name="removal_time" />

View File

@ -1,5 +1,5 @@
############################################################################## ##############################################################################
# #
# OpenERP, Open Source Management Solution # OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# #
@ -14,10 +14,11 @@
# GNU Affero General Public License for more details. # GNU Affero General Public License for more details.
# #
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
import product_manufacturer import product_manufacturer
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,5 +1,5 @@
############################################################################## ##############################################################################
# #
# OpenERP, Open Source Management Solution # OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# #
@ -14,7 +14,7 @@
# GNU Affero General Public License for more details. # GNU Affero General Public License for more details.
# #
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
{ {
@ -22,7 +22,7 @@
"version" : "1.0", "version" : "1.0",
"author" : "OpenERP SA", "author" : "OpenERP SA",
"category" : "Enterprise Specific Modules/Manufacturer Industries", "category" : "Enterprise Specific Modules/Manufacturer Industries",
"depends" : ["base", "account", "product", "stock"], "depends" : ["stock"],
"init_xml" : [], "init_xml" : [],
"demo_xml" : [], "demo_xml" : [],
"description": "A module that add manufacturers and attributes on the product form", "description": "A module that add manufacturers and attributes on the product form",
@ -30,5 +30,4 @@
"active": False, "active": False,
"installable": True "installable": True
} }
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-11-25 13:27:55+0000\n" "POT-Creation-Date: 2010-08-12 12:35:32+0000\n"
"PO-Revision-Date: 2009-11-25 13:27:55+0000\n" "PO-Revision-Date: 2010-08-12 12:35:32+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -22,7 +22,7 @@ msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
#: field:product.product,manufacturer_pref:0 #: field:product.product,manufacturer_pref:0
msgid "Manufacturer product code" msgid "Manufacturer Product Code"
msgstr "" msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
@ -41,18 +41,14 @@ msgid "The Object name must start with x_ and not contain any special character
msgstr "" msgstr ""
#. module: product_manufacturer #. 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" msgid "Product attributes"
msgstr "" msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
#: view:product.manufacturer.attribute:0
#: view:product.product:0 #: view:product.product:0
msgid "Manufacturing data" msgid "Product Attributes"
msgstr ""
#. module: product_manufacturer
#: view:product.product:0
msgid "Product reference"
msgstr "" msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
@ -61,6 +57,7 @@ msgid "Attribute"
msgstr "" msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
#: model:ir.model,name:product_manufacturer.model_product_product
#: field:product.manufacturer.attribute,product_id:0 #: field:product.manufacturer.attribute,product_id:0
msgid "Product" msgid "Product"
msgstr "" msgstr ""
@ -70,16 +67,6 @@ msgstr ""
msgid "Value" msgid "Value"
msgstr "" 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 #. module: product_manufacturer
#: view:product.product:0 #: view:product.product:0
#: field:product.product,attribute_ids:0 #: field:product.product,attribute_ids:0
@ -93,10 +80,11 @@ msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
#: field:product.product,manufacturer_pname:0 #: field:product.product,manufacturer_pname:0
msgid "Manufacturer product name" msgid "Manufacturer Product Name"
msgstr "" msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
#: view:product.product:0
#: field:product.product,manufacturer:0 #: field:product.product,manufacturer:0
msgid "Manufacturer" msgid "Manufacturer"
msgstr "" msgstr ""

View File

@ -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 <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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) <borjals@pexego.es>\n"
"Language-Team: Spanish <es@li.org>\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"

View File

@ -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 <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-25 13:27+0000\n"
"PO-Revision-Date: 2010-06-25 18:10+0000\n"
"Last-Translator: lyyser <logard.1961@gmail.com>\n"
"Language-Team: Estonian <et@li.org>\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"

View File

@ -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 <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <EMAIL@ADDRESS>\n"
"Language-Team: French <fr@li.org>\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 ""

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-11-25 13:27:55+0000\n" "POT-Creation-Date: 2010-08-13 06:18:00+0000\n"
"PO-Revision-Date: 2009-11-25 13:27:55+0000\n" "PO-Revision-Date: 2010-08-13 06:18:00+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -22,7 +22,7 @@ msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
#: field:product.product,manufacturer_pref:0 #: field:product.product,manufacturer_pref:0
msgid "Manufacturer product code" msgid "Manufacturer Product Code"
msgstr "" msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
@ -41,18 +41,14 @@ msgid "The Object name must start with x_ and not contain any special character
msgstr "" msgstr ""
#. module: product_manufacturer #. 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" msgid "Product attributes"
msgstr "" msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
#: view:product.manufacturer.attribute:0
#: view:product.product:0 #: view:product.product:0
msgid "Manufacturing data" msgid "Product Attributes"
msgstr ""
#. module: product_manufacturer
#: view:product.product:0
msgid "Product reference"
msgstr "" msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
@ -61,6 +57,7 @@ msgid "Attribute"
msgstr "" msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
#: model:ir.model,name:product_manufacturer.model_product_product
#: field:product.manufacturer.attribute,product_id:0 #: field:product.manufacturer.attribute,product_id:0
msgid "Product" msgid "Product"
msgstr "" msgstr ""
@ -70,16 +67,6 @@ msgstr ""
msgid "Value" msgid "Value"
msgstr "" 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 #. module: product_manufacturer
#: view:product.product:0 #: view:product.product:0
#: field:product.product,attribute_ids:0 #: field:product.product,attribute_ids:0
@ -93,10 +80,11 @@ msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
#: field:product.product,manufacturer_pname:0 #: field:product.product,manufacturer_pname:0
msgid "Manufacturer product name" msgid "Manufacturer Product Name"
msgstr "" msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
#: view:product.product:0
#: field:product.product,manufacturer:0 #: field:product.product,manufacturer:0
msgid "Manufacturer" msgid "Manufacturer"
msgstr "" msgstr ""

View File

@ -1,21 +1,19 @@
# Dutch translation for openobject-addons # Translation of OpenERP Server.
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 # This file contains the translation of the following modules:
# This file is distributed under the same license as the openobject-addons package. # * product_manufacturer
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: openobject-addons\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-11-25 13:27+0000\n" "POT-Creation-Date: 2010-08-12 12:35:32+0000\n"
"PO-Revision-Date: 2010-08-02 11:29+0000\n" "PO-Revision-Date: 2010-08-12 12:35:32+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: <>\n"
"Language-Team: Dutch <nl@li.org>\n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: \n"
"X-Launchpad-Export-Date: 2010-08-12 04:08+0000\n" "Plural-Forms: \n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: product_manufacturer #. module: product_manufacturer
#: model:ir.module.module,description:product_manufacturer.module_meta_information #: model:ir.module.module,description:product_manufacturer.module_meta_information
@ -24,7 +22,7 @@ msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
#: field:product.product,manufacturer_pref:0 #: field:product.product,manufacturer_pref:0
msgid "Manufacturer product code" msgid "Manufacturer Product Code"
msgstr "" msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
@ -39,23 +37,18 @@ msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
#: constraint:ir.model:0 #: constraint:ir.model:0
msgid "" msgid "The Object name must start with x_ and not contain any special character !"
"The Object name must start with x_ and not contain any special character !"
msgstr "" msgstr ""
#. module: product_manufacturer #. 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" msgid "Product attributes"
msgstr "" msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
#: view:product.manufacturer.attribute:0
#: view:product.product:0 #: view:product.product:0
msgid "Manufacturing data" msgid "Product Attributes"
msgstr ""
#. module: product_manufacturer
#: view:product.product:0
msgid "Product reference"
msgstr "" msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
@ -64,6 +57,7 @@ msgid "Attribute"
msgstr "" msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
#: model:ir.model,name:product_manufacturer.model_product_product
#: field:product.manufacturer.attribute,product_id:0 #: field:product.manufacturer.attribute,product_id:0
msgid "Product" msgid "Product"
msgstr "" msgstr ""
@ -73,16 +67,6 @@ msgstr ""
msgid "Value" msgid "Value"
msgstr "" 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 #. module: product_manufacturer
#: view:product.product:0 #: view:product.product:0
#: field:product.product,attribute_ids:0 #: field:product.product,attribute_ids:0
@ -96,10 +80,12 @@ msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
#: field:product.product,manufacturer_pname:0 #: field:product.product,manufacturer_pname:0
msgid "Manufacturer product name" msgid "Manufacturer Product Name"
msgstr "" msgstr ""
#. module: product_manufacturer #. module: product_manufacturer
#: view:product.product:0
#: field:product.product,manufacturer:0 #: field:product.product,manufacturer:0
msgid "Manufacturer" msgid "Manufacturer"
msgstr "" msgstr ""

View File

@ -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 <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <Unknown>\n"
"Language-Team: Russian <ru@li.org>\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 "Производитель"

View File

@ -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 <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <Unknown>\n"
"Language-Team: Slovenian <sl@li.org>\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"

View File

@ -1,5 +1,5 @@
############################################################################## ##############################################################################
# #
# OpenERP, Open Source Management Solution # OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# #
@ -14,15 +14,14 @@
# GNU Affero General Public License for more details. # GNU Affero General Public License for more details.
# #
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
from osv import fields,osv from osv import fields, osv
class product_product(osv.osv): class product_product(osv.osv):
_inherit = 'product.product' _inherit = 'product.product'
_name = 'product.product'
_columns = { _columns = {
'manufacturer' : fields.many2one('res.partner', 'Manufacturer'), 'manufacturer' : fields.many2one('res.partner', 'Manufacturer'),
'manufacturer_pname' : fields.char('Manufacturer Product Name', size=64), 'manufacturer_pname' : fields.char('Manufacturer Product Name', size=64),
@ -41,6 +40,4 @@ class product_attribute(osv.osv):
} }
product_attribute() product_attribute()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -15,7 +15,7 @@
<newline/> <newline/>
<field name="manufacturer_pname"/> <field name="manufacturer_pname"/>
<field name="manufacturer_pref"/> <field name="manufacturer_pref"/>
<separator string="Attributes" colspan="4"/> <separator string="Attributes" colspan="4"/>
<field name="attribute_ids" colspan="4" nolabel="1"> <field name="attribute_ids" colspan="4" nolabel="1">
<tree string="Product Attributes" editable="bottom"> <tree string="Product Attributes" editable="bottom">

View File

@ -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. the report has several options to help you get the data you need.
""", """,
'author': 'OpenERP SA', 'author': 'OpenERP SA',
'depends': ['base', 'product', 'account'], 'depends': ['account'],
'update_xml': [ 'update_xml': [
'security/ir.model.access.csv', 'security/ir.model.access.csv',
'wizard/product_margin_view.xml', 'wizard/product_margin_view.xml',

View File

@ -19,28 +19,30 @@
# #
############################################################################## ##############################################################################
from osv import fields,osv
import pooler
from tools import config
import time import time
from osv import fields, osv
class product_product(osv.osv): class product_product(osv.osv):
_inherit = "product.product" _inherit = "product.product"
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): def _product_margin(self, cr, uid, ids, field_names, arg, context=None):
res = {} res = {}
if context is None:
context = {}
for val in self.browse(cr, uid, ids,context=context): for val in self.browse(cr, uid, ids,context=context):
res[val.id] = {} res[val.id] = {}
date_from=context.get('date_from', time.strftime('%Y-01-01')) date_from = context.get('date_from', time.strftime('%Y-01-01'))
date_to=context.get('date_to', time.strftime('%Y-12-31')) date_to = context.get('date_to', time.strftime('%Y-12-31'))
invoice_state=context.get('invoice_state', 'open_paid') invoice_state = context.get('invoice_state', 'open_paid')
if 'date_from' in field_names: if 'date_from' in field_names:
res[val.id]['date_from']=date_from res[val.id]['date_from']=date_from
if 'date_to' in field_names: if 'date_to' in field_names:
res[val.id]['date_to']=date_to res[val.id]['date_to']=date_to
if 'invoice_state' in field_names: if 'invoice_state' in field_names:
res[val.id]['invoice_state']=invoice_state res[val.id]['invoice_state']=invoice_state
invoice_types=() invoice_types = ()
states=() states = ()
if invoice_state=='paid': if invoice_state=='paid':
states=('paid',) states=('paid',)
elif invoice_state=='open_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"), '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"), 'expected_margin_rate' : fields.function(_product_margin, method=True, type='float', string='Expected Margin (%)', multi='margin',help="Expected margin * 100 / Expected Sale"),
} }
product_product() product_product()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -18,15 +18,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
import time
from osv import osv
from osv import fields
import netsvc
import time import time
from osv import fields, osv
from tools.translate import _ from tools.translate import _
class product_margin(osv.osv_memory):
class product_margin(osv.osv_memory):
_name = 'product.margin' _name = 'product.margin'
_description = 'Product Margin' _description = 'Product Margin'
_columns = { _columns = {
@ -39,9 +37,9 @@ class product_margin(osv.osv_memory):
],'Invoice State', select=True, required=True), ],'Invoice State', select=True, required=True),
} }
_defaults = { _defaults = {
'from_date': lambda *a:time.strftime('%Y-01-01'), 'from_date': time.strftime('%Y-01-01'),
'to_date':lambda *a:time.strftime('%Y-12-31'), 'to_date': time.strftime('%Y-12-31'),
'invoice_state': lambda *a:"open_paid", 'invoice_state': "open_paid",
} }
def action_open_window(self, cr, uid, ids, context=None): def action_open_window(self, cr, uid, ids, context=None):
""" """
@ -77,3 +75,5 @@ class product_margin(osv.osv_memory):
} }
product_margin() product_margin()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,32 +1,32 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<openerp> <openerp>
<data> <data>
<record id="product_margin_form_view" model="ir.ui.view"> <record id="product_margin_form_view" model="ir.ui.view">
<field name="name">product.margin.form</field> <field name="name">product.margin.form</field>
<field name="model">product.margin</field> <field name="model">product.margin</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Properties categories"> <form string="Properties categories">
<separator colspan="4" string="General Information"/> <separator colspan="4" string="General Information"/>
<field name="from_date" /> <field name="from_date" />
<field name="to_date" /> <field name="to_date" />
<field name="invoice_state" /> <field name="invoice_state" />
<separator colspan="4" string=""/> <separator colspan="4" string=""/>
<group col="4" colspan="2"> <group col="4" colspan="2">
<button icon='gtk-cancel' special="cancel" <button icon='gtk-cancel' special="cancel" string="Cancel" />
string="Cancel" /> <button name="action_open_window" string="Open Margins" type="object" icon="gtk-execute"/>
<button name="action_open_window" string="Open Margins" type="object" icon="gtk-execute"/> </group>
</group> </form>
</form> </field>
</field> </record>
</record>
<act_window name="Product Margins" <act_window name="Product Margins"
res_model="product.margin" res_model="product.margin"
src_model="product.product" src_model="product.product"
view_mode="form" view_mode="form"
target="new" target="new"
key2="client_action_multi" key2="client_action_multi"
id="product_margin_act_window"/> id="product_margin_act_window"/>
</data>
</data>
</openerp> </openerp>

View File

@ -17,6 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
import product
import product_visible_discount
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -32,7 +32,7 @@
""", """,
"depends": ["sale"], "depends": ["sale"],
"demo_xml": [], "demo_xml": [],
"update_xml": ['product_view.xml'], "update_xml": ['product_visible_discount_view.xml'],
"active": False, "active": False,
"installable": True, "installable": True,
} }

View File

@ -19,27 +19,24 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
from osv import fields, osv from osv import fields, osv
import pooler
from tools import config
from osv.osv import except_osv from osv.osv import except_osv
from tools.translate import _ from tools.translate import _
class product_pricelist(osv.osv): class product_pricelist(osv.osv):
_name = 'product.pricelist'
_inherit = 'product.pricelist' _inherit = 'product.pricelist'
_columns ={ _columns ={
'visible_discount':fields.boolean('Visible Discount'), 'visible_discount': fields.boolean('Visible Discount'),
} }
_defaults = { _defaults = {
'visible_discount': True, 'visible_discount': True,
} }
product_pricelist() product_pricelist()
class sale_order_line(osv.osv): class sale_order_line(osv.osv):
_name = "sale.order.line"
_inherit = "sale.order.line" _inherit = "sale.order.line"
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,
@ -106,7 +103,6 @@ class sale_order_line(osv.osv):
sale_order_line() sale_order_line()
class account_invoice_line(osv.osv): class account_invoice_line(osv.osv):
_name = "account.invoice.line"
_inherit = "account.invoice.line" _inherit = "account.invoice.line"
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context={}): def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context={}):