summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorJMA (OpenERP) <jma@tinyerp.com>2010-06-16 17:12:11 +0530
committerJMA (OpenERP) <jma@tinyerp.com>2010-06-16 17:12:11 +0530
commit3fcdccbeca610a645085e652de4fa2824be99568 (patch)
treef833d7a3e3c2980f4d3c00fb7f17393b29496aaa /addons
parent291f6cc29b04c67c61566ad4534d22a16fdae229 (diff)
parent80fcbdb4d66f88c7f0f663c5aa7edda847f22ec5 (diff)
[MERGE] Merge the changes from main trunk branch.
bzr revid: jma@tinyerp.com-20100616114211-baomq9ypqtpbv3ck
Diffstat (limited to 'addons')
-rw-r--r--addons/account/i18n/it.po6
-rw-r--r--addons/account/report/__init__.py2
-rw-r--r--addons/base_contact/base_contact_view.xml8
-rw-r--r--addons/base_module_quality/i18n/it.po22
-rw-r--r--addons/base_setup/base_setup_installer.xml1
-rw-r--r--addons/base_setup/installer.py3
-rw-r--r--addons/board/i18n/nl_BE.po24
-rw-r--r--addons/board_purchase/board_purchase_view.xml8
-rw-r--r--addons/claim_from_delivery/__init__.py2
-rw-r--r--addons/claim_from_delivery/claim_delivery.py29
-rw-r--r--addons/claim_from_delivery/claim_delivery_view.xml24
-rw-r--r--addons/crm_claim/crm_claim.py3
-rw-r--r--addons/crm_claim/crm_claim_view.xml32
-rw-r--r--addons/delivery/delivery_view.xml2
-rw-r--r--addons/email_template/email_template.py22
-rw-r--r--addons/email_template/email_template_view.xml22
-rw-r--r--addons/google_map/i18n/ru.po2
-rw-r--r--addons/marketing_campaign/marketing_campaign.py97
-rw-r--r--addons/marketing_campaign/marketing_campaign_view.xml2
-rw-r--r--addons/marketing_campaign_mailchimp/__init__.py4
-rw-r--r--addons/marketing_campaign_mailchimp/__openerp__.py1
-rw-r--r--addons/marketing_campaign_mailchimp/marketing_campaign_mailchimp.py149
-rw-r--r--addons/marketing_campaign_mailchimp/marketing_campaign_mailchimp_view.xml59
-rwxr-xr-xaddons/marketing_campaign_mailchimp/wizard/__init__.py24
-rwxr-xr-xaddons/marketing_campaign_mailchimp/wizard/create_list.py64
-rwxr-xr-xaddons/marketing_campaign_mailchimp/wizard/create_list_view.xml35
-rw-r--r--addons/mrp/mrp.py15
-rw-r--r--addons/mrp/mrp_view.xml34
-rw-r--r--addons/mrp/product.py20
-rw-r--r--addons/mrp/security/ir.model.access.csv4
-rw-r--r--addons/mrp/test/mrp_phantom_bom.yml6
-rw-r--r--addons/mrp_operations/i18n/hi.po439
-rw-r--r--addons/mrp_repair/i18n/hi.po669
-rw-r--r--addons/multi_company/i18n/it.po18
-rw-r--r--addons/point_of_sale/__openerp__.py1
-rw-r--r--addons/point_of_sale/account_bank_statement.py3
-rw-r--r--addons/point_of_sale/report/__init__.py1
-rw-r--r--addons/point_of_sale/report/report_pos_order.py89
-rw-r--r--addons/point_of_sale/report/report_pos_order_view.xml98
-rw-r--r--addons/point_of_sale/security/ir.model.access.csv2
-rw-r--r--addons/point_of_sale/statement_view.xml43
-rw-r--r--addons/procurement/schedulers.py6
-rw-r--r--addons/procurement/security/ir.model.access.csv16
-rw-r--r--addons/procurement/wizard/mrp_procurement.py3
-rw-r--r--addons/procurement/wizard/schedulers_all.py4
-rw-r--r--addons/product/i18n/vi.po2
-rw-r--r--addons/product/product_view.xml2
-rw-r--r--addons/product_expiry/__init__.py25
-rw-r--r--addons/product_expiry/__terp__.py39
-rw-r--r--addons/product_expiry/i18n/ca.po180
-rw-r--r--addons/product_expiry/i18n/es.po180
-rw-r--r--addons/product_expiry/i18n/fr.po178
-rw-r--r--addons/product_expiry/i18n/fr_FR.po159
-rw-r--r--addons/product_expiry/i18n/product_expiry.pot154
-rw-r--r--addons/product_expiry/product_expiry.py91
-rw-r--r--addons/product_expiry/product_expiry_demo.xml128
-rw-r--r--addons/product_expiry/product_expiry_view.xml39
-rw-r--r--addons/product_expiry/report/__init__.py25
-rw-r--r--addons/product_expiry/report/report_stock.py121
-rw-r--r--addons/product_expiry/report/report_stock_view.xml103
-rw-r--r--addons/product_expiry/wizard/__init__.py1
-rw-r--r--addons/product_expiry/wizard/stock_partial.py80
-rw-r--r--addons/product_expiry/wizard/stock_partial_view.xml22
-rw-r--r--addons/product_manufacturer/__init__.py23
-rw-r--r--addons/product_manufacturer/__openerp__.py34
-rw-r--r--addons/product_manufacturer/i18n/fr_BE.po103
-rw-r--r--addons/product_manufacturer/i18n/product_manufacturer.pot103
-rw-r--r--addons/product_manufacturer/product_manufacturer.py59
-rw-r--r--addons/product_manufacturer/product_manufacturer_view.xml72
-rw-r--r--addons/product_manufacturer/security/ir.model.access.csv5
-rw-r--r--addons/project/security/ir.model.access.csv3
-rw-r--r--addons/project_planning/project_planning_view.xml8
-rw-r--r--addons/purchase/purchase_view.xml1
-rw-r--r--addons/purchase/report/purchase_report_view.xml44
-rw-r--r--addons/resource/security/ir.model.access.csv1
-rw-r--r--addons/sale/report/sale_report.py2
-rw-r--r--addons/sale/sale_view.xml3
-rw-r--r--addons/sale/test/sale_procurement.yml19
-rw-r--r--addons/sale/test/shipping_manual_sale_order.yml2
-rw-r--r--addons/sale_order_dates/__init__.py25
-rw-r--r--addons/sale_order_dates/__openerp__.py44
-rw-r--r--addons/sale_order_dates/sale.py68
-rw-r--r--addons/sale_order_dates/sale_view.xml23
-rw-r--r--addons/stock/__openerp__.py1
-rw-r--r--addons/stock/i18n/nl.po64
-rw-r--r--addons/stock/i18n/pl.po42
-rw-r--r--addons/stock/report/packing.rml317
-rw-r--r--addons/stock/report/picking.py1
-rw-r--r--[-rwxr-xr-x]addons/stock/report/report_stock_move.py0
-rw-r--r--[-rwxr-xr-x]addons/stock/report/report_stock_move_view.xml10
-rw-r--r--addons/stock/report/report_stock_picking.py110
-rw-r--r--addons/stock/report/report_stock_picking_view.xml136
-rw-r--r--addons/stock/security/ir.model.access.csv25
-rw-r--r--addons/stock/stock.py79
-rw-r--r--addons/stock/stock_report.xml1
-rw-r--r--addons/stock/stock_view.xml260
-rw-r--r--addons/stock/wizard/__init__.py1
-rw-r--r--addons/stock/wizard/stock_move.py13
-rw-r--r--addons/stock/wizard/stock_move_view.xml20
-rw-r--r--addons/stock/wizard/stock_partial_move.py130
-rw-r--r--addons/stock/wizard/stock_partial_picking.py108
-rw-r--r--addons/stock/wizard/stock_splitinto.py84
-rw-r--r--addons/stock/wizard/stock_splitinto_view.xml31
-rw-r--r--addons/stock_avg_consommation/__init__.py25
-rw-r--r--addons/stock_avg_consommation/__openerp__.py35
-rw-r--r--addons/stock_avg_consommation/stock_avg_consommation.py100
-rw-r--r--addons/stock_avg_consommation/stock_avg_consommation_view.xml18
-rw-r--r--addons/stock_avg_consommation/wizard/__init__.py24
-rw-r--r--addons/stock_avg_consommation/wizard/stock_avg_consommation_wizard.py57
-rw-r--r--addons/stock_location/mrp_pull.py4
-rw-r--r--addons/stock_location/stock.py9
111 files changed, 5477 insertions, 517 deletions
diff --git a/addons/account/i18n/it.po b/addons/account/i18n/it.po
index 4a6d2d3a2b8..499700a8777 100644
--- a/addons/account/i18n/it.po
+++ b/addons/account/i18n/it.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-06-04 16:42+0000\n"
+"PO-Revision-Date: 2010-06-15 07:00+0000\n"
"Last-Translator: eLBati - albatos.com <lorenzo.battistini@albatos.com>\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-06-11 03:42+0000\n"
+"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -1176,7 +1176,7 @@ msgstr ""
#. module: account
#: field:account.payment.term,line_ids:0
msgid "Terms"
-msgstr "Periodi"
+msgstr "Condizioni"
#. module: account
#: rml:account.vat.declaration:0
diff --git a/addons/account/report/__init__.py b/addons/account/report/__init__.py
index 482b9b62280..ad965e04b57 100644
--- a/addons/account/report/__init__.py
+++ b/addons/account/report/__init__.py
@@ -30,7 +30,7 @@ import invoice
import overdue
import aged_trial_balance
import tax_report
-import account_tax_code
+#import account_tax_code
import account_balance_landscape
import compare_account_balance
import account_invoice_report
diff --git a/addons/base_contact/base_contact_view.xml b/addons/base_contact/base_contact_view.xml
index b4e7fa3e2ed..04429a94186 100644
--- a/addons/base_contact/base_contact_view.xml
+++ b/addons/base_contact/base_contact_view.xml
@@ -400,13 +400,5 @@
src_model="res.partner.address"
/>
- <menuitem icon="terp-purchase" id="base.menu_purchase_root"
- name="Procurement Management" sequence="7" />
- <menuitem id="base.menu_procurement_management_supplier"
- name="Suppliers" parent="base.menu_purchase_root" sequence="3" />
- <menuitem name="Contacts" id="menu_partner_contact_supplier_form"
- action="action_partner_contact_form"
- parent="base.menu_procurement_management_supplier" sequence="2" />
-
</data>
</openerp>
diff --git a/addons/base_module_quality/i18n/it.po b/addons/base_module_quality/i18n/it.po
index 9a4838ace97..565dd1e0f4d 100644
--- a/addons/base_module_quality/i18n/it.po
+++ b/addons/base_module_quality/i18n/it.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-04-09 18:42+0000\n"
-"Last-Translator: Nicola Pedron <Unknown>\n"
+"PO-Revision-Date: 2010-06-15 12:50+0000\n"
+"Last-Translator: Rinux <Unknown>\n"
"Language-Team: Italian <it@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-04-17 04:20+0000\n"
+"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_quality
@@ -33,7 +33,7 @@ msgstr ""
#. module: base_module_quality
#: model:ir.module.module,shortdesc:base_module_quality.module_meta_information
msgid "Base module quality"
-msgstr ""
+msgstr "Modulo base di qualità"
#. module: base_module_quality
#: field:module.quality.check,name:0
@@ -63,7 +63,7 @@ msgstr ""
#. module: base_module_quality
#: field:module.quality.detail,ponderation:0
msgid "Ponderation"
-msgstr ""
+msgstr "Ponderazione"
#. module: base_module_quality
#: help:module.quality.detail,ponderation:0
@@ -110,7 +110,7 @@ msgstr ""
#. module: base_module_quality
#: wizard_field:quality_detail_save,init,module_file:0
msgid "Save report"
-msgstr ""
+msgstr "Salva report"
#. module: base_module_quality
#: wizard_field:quality_detail_save,init,name:0
@@ -120,12 +120,12 @@ msgstr ""
#. module: base_module_quality
#: field:module.quality.detail,score:0
msgid "Score (%)"
-msgstr ""
+msgstr "Punteggio (%)"
#. module: base_module_quality
#: help:quality_detail_save,init,name:0
msgid "Save report as .html format"
-msgstr ""
+msgstr "Salva report come formato .html"
#. module: base_module_quality
#: view:module.quality.detail:0
@@ -146,12 +146,12 @@ msgstr ""
#. module: base_module_quality
#: view:module.quality.detail:0
msgid "Save Report"
-msgstr ""
+msgstr "Salva report"
#. module: base_module_quality
#: model:ir.actions.wizard,name:base_module_quality.create_quality_check_id
msgid "Quality Check"
-msgstr ""
+msgstr "Controllo di qualità"
#. module: base_module_quality
#: model:ir.model,name:base_module_quality.model_module_quality_detail
@@ -182,4 +182,4 @@ msgstr ""
#. module: base_module_quality
#: field:module.quality.detail,quality_check_id:0
msgid "Quality"
-msgstr ""
+msgstr "Qualità"
diff --git a/addons/base_setup/base_setup_installer.xml b/addons/base_setup/base_setup_installer.xml
index cbe4c9d24a2..46c4dbc6e0b 100644
--- a/addons/base_setup/base_setup_installer.xml
+++ b/addons/base_setup/base_setup_installer.xml
@@ -36,6 +36,7 @@ If you don't think you need any of these right now, you can easily install them
<field name="profile_association" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
<field name="profile_auction" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
<field name="profile_bookstore" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
+ <field name="product_expiry" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
</group>
</data>
</field>
diff --git a/addons/base_setup/installer.py b/addons/base_setup/installer.py
index b7123b1ba38..0ab47197d66 100644
--- a/addons/base_setup/installer.py
+++ b/addons/base_setup/installer.py
@@ -75,6 +75,9 @@ class base_setup_installer(osv.osv_memory):
"OpenERP's report creation."),
'thunderbird' :fields.boolean('Thunderbird'),
# Vertical modules
+ 'product_expiry':fields.boolean('Food Industry',
+ help="Installs a preselected set of OpenERP "
+ "applications which will help you manage foods."),
'profile_association':fields.boolean('Associations',
help="Installs a preselected set of OpenERP "
"applications which will help you manage your association "
diff --git a/addons/board/i18n/nl_BE.po b/addons/board/i18n/nl_BE.po
index a16b538056f..2754b34b4bd 100644
--- a/addons/board/i18n/nl_BE.po
+++ b/addons/board/i18n/nl_BE.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-04-24 15:45+0000\n"
-"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
+"PO-Revision-Date: 2010-06-15 14:17+0000\n"
+"Last-Translator: Niels Huylebroeck <Unknown>\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-04-17 04:15+0000\n"
+"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board
@@ -26,50 +26,50 @@ msgstr ""
#. module: board
#: model:ir.model,name:board.model_board_board
msgid "board.board"
-msgstr ""
+msgstr "board.board"
#. module: board
#: field:board.note,user_id:0
msgid "Author"
-msgstr ""
+msgstr "Auteur"
#. module: board
#: model:ir.module.module,shortdesc:board.module_meta_information
msgid "Dashboard main module"
-msgstr ""
+msgstr "Algemene dashboard module"
#. module: board
#: view:board.note:0
#: field:board.note,note:0
msgid "Note"
-msgstr ""
+msgstr "Notitie"
#. module: board
#: field:board.board.line,width:0
msgid "Width"
-msgstr ""
+msgstr "Breedte"
#. module: board
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Ongeldige modelnaam in de actie-definitie."
#. module: board
#: field:board.board.line,name:0
msgid "Title"
-msgstr ""
+msgstr "Titel"
#. module: board
#: model:ir.actions.act_window,name:board.action_view_board_list_form
#: model:ir.ui.menu,name:board.menu_view_board_form
msgid "Dashboard Definition"
-msgstr ""
+msgstr "Dashboard definitie"
#. module: board
#: model:ir.actions.act_window,name:board.action_view_board_note_form
#: model:ir.ui.menu,name:board.menu_view_board_note_form
msgid "Publish a note"
-msgstr ""
+msgstr "Publiceer een opmerking"
#. module: board
#: wizard_view:board.board.menu.create,init:0
diff --git a/addons/board_purchase/board_purchase_view.xml b/addons/board_purchase/board_purchase_view.xml
index 8e08ee7134d..c5ee7b885bc 100644
--- a/addons/board_purchase/board_purchase_view.xml
+++ b/addons/board_purchase/board_purchase_view.xml
@@ -14,7 +14,7 @@
<field name="res_model">purchase.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
- <field name="domain">[('date_order','&gt;',time.strftime('%Y-01-01 00:00:00')),('date_order','&lt;',time.strftime('%Y-12-31 23:59:59')), ('state','=','draft')]</field>
+ <field name="domain">[('date_order','&gt;',time.strftime('%Y-01-01 00:00:00')),('date_order','&lt;',time.strftime('%Y-12-31 23:59:59')), ('state','=','draft')]</field>
<field name="search_view_id" ref="purchase.purchase_order_tree"/>
</record>
<record id="purchase_waiting" model="ir.actions.act_window">
@@ -23,7 +23,7 @@
<field name="res_model">purchase.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
- <field name="domain">[('date_order','&gt;',time.strftime('%Y-01-01 00:00:00')),('date_order','&lt;',time.strftime('%Y-12-31 23:59:59')), ('state','in',('wait','confirmed'))]</field>
+ <field name="domain">[('date_order','&gt;',time.strftime('%Y-01-01 00:00:00')),('date_order','&lt;',time.strftime('%Y-12-31 23:59:59')), ('state','in',('wait','confirmed'))]</field>
<field name="search_view_id" ref="purchase.purchase_order_tree"/>
</record>
@@ -39,8 +39,8 @@
<action colspan="4" height="220" name="%(purchase_waiting)d" string="Purchase Order in Waiting" width="510"/>
</child1>
<child2>
- <action colspan="4" height="220" name="%(purchase.action_purchase_order_qty_amount_all)d" string="Total Qty and Amount by month" />
- <action colspan="4" height="220" name="%(purchase.action_purchase_order_by_user_all)d" string="Total Orders by User per month" />
+ <action colspan="4" height="220" name="%(purchase.action_purchase_order_report_graph)d" string="Total Qty and Amount by month" />
+ <action colspan="4" height="220" name="%(purchase.action_purchase_order_by_user_all)d" string="Total Orders Lines by User per month" />
</child2>
</hpaned>
</form>
diff --git a/addons/claim_from_delivery/__init__.py b/addons/claim_from_delivery/__init__.py
index 6f95fbf0fbc..b10828031a8 100644
--- a/addons/claim_from_delivery/__init__.py
+++ b/addons/claim_from_delivery/__init__.py
@@ -17,6 +17,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
-
+import claim_delivery
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/claim_from_delivery/claim_delivery.py b/addons/claim_from_delivery/claim_delivery.py
new file mode 100644
index 00000000000..4e81a0a3067
--- /dev/null
+++ b/addons/claim_from_delivery/claim_delivery.py
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import fields, osv
+
+class stock_picking(osv.osv):
+ _inherit = "stock.picking"
+ _columns = {
+ 'partner_id': fields.related('address_id','partner_id',type='many2one', relation="res.partner", string="Partner"),
+ }
+stock_picking()
diff --git a/addons/claim_from_delivery/claim_delivery_view.xml b/addons/claim_from_delivery/claim_delivery_view.xml
index a1c8be870e2..7fb68cc6348 100644
--- a/addons/claim_from_delivery/claim_delivery_view.xml
+++ b/addons/claim_from_delivery/claim_delivery_view.xml
@@ -1,12 +1,32 @@
<openerp>
<data>
-
+
+ <record id="view_picking_delivery" model="ir.ui.view">
+ <field name="name">stock.picking.delivery.form20</field>
+ <field name="model">stock.picking</field>
+ <field name="type">form</field>
+ <field name="priority" eval="2"/>
+ <field name="inherit_id" ref="stock.view_picking_delivery_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="//form/group/field[@name='date']" position="after">
+ <field name="partner_id" invisible="1"/>
+ </xpath>
+ </field>
+ </record>
+
<act_window
- id="act_claim_from_delivery"
+ id="action_claim_from_delivery"
name="Claim"
+ domain="[]"
target="current"
view_mode="form"
res_model="crm.claim"
src_model="stock.picking"/>
+
+
+ <record id="action_claim_from_delivery" model="ir.actions.act_window">
+ <field name="context">{'default_partner_address_id': address_id, 'default_partner_id': partner_id}</field>
+ </record>
+
</data>
</openerp>
diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py
index d9a7a2b34c0..e8a14df42a8 100644
--- a/addons/crm_claim/crm_claim.py
+++ b/addons/crm_claim/crm_claim.py
@@ -74,7 +74,8 @@ class crm_claim(osv.osv, crm.crm_case):
'company_id': fields.many2one('res.company', 'Company'),
'partner_id': fields.many2one('res.partner', 'Partner'),
'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', \
- domain="[('partner_id','=',partner_id)]"),
+ # domain="[('partner_id','=',partner_id)]"
+ ),
'email_cc': fields.text('Watchers Emails', size=252, help="These people will receive a copy of the future communication between partner and users by email"),
'email_from': fields.char('Email', size=128, help="These people will receive email."),
'partner_name': fields.char("Employee's Name", size=64),
diff --git a/addons/crm_claim/crm_claim_view.xml b/addons/crm_claim/crm_claim_view.xml
index 61cf7c6368d..b25009c2339 100644
--- a/addons/crm_claim/crm_claim_view.xml
+++ b/addons/crm_claim/crm_claim_view.xml
@@ -92,11 +92,18 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Claims">
- <group colspan="4" col="4">
- <field name="name"/>
- <field name="date" string="Date of Claim"/>
- <field name="date_deadline" string="Deadline"/>
+
+ <group colspan="4" col="4">
+ <group colspan="1" col="2">
+ <field name="name" />
+ </group>
+ <group colspan="1" col="2">
+ <field name="date" string="Date of Claim"/>
+ </group>
+ <group colspan="1" col="2">
+ <field name="date_deadline" string="Deadline"/><newline/>
</group>
+ </group>
<group colspan="4" col="4">
<notebook>
@@ -295,5 +302,22 @@
</field>
</record>
+ <act_window
+ domain="[('partner_id', '=', active_id)]"
+ context="{'default_partner_id': active_id}"
+ id="act_claim_partner"
+ name="Report a Claim"
+ res_model="crm.claim"
+ src_model="res.partner"/>
+
+
+ <act_window
+ domain="[('partner_address_id', '=', active_id)]"
+ context="{'default_partner_address_id': active_id}"
+ id="act_claim_partner_address"
+ name="Report a Claim"
+ res_model="crm.claim"
+ src_model="res.partner.address"/>
+
</data>
</openerp>
diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml
index e367148213d..cc5ce326204 100644
--- a/addons/delivery/delivery_view.xml
+++ b/addons/delivery/delivery_view.xml
@@ -273,7 +273,7 @@
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page[@string='Sale Order']/group[1]/button[@name='button_dummy']" position="after">
- <button name="%(action_delivery_cost)d" states="draft" string="Delivery Costs" type="action" icon="gtk-execute" context="{'order_id':id}"/>
+ <button name="%(action_delivery_cost)d" states="draft" string="Delivery Costs" type="action" icon="gtk-add" context="{'order_id':id}"/>
</xpath>
</field>
</record>
diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py
index 2d34a095ff5..37b38774a7d 100644
--- a/addons/email_template/email_template.py
+++ b/addons/email_template/email_template.py
@@ -633,6 +633,18 @@ class email_template_preview(osv.osv_memory):
_name = "email_template.preview"
_description = "Email Template Preview"
+ def _get_model_recs(self, cr, uid, context=None):
+ if context is None:
+ context = {}
+ #Fills up the selection box which allows records from the selected object to be displayed
+ self.context = context
+ if 'template_id' in context.keys():
+ ref_obj_id = self.pool.get('email.template').read(cr, uid, context['template_id'], ['object_name'], context)
+ ref_obj_name = self.pool.get('ir.model').read(cr, uid, ref_obj_id['object_name'][0], ['model'], context)['model']
+ ref_obj_ids = self.pool.get(ref_obj_name).search(cr, uid, [], context=context)
+ ref_obj_recs = self.pool.get(ref_obj_name).name_get(cr, uid, ref_obj_ids, context)
+ return ref_obj_recs
+
def _default_model(self, cursor, user, context=None):
"""
Returns the default value for model field
@@ -643,7 +655,7 @@ class email_template_preview(osv.osv_memory):
return self.pool.get('email.template').read(
cursor,
user,
- context['active_id'],
+ context['template_id'],
['object_name'],
context)['object_name']
@@ -652,6 +664,7 @@ class email_template_preview(osv.osv_memory):
'email.template',
'Template', readonly=True),
'rel_model':fields.many2one('ir.model', 'Model', readonly=True),
+ 'rel_model_ref':fields.selection(_get_model_recs, 'Referred Document'),
'to':fields.char('To', size=250, readonly=True),
'cc':fields.char('CC', size=250, readonly=True),
'bcc':fields.char('BCC', size=250, readonly=True),
@@ -661,10 +674,9 @@ class email_template_preview(osv.osv_memory):
'report':fields.char('Report Name', size=100, readonly=True),
}
_defaults = {
- 'ref_template': lambda self, cr, uid, ctx:ctx['active_id'],
+ 'ref_template': lambda self, cr, uid, ctx:ctx['template_id'],
'rel_model': _default_model
}
- # Need to check
def on_change_ref(self, cr, uid, ids, rel_model_ref, context=None):
if context is None:
context = {}
@@ -673,13 +685,13 @@ class email_template_preview(osv.osv_memory):
vals = {}
if context == {}:
context = self.context
- template = self.pool.get('email.template').browse(cr, uid, context['active_id'], context)
+ template = self.pool.get('email.template').browse(cr, uid, context['template_id'], context)
#Search translated template
lang = get_value(cr, uid, rel_model_ref, template.lang, template, context)
if lang:
ctx = context.copy()
ctx.update({'lang':lang})
- template = self.pool.get('email.template').browse(cr, uid, context['active_id'], ctx)
+ template = self.pool.get('email.template').browse(cr, uid, context['template_id'], ctx)
vals['to'] = get_value(cr, uid, rel_model_ref, template.def_to, template, context)
vals['cc'] = get_value(cr, uid, rel_model_ref, template.def_cc, template, context)
vals['bcc'] = get_value(cr, uid, rel_model_ref, template.def_bcc, template, context)
diff --git a/addons/email_template/email_template_view.xml b/addons/email_template/email_template_view.xml
index 49090bd62c5..934a7324b07 100644
--- a/addons/email_template/email_template_view.xml
+++ b/addons/email_template/email_template_view.xml
@@ -20,19 +20,17 @@
<newline />
<field name="subject" />
<newline />
- <field name="body_text" />
- <newline />
- <!-- <field name="body_html" widget="text_html" />-->
- <!--
- Removed text_html because it doesnt work in GTK
- And TinyMCE messes up the HTML in Web Client
- -->
- <field name="body_html"/>
+ <separator string= "Body(Text)" colspan="2"/>
+ <newline/>
+ <field name="body_text" nolabel="1" colspan="2"/>
+ <newline/>
+ <separator string= "Body(Html)" colspan="2"/>
+ <newline/>
+ <field name="body_html" nolabel="1" colspan="2"/>
<newline />
<field name="report" />
- <group>
- <button icon="gtk-ok" special="cancel" string="OK" />
- </group>
+ <newline/>
+ <button icon="gtk-ok" special="cancel" string="OK" colspan="2"/>
</form>
</field>
</record>
@@ -46,7 +44,7 @@
<field name="view_mode">form</field>
<field name="auto_refresh" eval="1" />
<field name="target">new</field>
- <field name="context">{'ids':active_id}</field>
+ <field name="context">{'template_id':active_id}</field>
</record>
<!--EMail client Form view -->
diff --git a/addons/google_map/i18n/ru.po b/addons/google_map/i18n/ru.po
index 6e3e44985e5..c4f6acceef1 100644
--- a/addons/google_map/i18n/ru.po
+++ b/addons/google_map/i18n/ru.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-06-14 03:42+0000\n"
+"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: google_map
diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py
index 36754bea803..4ed49a7c954 100644
--- a/addons/marketing_campaign/marketing_campaign.py
+++ b/addons/marketing_campaign/marketing_campaign.py
@@ -27,6 +27,7 @@ from dateutil.relativedelta import relativedelta
from osv import fields, osv
import netsvc
import tools
+from tools.translate import _
_intervalTypes = {
'hours': lambda interval: relativedelta(hours=interval),
@@ -207,10 +208,7 @@ class marketing_campaign_activity(osv.osv):
'start': fields.boolean('Start',help= "This activity is launched when the campaign starts."),
'condition': fields.char('Condition', size=256, required=True,
help="Python condition to know if the activity can be launched"),
- 'type': fields.selection([('email', 'E-mail'),
- ('paper', 'Paper'),
- ('action', 'Action'),
- ('subcampaign', 'Sub-Campaign')],
+ 'type': fields.selection(_actions_type,
'Type', required=True,
help="Describe type of action to be performed on the Activity.Eg : Send email,Send paper.."),
'email_template_id': fields.many2one('email.template','Email Template'),
@@ -278,41 +276,6 @@ class marketing_campaign_activity(osv.osv):
print 'Sending Email Init', activity.name
return self.pool.get('email.template').generate_mail(cr, uid, activity.email_template_id.id, [workitem.res_id], context=context)
- #if not template.enforce_from_account:
- # self.pool.get('marketing.campaign.workitem').write(cr, uid, [workitem.id], {
- # 'error_msg': 'There is no account defined for the email',
- # 'state': 'exception'
- # })
- # return False
- #if not workitem.partner_id.email:
- # self.pool.get('marketing.campaign.workitem').write(cr, uid, [workitem.id], {
- # 'error_msg': "There is no email defined for the partner",
- # 'state': 'exception'
- # })
- # return False
- #vals = {
- # 'email_from': tools.ustr(accounts.name) + "<" + tools.ustr(accounts.email_id) + ">",
- # 'email_to': template.email_to,
- # 'email_cc': template.email_cc,
- # 'email_bcc': template.email_bcc,
- # 'subject': template.def_subject,
- # 'body_text': template.def_body_text,
- # 'body_html': template.def_body_html,
- # 'account_id': accounts.id,
- # 'state':'na',
- # 'mail_type':'multipart/alternative' #Options:'multipart/mixed','multipart/alternative','text/plain','text/html'
- #}
-# # if accounts.use_sign:
-# # signature = self.pool.get('res.users').read(cr, uid, uid, ['signature'], context)['signature']
-# # if signature:
-# # vals['pem_body_text'] = tools.ustr(vals['pem_body_text'] or '') + signature
-# # vals['pem_body_html'] = tools.ustr(vals['pem_body_html'] or '') + signature
-
- ##Create partly the mail and later update attachments
- #print 'Sending Email', vals
- #mail_id = self.pool.get('email_template.mailbox').create(cr, uid, vals, context)
- return True
-
def process_wi_action(self, cr, uid, activity, workitem, context={}):
context = {}
server_obj = self.pool.get('ir.actions.server')
@@ -446,7 +409,10 @@ class marketing_campaign_workitem(osv.osv):
self.write(cr, uid, wi.id, {'state': 'done'})
self.process_chain(cr, uid, wi.id, context)
else:
- self.write(cr, uid, wi.id, {'state': 'exception'})
+ vals = {'state': 'exception'}
+ if type(result) == type({}) and 'error_msg' in result:
+ vals['error_msg'] = result['error_msg']
+ self.write(cr, uid, wi.id, vals)
except Exception,e:
self.write(cr, uid, wi.id, {'state': 'exception', 'error_msg': str(e)})
else :
@@ -470,6 +436,42 @@ class marketing_campaign_workitem(osv.osv):
if workitem_ids:
self.process(cr, uid, workitem_ids, context)
+ def preview(self, cr, uid, ids, context):
+ res = {}
+ wi_obj = self.browse(cr, uid, ids)[0]
+ if wi_obj.activity_id.type == 'email':
+ data_obj = self.pool.get('ir.model.data')
+ data_id = data_obj._get_id(cr, uid, 'email_template', 'email_template_preview_form')
+ if data_id:
+ view_id = data_obj.browse(cr, uid, data_id, context=context).res_id
+ res = {
+ 'name': _('Email Preview'),
+ 'view_type': 'form',
+ 'view_mode': 'form,tree',
+ 'res_model': 'email_template.preview',
+ 'view_id': False,
+ 'context': context,
+ 'views': [(view_id, 'form')],
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
+ 'nodestroy':True,
+ 'context': "{'template_id':%d,'rel_model_ref':%d}"%
+ (wi_obj.activity_id.email_template_id.id,
+ wi_obj.res_id)
+
+ }
+
+ elif wi_obj.activity_id.type == 'paper':
+ datas = {'ids': [wi_obj.res_id],
+ 'model': wi_obj.object_id.model}
+ res = {
+ 'type' : 'ir.actions.report.xml',
+ 'report_name': wi_obj.activity_id.report_id.report_name,
+ 'datas' : datas,
+ 'nodestroy': True,
+ }
+ return res
+
marketing_campaign_workitem()
class email_template(osv.osv):
@@ -478,6 +480,21 @@ class email_template(osv.osv):
'object_name': lambda obj, cr, uid, context: context.get('object_id',False),
}
email_template()
+
+class email_template_preview(osv.osv_memory):
+ _inherit = "email_template.preview"
+
+ def _default_rel_model(self, cr, uid, context=None):
+ if 'rel_model_ref' in context :
+ return context['rel_model_ref']
+ else :
+ return False
+
+ _defaults = {
+ 'rel_model_ref' : _default_rel_model
+ }
+
+email_template_preview()
class report_xml(osv.osv):
_inherit = 'ir.actions.report.xml'
diff --git a/addons/marketing_campaign/marketing_campaign_view.xml b/addons/marketing_campaign/marketing_campaign_view.xml
index 0ab2add38ba..f8dfc003369 100644
--- a/addons/marketing_campaign/marketing_campaign_view.xml
+++ b/addons/marketing_campaign/marketing_campaign_view.xml
@@ -289,7 +289,7 @@
<field name="email_template_id" attrs="{'required':[('type','=','email')]}" />
</group>
<group colspan="4" attrs="{'invisible':[('type','!=','paper')]}" >
- <field name="report_id" attrs="{'required':[('type','=','paper')]}"/>
+ <field name="report_id" attrs="{'required':[('type','=','paper')]}" context="{'object_id':object_id}"/>
<field name="report_directory_id" attrs="{'required':[('type','=','paper')]}" />
</group>
<group colspan="4" attrs="{'invisible':[('type','!=','action')]}" >
diff --git a/addons/marketing_campaign_mailchimp/__init__.py b/addons/marketing_campaign_mailchimp/__init__.py
index 0f354314327..808e5fc281f 100644
--- a/addons/marketing_campaign_mailchimp/__init__.py
+++ b/addons/marketing_campaign_mailchimp/__init__.py
@@ -20,5 +20,5 @@
##############################################################################
import marketing_campaign_mailchimp
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file
+import wizard
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/marketing_campaign_mailchimp/__openerp__.py b/addons/marketing_campaign_mailchimp/__openerp__.py
index bd614607b97..2a913eaa8da 100644
--- a/addons/marketing_campaign_mailchimp/__openerp__.py
+++ b/addons/marketing_campaign_mailchimp/__openerp__.py
@@ -32,6 +32,7 @@
'init_xml': [],
'update_xml': [
'marketing_campaign_mailchimp_view.xml',
+ 'wizard/create_list_view.xml',
],
'demo_xml': [],
'installable': True,
diff --git a/addons/marketing_campaign_mailchimp/marketing_campaign_mailchimp.py b/addons/marketing_campaign_mailchimp/marketing_campaign_mailchimp.py
index a1c3162cee2..f3d8386623e 100644
--- a/addons/marketing_campaign_mailchimp/marketing_campaign_mailchimp.py
+++ b/addons/marketing_campaign_mailchimp/marketing_campaign_mailchimp.py
@@ -18,16 +18,19 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
-
-from osv import fields, osv
-
+import urllib
import urllib2
import simplejson as json
+import time
+from datetime import datetime
+
+from osv import fields, osv
+from marketing_campaign.marketing_campaign import _intervalTypes
mailchimp_url = 'http://%s.api.mailchimp.com/1.2'
-class marketing_campaign_mailchimp_account(osv.osv): #{{{
- _name = "marketing.campaign.mailchimp.account"
+class mailchimp_account(osv.osv):
+ _name = "mailchimp.account"
_columns = {
'name': fields.char('Account Name', size=64),
@@ -52,12 +55,10 @@ class marketing_campaign_mailchimp_account(osv.osv): #{{{
params['password'] = mailchimp_account.password
else :
params['apikey'] = mailchimp_account.apikey
- params = '&'.join(map(lambda x : '%s=%s' %(x, params[x]), params))
url = mailchimp_url%mailchimp_account.data_center+ '/?method=%s'%method
- req = urllib2.Request(url, params)
- handle = urllib2.urlopen(req)
- response = json.loads(handle.read())
- return response
+ params = urllib.urlencode(params, doseq=True)
+ response = urllib2.urlopen(url, params)
+ return json.loads(response.read())
def button_approve(self, cr, uid, ids, context):
acc_obj = self.browse(cr, uid, ids)[0]
@@ -80,33 +81,57 @@ class marketing_campaign_mailchimp_account(osv.osv): #{{{
def button_cancel(self, cr, uid, ids, context):
self.write(cr, uid, ids, {'state': 'cancelled'})
return True
-
-marketing_campaign_mailchimp_account() #}}}
+
+ def add_partner_list(self, cr, uid, account_id, list_id, partner_ids):
+ vals = {} # just dictionary with partner_id and updated in list or not
+ for partner in self.pool.get('res.partner').browse(cr, uid, partner_ids):
+ params = {'id' : list_id,
+ 'email_address' : partner.email,
+ 'email_type':'text',
+ 'merge_vars[FNAME]':partner.name ,
+ 'merge_vars[date]' : time.strftime('%Y-%m-%d'),
+ 'merge_vars[phone]' : partner.phone,
+ 'merge_vars[website]' : partner.website,
+ 'merge_vars[address][country]' : partner.country.code,
+ 'merge_vars[address][city]' : partner.city,
+ 'double_optin':False}
+ vals[partner.id] = self.get_response(cr, uid, account_id,
+ 'listSubscribe', params)
+ return vals
+
+mailchimp_account()
+
+class mailchimp_list(osv.osv_memory):
+ _name = "mailchimp.list"
+ _description = "Mailchimp list"
+
+ _columns = {
+ 'mailchimp_account_id': fields.many2one('mailchimp.account',
+ 'Mailchimp Account', required=True),
+ 'name': fields.char('Name', size=64)
+ }
+
+mailchimp_list()
-#class marketing_campaign_mailchimp_list(osv.osv_memory): #{{{
-# _name = "marketing.campaign.mailchimp.list"
-#
-# _columns = {
-# 'name': fields.char('Name', size=64),
-# 'mailchimp_account_id': fields.many2one('marketing.campaign.mailchimp.account', 'Account'),
-# 'list_id': fields.char('List Id', size=64,),
-# }
-#
-# _defaults = {
-# 'state': lambda *a: 'draft'
-# }
-#
-#marketing_campaign_mailchimp_list() #}}}
+class marketing_campaign(osv.osv):
+ _inherit = "marketing.campaign"
-class marketing_campaign_segment(osv.osv): #{{{
- _inherit = "marketing.campaign.segment"
+ _columns = {
+ 'mailchimp_account_id': fields.many2one(
+ 'mailchimp.account', 'Account'),
+ 'mailchimp_campaign': fields.char('campaign', size=64),
+ }
+marketing_campaign()
+
+class marketing_campaign_activity(osv.osv):
+ _inherit = "marketing.campaign.activity"
+
_columns = {
- 'synchro': fields.boolean('Mailchimp Synchro'),
'mailchimp_account_id': fields.many2one(
- 'marketing.campaign.mailchimp.account', 'Account'),
+ 'mailchimp.account', 'Account'),
'mailchimp_list': fields.char('List', size=64),
- }
+ }
def onchange_mailchimp(self, cr, uid, ids, mailchimp_account_id):
if mailchimp_account_id:
@@ -116,16 +141,70 @@ class marketing_campaign_segment(osv.osv): #{{{
def onchange_mailchimp_list(self, cr, uid, ids, mailchimp_account_id,
mailchimp_list):
if mailchimp_account_id and mailchimp_list:
- lists = self.pool.get('marketing.campaign.mailchimp.account').get_response(cr,
+ lists = self.pool.get('mailchimp.account').get_response(cr,
uid, mailchimp_account_id, 'lists')
- list_names = [list['name'] for list in lists]
+ list_names = [l['name'] for l in lists]
if mailchimp_list not in list_names:
raise osv.except_osv('Error!!!',"Lists doesn't exists")
else :
return {}
return {'value':{}}
-marketing_campaign_segment() #}}}
-
+ def process_wi_mailchimp(self, cr, uid, activity, workitem, context={}):
+ mailchimp_account_id = activity.mailchimp_account_id.id
+ list_name = activity.mailchimp_list
+ mc_acc_obj = self.pool.get('mailchimp.account')
+ lists = mc_acc_obj.get_response(cr, uid, mailchimp_account_id, 'lists')
+ list_id = ''
+ for l in lists :
+ if l['name'] == list_name:
+ list_id = l['id']
+ break;
+ res_model = workitem.object_id.model
+ res_id = workitem.res_id
+ model_obj = self.pool.get(res_model).browse(cr, uid, res_id)
+ params ={}
+ if res_model == 'res.partner' :
+ params.update({'email_address' : model_obj.email,
+ 'merge_vars[FNAME]':model_obj.name and model_obj.name or '',
+ 'merge_vars[website]' : model_obj.website,
+ 'merge_vars[address][country]' : model_obj.country.code,
+ })
+ elif res_model == 'crm.lead' :
+ params.update({'email_address' : model_obj.email_from,
+ 'merge_vars[FNAME]':model_obj.partner_name and \
+ model_obj.partner_name or '',
+ 'merge_vars[address][country]' : model_obj.country_id and \
+ model_obj.country_id.code or ''
+ })
+ if params['email_address'] :
+ user = mc_acc_obj.get_response(cr, uid, mailchimp_account_id,
+ 'listMemberInfo',
+ {'id' : list_id,
+ 'email_address': params['email_address']})
+ # if there s no user with the specify email it will return error code
+ # and thus we add that user otherwise user is alredy subscribe and there
+ # is no need to subscribe user again
+ if 'error' in user:
+ params.update({'id' : list_id,
+ 'email_type':'text',
+ 'double_optin':False,
+ 'merge_vars[date]' : time.strftime('%Y-%m-%d'),
+ 'merge_vars[address][city]' : model_obj.city and model_obj.city or '',
+ 'merge_vars[phone]' : model_obj.phone and model_obj.phone or '',
+ })
+ res = mc_acc_obj.get_response(cr, uid, mailchimp_account_id, 'listSubscribe', params)
+ # handle mailchimp error
+ return True
+ else :
+ return {'error_msg' : "Invalid Email Address"}
+
+ def __init__(self, *args):
+ res = super(marketing_campaign_activity, self).__init__(*args)
+ self._actions.update({'mailchimp' : self.process_wi_mailchimp})
+ self._actions_type.append(('mailchimp', 'Mailchimp'))
+ return res
+
+marketing_campaign_activity()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/marketing_campaign_mailchimp/marketing_campaign_mailchimp_view.xml b/addons/marketing_campaign_mailchimp/marketing_campaign_mailchimp_view.xml
index 7a84f17311d..f2151d8d820 100644
--- a/addons/marketing_campaign_mailchimp/marketing_campaign_mailchimp_view.xml
+++ b/addons/marketing_campaign_mailchimp/marketing_campaign_mailchimp_view.xml
@@ -4,23 +4,38 @@
<!--
================================================================
- Marketing Segments Inherited View - mailchimp
+ Marketing Activity Inherited View - mailchimp
================================================================
-->
- <record model="ir.ui.view" id="view_marketing_campaign_segment_form_inherit">
- <field name="name">marketing.campaign.segment.form.inherit</field>
- <field name="model">marketing.campaign.segment</field>
+ <record model="ir.ui.view" id="view_marketing_campaign_activity_form_inherit">
+ <field name="name">marketing.campaign.activity.form.inherit</field>
+ <field name="model">marketing.campaign.activity</field>
<field name="type">form</field>
- <field name="inherit_id" ref="marketing_campaign.view_marketing_campaign_segment_form"/>
+ <field name="inherit_id" ref="marketing_campaign.view_marketing_campaign_activity_form"/>
<field name="arch" type="xml">
- <field name="date_done" position="after">
- <separator string="Mailchimp Synchronization" colspan="4"/>
- <field name="synchro"/>
- <group colspan="2" attrs="{'invisible':[('synchro','!=',True)]}">
- <field name="mailchimp_account_id" attrs="{'required':[('synchro','=',True)]}" domain="[('state','=','approved')]" on_change="onchange_mailchimp(mailchimp_account_id)"/>
- <field name="mailchimp_list" attrs="{'required':[('synchro','=',True)]}" on_change="onchange_mailchimp_list(mailchimp_account_id,mailchimp_list)"/>
- </group>
+ <field name="type" position="after">
+ <group colspan="2" ><!--attrs="{'invisible':[('type','!=','mailchimp')]}"-->
+ <field name="mailchimp_account_id" attrs="{'required':[('type','=','mailchimp')]}" domain="[('state','=','approved')]" on_change="onchange_mailchimp(mailchimp_account_id)"/>
+ <field name="mailchimp_list" attrs="{'required':[('type','=','mailchimp')]}" on_change="onchange_mailchimp_list(mailchimp_account_id,mailchimp_list)"/>
+ </group>
+ </field>
+ </field>
+ </record>
+
+
+
+ <record model="ir.ui.view" id="view_marketing_campaign_form_inherit">
+ <field name="name">marketing.campaign.form.inherit</field>
+ <field name="model">marketing.campaign</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="marketing_campaign.view_marketing_campaign_form"/>
+ <field name="arch" type="xml">
+ <field name="type" position="after">
+ <group colspan="2" attrs="{'invisible':[('type','!=','mailchimp')]}">
+ <field name="mailchimp_account_id" attrs="{'required':[('type','=','mailchimp')]}" domain="[('state','=','approved')]" on_change="onchange_mailchimp(mailchimp_account_id)"/>
+ <field name="mailchimp_list" attrs="{'required':[('type','=','mailchimp')]}" on_change="onchange_mailchimp_list(mailchimp_account_id,mailchimp_list)"/>
+ </group>
</field>
</field>
</record>
@@ -35,9 +50,9 @@
<menuitem name="Tools" id="base.menu_tools" icon="STOCK_PREFERENCES" sequence="15"/>
<menuitem name="Mailchimps" id="menu_action_mailchimp" parent="base.menu_tools" />
- <record model="ir.ui.view" id="view_marketing_campaign_mailchimp_account_tree">
- <field name="name">marketing.campaign.mailchimp.account.tree</field>
- <field name="model">marketing.campaign.mailchimp.account</field>
+ <record model="ir.ui.view" id="view_mailchimp_account_tree">
+ <field name="name">mailchimp.account.tree</field>
+ <field name="model">mailchimp.account</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="All Accounts">
@@ -49,9 +64,9 @@
</field>
</record>
- <record model="ir.ui.view" id="view_marketing_campaign_mailchimp_account_form">
- <field name="name">marketing.campaign.mailchimp.account.form</field>
- <field name="model">marketing.campaign.mailchimp.account</field>
+ <record model="ir.ui.view" id="view_mailchimp_account_form">
+ <field name="name">mailchimp.account.form</field>
+ <field name="model">mailchimp.account</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account">
@@ -71,16 +86,16 @@
</field>
</record>
- <record model="ir.actions.act_window" id="action_marketing_campaign_mailchimp_account">
+ <record model="ir.actions.act_window" id="action_mailchimp_account">
<field name="name">All Mailchimp Accounts</field>
<field name="type">ir.actions.act_window</field>
- <field name="res_model">marketing.campaign.mailchimp.account</field>
+ <field name="res_model">mailchimp.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
- <field name="view_id" ref="view_marketing_campaign_mailchimp_account_tree"/>
+ <field name="view_id" ref="view_mailchimp_account_tree"/>
</record>
- <menuitem id="menu_action_marketing_campaign_mailchimp_account" parent="menu_action_mailchimp" action="action_marketing_campaign_mailchimp_account" sequence="40"/>
+ <menuitem id="menu_action_mailchimp_account" parent="menu_action_mailchimp" action="action_mailchimp_account" sequence="40"/>
</data>
</openerp>
diff --git a/addons/marketing_campaign_mailchimp/wizard/__init__.py b/addons/marketing_campaign_mailchimp/wizard/__init__.py
new file mode 100755
index 00000000000..713b0c1e773
--- /dev/null
+++ b/addons/marketing_campaign_mailchimp/wizard/__init__.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import create_list
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/marketing_campaign_mailchimp/wizard/create_list.py b/addons/marketing_campaign_mailchimp/wizard/create_list.py
new file mode 100755
index 00000000000..0a490787de5
--- /dev/null
+++ b/addons/marketing_campaign_mailchimp/wizard/create_list.py
@@ -0,0 +1,64 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import fields, osv
+from tools.translate import _
+import netsvc
+
+class create_list(osv.osv_memory):
+ _name = "create.list"
+ _description = "Create List of mailchimp"
+# crm.lead remain
+ _columns = {
+ 'mailchimp_account_id': fields.many2one('mailchimp.account',
+ 'Mailchimp Account', required=True),
+ 'mailchimp_list_id': fields.many2one('mailchimp.list', 'List'),
+ 'list_name': fields.char('Name',size = 64),
+ 'partner_ids': fields.many2many('res.partner',
+ 'create_list_partner_rel',
+ 'cust_list_id', 'partner_id',
+ 'Partner'),
+
+ }
+
+ def onchange_mailchimp_account_id(self, cr, uid, ids, mailchimp_account_id,
+ action):
+ print mailchimp_account_id,action,
+ return {'value':{}}
+
+ def create_list(self, cr, uid, ids, context=None):
+ create_list_obj = self.browse(cr, uid, ids[0])
+ print create_list_obj.id
+ mailchimp_account_obj = self.pool.get('mailchimp.account')
+ account_id = create_list_obj.mailchimp_account_id
+ lists = mailchimp_account_obj.get_response(cr, uid, account_id.id, 'lists')
+ lists = dict([(l['name'],l['id']) for l in lists])
+ print lists
+ if create_list_obj.list_name not in lists.keys():
+ raise osv.except_osv(_('UserError'),
+ _('There is no list define in account %s') % (account_id.name))
+ list_id = lists[create_list_obj.list_name]
+ mailchimp_account_obj.add_partner_list(cr, uid, account_id.id, list_id,
+ create_list_obj.partner_ids)
+ return {}
+create_list()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/marketing_campaign_mailchimp/wizard/create_list_view.xml b/addons/marketing_campaign_mailchimp/wizard/create_list_view.xml
new file mode 100755
index 00000000000..f15826aeaea
--- /dev/null
+++ b/addons/marketing_campaign_mailchimp/wizard/create_list_view.xml
@@ -0,0 +1,35 @@
+<openerp>
+ <data>
+ <record id="view_create_list" model="ir.ui.view">
+ <field name="name">create.list.form</field>
+ <field name="model">create.list</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Update List">
+ <field name="mailchimp_account_id" on_change = "onchange_mailchimp_account_id(mailchimp_account_id,action)"/>
+ <field name="list_name" />
+ <newline/>
+ <separator string="Partner" colspan="4"/>
+ <field name="partner_ids" nolabel="1" colspan="4"/>
+ <!--group ">
+ <field name="mailchimp_list_id" />
+ </group-->
+ <group col="4" colspan="4">
+ <button special="cancel" string="Cancel" icon="gtk-cancel"/>
+ <button name="create_list" string="Update" type="object" icon="gtk-ok"/>
+ </group>
+ </form>
+ </field>
+ </record>
+ <record id="action_create_list" model="ir.actions.act_window">
+ <field name="name">Update List</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">create.list</field>
+ <field name="view_type">form</field>
+ <field name="view_id" ref="view_create_list"/>
+ <field name="target">new</field>
+ </record>
+ <menuitem id="menu_action_mailchimp_create_list" parent="menu_action_mailchimp" action="action_create_list" sequence="40"/>
+
+ </data>
+</openerp>
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index ec2a1d15810..bda705f46a9 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -117,9 +117,9 @@ class mrp_bom(osv.osv):
"""
Defines bills of material for a product.
"""
- _name = 'mrp.bom'
+ _name = 'mrp.bom'
_description = 'Bill of Material'
-
+
def _child_compute(self, cr, uid, ids, name, arg, context={}):
""" Gets child bom.
@param self: The object pointer
@@ -140,14 +140,14 @@ class mrp_bom(osv.osv):
bom_id = ids[0]
bom_parent = bom_obj.browse(cr, uid, bom_id)
for bom in self.browse(cr, uid, ids, context=context):
- if (bom_parent and bom_parent.multi_level_bom) or bom.id == bom_id:
+ if (bom_parent) or (bom.id == bom_id):
result[bom.id] = map(lambda x: x.id, bom.bom_lines)
else:
result[bom.id] = []
if bom.bom_lines:
continue
ok = ((name=='child_complete_ids') and (bom.product_id.supply_method=='produce'))
- if (bom.type=='phantom' or ok) and bom_parent.multi_level_bom:
+ if (bom.type=='phantom' or ok):
sids = bom_obj.search(cr, uid, [('bom_id','=',False),('product_id','=',bom.product_id.id)])
if sids:
bom2 = bom_obj.browse(cr, uid, sids[0], context=context)
@@ -203,7 +203,6 @@ class mrp_bom(osv.osv):
'revision_type': fields.selection([('numeric','numeric indices'),('alpha','alphabetical indices')], 'Index type'),
'child_complete_ids': fields.function(_child_compute,relation='mrp.bom', method=True, string="BoM Hierarchy", type='many2many'),
'company_id': fields.many2one('res.company','Company',required=True),
- 'multi_level_bom': fields.boolean('Multi-level BoM'),
}
_defaults = {
'active': lambda *a: 1,
@@ -212,7 +211,6 @@ class mrp_bom(osv.osv):
'product_rounding': lambda *a: 1.0,
'type': lambda *a: 'normal',
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.bom', context=c),
- 'multi_level_bom': lambda *a: 0,
}
_order = "sequence"
_sql_constraints = [
@@ -247,7 +245,7 @@ class mrp_bom(osv.osv):
v['name'] = prod.name
return {'value': v}
return {}
-
+
def _bom_find(self, cr, uid, product_id, product_uom, properties=[]):
""" Finds BoM for particular product and product uom.
@param product_id: Selected product.
@@ -954,6 +952,3 @@ class mrp_production_product_line(osv.osv):
}
mrp_production_product_line()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index 936a207caa3..b3004fffb2f 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -252,21 +252,29 @@
<field name="product_qty"/>
<field name="routing_id" groups="base.group_extended"/>
<newline/>
- <field name="product_uos" groups="product.group_uos,base.group_extended" widget="selection"/>
- <field name="product_uos_qty" groups="product.group_uos,base.group_extended" />
+ <field name="product_uos" groups="product.group_uos"/>
+ <field name="product_uos_qty" groups="product.group_uos" />
<newline/>
- <field name="multi_level_bom"/>
<field name="type" groups="base.group_extended"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4" >
- <page string="Components" attrs="{'invisible': [('multi_level_bom','=',False)]}">
- <field colspan="4" name="bom_lines" nolabel="1" widget="one2many_list" />
+ <page string="Components">
+ <field colspan="4" name="bom_lines" nolabel="1" widget="one2many_list">
+ <tree string="Components" editable="bottom">
+ <field name="product_id" on_change="onchange_product_id(product_id, name)" select="1"/>
+ <field name="product_uom"/>
+ <field name="product_qty"/>
+ <field name="name" invisible="1"/>
+ <field name="date_start"/>
+ <field name="date_stop"/>
+ </tree>
+ </field>
</page>
- <page string="Revisions" groups="base.group_extended" attrs="{'invisible': [('bom_id','!=',False),('multi_level_bom','=',False)]}">
+ <page string="Revisions" groups="base.group_extended" attrs="{'invisible': [('bom_id','!=',False)]}">
<field colspan="4" name="revision_ids" nolabel="1" widget="one2many_list"/>
</page>
- <page string="Properties" groups="base.group_extended" attrs="{'invisible': [('bom_id','!=',False),('multi_level_bom','=',False)]}">
+ <page string="Properties" groups="base.group_extended">
<field name="position"/>
<field name="active"/>
<field name="sequence"/>
@@ -499,15 +507,15 @@
<field name="product_id" on_change="product_id_change(product_id)"/>
<field name="product_qty"/>
<group colspan="2" col="3">
- <field name="product_uom" widget="selection"/>
+ <field name="product_uom"/>
<button type="action"
name="%(mrp.action_change_production_qty)d"
string="Change Qty" states="ready,confirmed" />
</group>
<label string="" colspan="2"/>
- <field name="product_uos_qty" groups="product.group_uos,base.group_extended"/>
- <group colspan="2" col="3" groups="product.group_uos,base.group_extended">
- <field name="product_uos" widget="selection"/>
+ <field name="product_uos_qty" groups="product.group_uos"/>
+ <group colspan="2" col="3" groups="product.group_uos">
+ <field name="product_uos"/>
<label string=""/>
</group>
</group>
@@ -800,8 +808,8 @@
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom"/>
- <field name="product_uos_qty" groups="product.group_uos,base.group_extended"/>
- <field name="product_uos" groups="product.group_uos,base.group_extended"/>
+ <field name="product_uos_qty" groups="product.group_uos"/>
+ <field name="product_uos" groups="product.group_uos"/>
</tree>
</field>
</record>
diff --git a/addons/mrp/product.py b/addons/mrp/product.py
index ea717bd546c..64185d8dc26 100644
--- a/addons/mrp/product.py
+++ b/addons/mrp/product.py
@@ -24,15 +24,17 @@ from tools.translate import _
class product_product(osv.osv):
- _inherit = "product.product"
-
+ _inherit = "product.product"
+ _columns = {
+ "bom_ids": fields.one2many('mrp.bom', 'product_id','Bill of Materials'),
+ }
def do_change_standard_price(self, cr, uid, ids, datas, context={}):
""" Changes the Standard Price of Product and parent products and creates an account move accordingly.
@param datas: dict. contain default datas like new_price, stock_output_account, stock_input_account, stock_journal
- @param context: A standard dictionary
- @return:
- """
- #TODO : TO Check
+ @param context: A standard dictionary
+ @return:
+ """
+ #TODO : TO Check
res = super(product_product, self).do_change_standard_price(cr, uid, ids, datas, context=context)
bom_obj = self.pool.get('mrp.bom')
def _compute_price(bom):
@@ -44,7 +46,7 @@ class product_product(osv.osv):
price += bom_line.product_qty * prod_price
accounts = self.get_product_accounts(cr, uid, bom.bom_id.product_id.id, context)
-
+
datas = {
'new_price': price,
'stock_output_account': accounts['stock_account_output'],
@@ -54,9 +56,9 @@ class product_product(osv.osv):
super(product_product, self).do_change_standard_price(cr, uid, [bom.bom_id.product_id.id], datas, context)
_compute_price(bom.bom_id)
return price
-
+
bom_ids = bom_obj.search(cr, uid, [('product_id', 'in', ids)])
-
+
for bom in bom_obj.browse(cr, uid, bom_ids):
_compute_price(bom)
diff --git a/addons/mrp/security/ir.model.access.csv b/addons/mrp/security/ir.model.access.csv
index 8089be4a431..736203b307d 100644
--- a/addons/mrp/security/ir.model.access.csv
+++ b/addons/mrp/security/ir.model.access.csv
@@ -2,8 +2,8 @@
"access_mrp_workcenter","mrp.workcenter","model_mrp_workcenter","mrp.group_mrp_user",1,0,0,0
"access_mrp_routing","mrp.routing","model_mrp_routing","mrp.group_mrp_user",1,0,0,0
"access_mrp_routing_workcenter","mrp.routing.workcenter","model_mrp_routing_workcenter","mrp.group_mrp_user",1,0,0,0
-"access_mrp_bom","mrp.bom","model_mrp_bom","mrp.group_mrp_user",1,0,0,0
-"access_mrp_bom_revision","mrp.bom.revision","model_mrp_bom_revision","mrp.group_mrp_user",1,0,0,0
+"access_mrp_bom","mrp.bom","model_mrp_bom","group_mrp_user",1,0,0,0
+"access_mrp_bom_revision","mrp.bom.revision","model_mrp_bom_revision","group_mrp_user",1,0,0,0
"access_mrp_production","mrp.production","model_mrp_production","mrp.group_mrp_user",1,1,1,1
"access_mrp_production_workcenter_line","mrp.production.workcenter.line","model_mrp_production_workcenter_line","mrp.group_mrp_user",1,1,1,1
"access_mrp_production_product_line","mrp.production.product.line","model_mrp_production_product_line","mrp.group_mrp_user",1,1,1,1
diff --git a/addons/mrp/test/mrp_phantom_bom.yml b/addons/mrp/test/mrp_phantom_bom.yml
index 4a3e2e3e1da..885607d9539 100644
--- a/addons/mrp/test/mrp_phantom_bom.yml
+++ b/addons/mrp/test/mrp_phantom_bom.yml
@@ -182,14 +182,14 @@
-
!python {model: procurement.order}: |
from tools.translate import _
- proc_ids = self.search(cr, uid, [('state','!=','cofirmed')])
+ proc_ids = self.search(cr, uid, [('state','!=','confirmed')])
assert proc_ids, _('No Procurements!')
-
The scheduler runs.
-
!function {model: procurement.order, name: run_scheduler}:
- model: procurement.order
- search: "[('state','!=','cofirmed')]"
+ search: "[('state','!=','confirmed')]"
-
I am checking Internal picking. I see one picking for Orange juice and its
stock moves for Oranges, Sugar and Water made correctly.
@@ -247,4 +247,4 @@
picking_ids = pick_obj.search(cr, uid, [('type','=','in')])
self.view_init(cr, uid, ['date','partner_id','address_id'],context={'active_ids': picking_ids})
self.do_partial(cr, uid, [1], context={'active_ids': picking_ids})
- \ No newline at end of file
+
diff --git a/addons/mrp_operations/i18n/hi.po b/addons/mrp_operations/i18n/hi.po
new file mode 100644
index 00000000000..fa9b4ac9ef8
--- /dev/null
+++ b/addons/mrp_operations/i18n/hi.po
@@ -0,0 +1,439 @@
+# Hindi 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-08-28 16:01+0000\n"
+"PO-Revision-Date: 2010-06-14 08:48+0000\n"
+"Last-Translator: vir (Open ERP) <vir@tinyerp.com>\n"
+"Language-Team: Hindi <hi@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-06-16 03:49+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: mrp_operations
+#: model:process.node,name:mrp_operations.process_node_startoperation0
+msgid "Start Operation"
+msgstr "ऑपरेशन प्रारंभ करें"
+
+#. module: mrp_operations
+#: selection:mrp.production.workcenter.line,state:0
+msgid "In Progress"
+msgstr "प्रगति में है"
+
+#. module: mrp_operations
+#: view:mrp.production.workcenter.line:0
+#: selection:mrp.production.workcenter.line,state:0
+#: selection:mrp_operations.operation.code,start_stop:0
+msgid "Pause"
+msgstr "ठहरें (Pause)"
+
+#. module: mrp_operations
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+
+#. module: mrp_operations
+#: model:process.node,note:mrp_operations.process_node_startoperation0
+msgid "Operation is started"
+msgstr "ऑपरेशन शुरू कर दिया है"
+
+#. module: mrp_operations
+#: view:mrp.production.workcenter.line:0
+msgid "Information"
+msgstr "जानकारी"
+
+#. module: mrp_operations
+#: model:process.transition,name:mrp_operations.process_transition_startcanceloperation0
+msgid "Start Cancel Operation"
+msgstr "आरंभ रद्द संचालन"
+
+#. module: mrp_operations
+#: selection:mrp.production.workcenter.line,production_state:0
+msgid "In Production"
+msgstr "उत्पादन में"
+
+#. module: mrp_operations
+#: model:ir.actions.act_window,name:mrp_operations.mrp_production_code_action
+msgid "Operations Code"
+msgstr "परिचालन संहिता"
+
+#. module: mrp_operations
+#: model:process.process,name:mrp_operations.process_process_mrpoperationprocess0
+msgid "Mrp Operation Process"
+msgstr "एमआरपी ऑपरेशन प्रक्रिया"
+
+#. module: mrp_operations
+#: view:mrp.production.workcenter.line:0
+#: field:mrp.production.workcenter.line,state:0
+#: field:mrp_operations.operation.code,start_stop:0
+msgid "Status"
+msgstr "स्थिति"
+
+#. module: mrp_operations
+#: model:process.transition,name:mrp_operations.process_transition_startdoneoperation0
+msgid "Start Done Operation"
+msgstr ""
+
+#. module: mrp_operations
+#: view:mrp.production.workcenter.line:0
+#: selection:mrp_operations.operation.code,start_stop:0
+msgid "Start"
+msgstr "प्रारंभ"
+
+#. module: mrp_operations
+#: field:mrp_operations.operation,production_id:0
+msgid "Production"
+msgstr "उत्पादन"
+
+#. module: mrp_operations
+#: view:mrp_operations.operation:0
+msgid "Calendar View"
+msgstr "कैलेंडर देखना"
+
+#. module: mrp_operations
+#: model:process.node,name:mrp_operations.process_node_workorder0
+msgid "Work Center"
+msgstr "कार्य केंद्र"
+
+#. module: mrp_operations
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr "कार्य की परिभाषा में मॉडल का नाम अमान्य है."
+
+#. module: mrp_operations
+#: model:ir.ui.menu,name:mrp_operations.menu_mrp_production_operation_action
+msgid "Work Order Events Using Bar Codes"
+msgstr ""
+
+#. module: mrp_operations
+#: view:mrp.production.workcenter.line:0
+msgid "Set Draft"
+msgstr "Set as Draft"
+
+#. module: mrp_operations
+#: model:ir.actions.act_window,name:mrp_operations.mrp_production_wc_action_form
+#: view:mrp.production.workcenter.line:0
+msgid "Work Orders"
+msgstr "काम के आदेश"
+
+#. module: mrp_operations
+#: model:ir.ui.menu,name:mrp_operations.menu_mrp_production_code_action
+msgid "Start - Stop Codes"
+msgstr "शुरू और बंद कोड"
+
+#. module: mrp_operations
+#: field:mrp.production.workcenter.line,uom:0
+msgid "UOM"
+msgstr ""
+
+#. module: mrp_operations
+#: view:mrp_operations.operation.code:0
+msgid "Production Operation Code"
+msgstr ""
+
+#. module: mrp_operations
+#: field:mrp.production.workcenter.line,date_planned:0
+msgid "Scheduled Date"
+msgstr "अनुसूचित तिथि"
+
+#. module: mrp_operations
+#: model:process.transition,note:mrp_operations.process_transition_productionstart0
+msgid "From production order, create the workorder"
+msgstr "उत्पादन से आदेश, कार्य आदेश बनाने के लिए"
+
+#. module: mrp_operations
+#: view:mrp.production.workcenter.line:0
+msgid "Hours by Workcenter"
+msgstr ""
+
+#. module: mrp_operations
+#: help:mrp.production,allow_reorder:0
+msgid ""
+"Check this to be able to move independently all production orders, without "
+"moving dependent ones."
+msgstr ""
+
+#. module: mrp_operations
+#: model:ir.actions.act_window,name:mrp_operations.mrp_production_wc_action
+#: model:ir.ui.menu,name:mrp_operations.menu_mrp_production_wc_action
+msgid "All Work Orders"
+msgstr "सभी कार्य आदेश"
+
+#. module: mrp_operations
+#: rml:mrp.code.barcode:0
+msgid "("
+msgstr ""
+
+#. module: mrp_operations
+#: view:mrp.production.workcenter.line:0
+msgid "Product to Produce"
+msgstr ""
+
+#. module: mrp_operations
+#: model:ir.actions.report.xml,name:mrp_operations.report_wc_barcode
+msgid "Workcenters Barcode"
+msgstr "कार्य केंद्र बारकोड"
+
+#. module: mrp_operations
+#: model:process.node,note:mrp_operations.process_node_doneoperation0
+#: model:process.transition,note:mrp_operations.process_transition_startdoneoperation0
+msgid "Operation is done"
+msgstr "ऑपरेशन पूरा हो गया है"
+
+#. module: mrp_operations
+#: view:mrp.production.workcenter.line:0
+msgid "Planned Date"
+msgstr ""
+
+#. module: mrp_operations
+#: selection:mrp.production.workcenter.line,production_state:0
+msgid "Ready to Produce"
+msgstr "Ready to Produce"
+
+#. module: mrp_operations
+#: view:mrp.production.workcenter.line:0
+#: selection:mrp_operations.operation.code,start_stop:0
+msgid "Cancel"
+msgstr "रद्द करना"
+
+#. module: mrp_operations
+#: view:mrp.production.workcenter.line:0
+#: selection:mrp.production.workcenter.line,state:0
+msgid "Finished"
+msgstr "समाप्त"
+
+#. module: mrp_operations
+#: field:mrp.production,allow_reorder:0
+msgid "Free Serialisation"
+msgstr "नि: शुल्क Serialisation"
+
+#. module: mrp_operations
+#: model:ir.actions.act_window,name:mrp_operations.mrp_production_wc_action_planning
+#: model:ir.ui.menu,name:mrp_operations.menu_mrp_production_wc_draft_action_planning
+msgid "Work Orders Planning"
+msgstr "कार्य योजना के आदेश"
+
+#. module: mrp_operations
+#: model:process.node,name:mrp_operations.process_node_productionorder0
+msgid "Production Order"
+msgstr "उत्पादन के आदेश"
+
+#. module: mrp_operations
+#: model:process.node,note:mrp_operations.process_node_productionorder0
+msgid "Production order for any products"
+msgstr "किसी भी उत्पाद के लिए उत्पादन के आदेश"
+
+#. module: mrp_operations
+#: field:stock.move,move_dest_id_lines:0
+msgid "Children Moves"
+msgstr ""
+
+#. module: mrp_operations
+#: field:mrp_operations.operation.code,name:0
+msgid "Operation Name"
+msgstr "संचालन नाम"
+
+#. module: mrp_operations
+#: model:ir.model,name:mrp_operations.model_mrp_operations_operation
+msgid "mrp_operations.operation"
+msgstr ""
+
+#. module: mrp_operations
+#: field:mrp.production.workcenter.line,date_finnished:0
+#: field:mrp.production.workcenter.line,date_planned_end:0
+#: field:mrp_operations.operation,date_finished:0
+msgid "End Date"
+msgstr "आखिरी दिनांक"
+
+#. module: mrp_operations
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "संरचना देखने के लिए अमान्य XML!"
+
+#. module: mrp_operations
+#: view:mrp.production.workcenter.line:0
+msgid "Real"
+msgstr "वास्तविक"
+
+#. module: mrp_operations
+#: model:ir.module.module,shortdesc:mrp_operations.module_meta_information
+msgid "Workcenter Production start end workflow"
+msgstr "Workcenter उत्पादन आरंभ और अंत कार्यप्रवाह"
+
+#. module: mrp_operations
+#: help:mrp.production.workcenter.line,delay:0
+msgid "This is delay between operation start and stop in this workcenter"
+msgstr ""
+
+#. module: mrp_operations
+#: field:mrp.production.workcenter.line,product:0
+msgid "Product"
+msgstr "उत्पाद"
+
+#. module: mrp_operations
+#: model:process.transition,note:mrp_operations.process_transition_workstartoperation0
+msgid "From work order, define the cycles and hour for creating product"
+msgstr ""
+
+#. module: mrp_operations
+#: field:mrp.production.workcenter.line,delay:0
+msgid "Working Hours"
+msgstr "कार्य घंटे"
+
+#. module: mrp_operations
+#: model:ir.actions.act_window,name:mrp_operations.mrp_production_wc_draft_action
+#: model:ir.ui.menu,name:mrp_operations.menu_mrp_production_wc_draft_action
+msgid "Future Work Orders"
+msgstr "भविष्य के कार्य आदेश"
+
+#. module: mrp_operations
+#: field:mrp.production.workcenter.line,production_state:0
+msgid "Prod.State"
+msgstr ""
+
+#. module: mrp_operations
+#: field:mrp_operations.operation,order_date:0
+msgid "Order Date"
+msgstr "आदेश की तिथि"
+
+#. module: mrp_operations
+#: model:process.node,note:mrp_operations.process_node_workorder0
+msgid "Production Work Center"
+msgstr "उत्पादन कार्य केंद्र"
+
+#. module: mrp_operations
+#: model:process.transition,name:mrp_operations.process_transition_productionstart0
+msgid "Production start Operation"
+msgstr "उत्पादन ऑपरेशन शुरू"
+
+#. module: mrp_operations
+#: selection:mrp.production.workcenter.line,production_state:0
+msgid "Packing Exception"
+msgstr "पैकिंग अपवाद"
+
+#. module: mrp_operations
+#: field:mrp_operations.operation,workcenter_id:0
+msgid "Workcenter"
+msgstr "Work center"
+
+#. module: mrp_operations
+#: field:mrp.production.workcenter.line,date_start:0
+#: field:mrp.production.workcenter.line,date_start_date:0
+#: field:mrp_operations.operation,date_start:0
+msgid "Start Date"
+msgstr "प्रारंभ दिनांक"
+
+#. module: mrp_operations
+#: model:ir.model,name:mrp_operations.model_mrp_operations_operation_code
+msgid "mrp_operations.operation.code"
+msgstr ""
+
+#. module: mrp_operations
+#: model:ir.actions.act_window,name:mrp_operations.mrp_production_operation_action
+#: view:mrp.production.workcenter.line:0
+msgid "Operations"
+msgstr "संचालन"
+
+#. module: mrp_operations
+#: field:mrp_operations.operation,code_id:0
+#: field:mrp_operations.operation.code,code:0
+msgid "Code"
+msgstr "कोड"
+
+#. module: mrp_operations
+#: model:ir.actions.act_window,name:mrp_operations.mrp_production_wc_confirm_action
+msgid "Confirmed Work Orders"
+msgstr "काम के आदेश की पुष्टि की"
+
+#. module: mrp_operations
+#: model:ir.ui.menu,name:mrp_operations.menu_mrp_production_wc_confirm_action
+msgid "Work Orders to Do"
+msgstr ""
+
+#. module: mrp_operations
+#: model:process.node,name:mrp_operations.process_node_canceloperation0
+msgid "Cancel Operation"
+msgstr "संचालन रद्द"
+
+#. module: mrp_operations
+#: model:process.transition,name:mrp_operations.process_transition_workstartoperation0
+msgid "Work start Operation"
+msgstr "कार्य संचालन शुरू"
+
+#. module: mrp_operations
+#: model:ir.actions.report.xml,name:mrp_operations.report_code_barcode
+msgid "Start/Stop Barcode"
+msgstr "शुरू /बंद बारकोड"
+
+#. module: mrp_operations
+#: view:mrp.production.workcenter.line:0
+#: selection:mrp_operations.operation.code,start_stop:0
+msgid "Resume"
+msgstr "पुनरारंभ"
+
+#. module: mrp_operations
+#: model:process.node,name:mrp_operations.process_node_doneoperation0
+msgid "Done Operation"
+msgstr ""
+
+#. module: mrp_operations
+#: field:mrp.production.workcenter.line,qty:0
+msgid "Qty"
+msgstr "मात्रा"
+
+#. module: mrp_operations
+#: rml:mrp.code.barcode:0
+msgid ")"
+msgstr ""
+
+#. module: mrp_operations
+#: view:mrp_operations.operation:0
+msgid "Production Operation"
+msgstr ""
+
+#. module: mrp_operations
+#: selection:mrp.production.workcenter.line,production_state:0
+#: selection:mrp_operations.operation.code,start_stop:0
+msgid "Done"
+msgstr ""
+
+#. module: mrp_operations
+#: selection:mrp.production.workcenter.line,production_state:0
+msgid "Waiting Goods"
+msgstr ""
+
+#. module: mrp_operations
+#: view:mrp.production.workcenter.line:0
+msgid "Duration"
+msgstr ""
+
+#. module: mrp_operations
+#: selection:mrp.production.workcenter.line,production_state:0
+#: selection:mrp.production.workcenter.line,state:0
+msgid "Draft"
+msgstr ""
+
+#. module: mrp_operations
+#: model:process.node,note:mrp_operations.process_node_canceloperation0
+#: model:process.transition,note:mrp_operations.process_transition_startcanceloperation0
+msgid "Operation is cancelled"
+msgstr ""
+
+#. module: mrp_operations
+#: selection:mrp.production.workcenter.line,production_state:0
+#: selection:mrp.production.workcenter.line,state:0
+msgid "Canceled"
+msgstr ""
+
+#. module: mrp_operations
+#: view:mrp.production.workcenter.line:0
+msgid "Start working"
+msgstr ""
diff --git a/addons/mrp_repair/i18n/hi.po b/addons/mrp_repair/i18n/hi.po
new file mode 100644
index 00000000000..902b7bbf5bd
--- /dev/null
+++ b/addons/mrp_repair/i18n/hi.po
@@ -0,0 +1,669 @@
+# Hindi 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-08-28 16:01+0000\n"
+"PO-Revision-Date: 2010-06-15 06:37+0000\n"
+"Last-Translator: vir (Open ERP) <vir@tinyerp.com>\n"
+"Language-Team: Hindi <hi@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-06-16 03:49+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Fees Line"
+msgstr "मुक्त लाइन"
+
+#. module: mrp_repair
+#: field:mrp.repair.fee,repair_id:0
+#: field:mrp.repair.line,repair_id:0
+msgid "Repair Order Ref"
+msgstr "मरम्मत के आदेश संदर्भ"
+
+#. module: mrp_repair
+#: field:mrp.repair.line,move_id:0
+msgid "Inventory Move"
+msgstr ""
+
+#. module: mrp_repair
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr "कार्य की परिभाषा में मॉडल का नाम अमान्य है."
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Untaxed amount"
+msgstr "कर राशि के बिना"
+
+#. module: mrp_repair
+#: field:mrp.repair,state:0
+msgid "Repair State"
+msgstr ""
+
+#. module: mrp_repair
+#: rml:repair.order:0
+msgid "Printing Date"
+msgstr "मुद्रण दिनांक"
+
+#. module: mrp_repair
+#: field:mrp.repair.fee,product_uom_qty:0
+#: rml:repair.order:0
+msgid "Quantity"
+msgstr "मात्रा"
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Set to Draft"
+msgstr ""
+
+#. module: mrp_repair
+#: selection:mrp.repair,state:0
+msgid "Invoice Exception"
+msgstr "चालान अपवाद"
+
+#. module: mrp_repair
+#: field:mrp.repair,address_id:0
+msgid "Delivery Address"
+msgstr "वितरण पता"
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Make Invoice"
+msgstr "चालान बनाएँ"
+
+#. module: mrp_repair
+#: field:mrp.repair.fee,price_subtotal:0
+#: field:mrp.repair.line,price_subtotal:0
+msgid "Subtotal"
+msgstr "उप कुल"
+
+#. module: mrp_repair
+#: rml:repair.order:0
+msgid "Invoice address :"
+msgstr "चालान पता"
+
+#. module: mrp_repair
+#: field:mrp.repair,guarantee_limit:0
+msgid "Guarantee limit"
+msgstr "गारंटी की सीमा"
+
+#. module: mrp_repair
+#: field:mrp.repair,amount_tax:0
+#: field:mrp.repair.fee,tax_id:0
+#: field:mrp.repair.line,tax_id:0
+msgid "Taxes"
+msgstr ""
+
+#. module: mrp_repair
+#: rml:repair.order:0
+msgid "Net Total :"
+msgstr "नेट कुल:"
+
+#. module: mrp_repair
+#: rml:repair.order:0
+msgid "VAT"
+msgstr "वैट"
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Operations"
+msgstr "संचालन"
+
+#. module: mrp_repair
+#: field:mrp.repair,move_id:0
+msgid "Move"
+msgstr "स्थानान्तर"
+
+#. module: mrp_repair
+#: model:ir.actions.act_window,name:mrp_repair.action_repair_order_tree
+msgid "Repair Orders"
+msgstr "मरम्मत के आदेश"
+
+#. module: mrp_repair
+#: model:ir.actions.report.xml,name:mrp_repair.report_mrp_repair
+msgid "Quotation / Order"
+msgstr ""
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Extra Info"
+msgstr "अतिरिक्त जानकारी"
+
+#. module: mrp_repair
+#: field:mrp.repair,partner_id:0
+msgid "Partner"
+msgstr "साथी"
+
+#. module: mrp_repair
+#: model:ir.actions.act_window,name:mrp_repair.action_repair_quotation_tree
+#: model:ir.ui.menu,name:mrp_repair.menu_repair_quotation
+msgid "Repairs in quotation"
+msgstr ""
+
+#. module: mrp_repair
+#: selection:mrp.repair,state:0
+#: selection:mrp.repair.line,state:0
+msgid "Confirmed"
+msgstr "पुष्टि"
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Recreate Invoice"
+msgstr "फिर से चालान बनाने"
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Repairs order"
+msgstr "मरम्मत के आदेश"
+
+#. module: mrp_repair
+#: rml:repair.order:0
+msgid "Repair Order N° :"
+msgstr "मरम्मत के आदेश N °:"
+
+#. module: mrp_repair
+#: field:mrp.repair,prodlot_id:0
+#: rml:repair.order:0
+msgid "Lot Number"
+msgstr ""
+
+#. module: mrp_repair
+#: selection:mrp.repair,state:0
+msgid "Under Repair"
+msgstr "मरम्मत के तहत"
+
+#. module: mrp_repair
+#: field:mrp.repair,fees_lines:0
+msgid "Fees Lines"
+msgstr "फीस लाइन्स"
+
+#. module: mrp_repair
+#: model:ir.model,name:mrp_repair.model_mrp_repair_fee
+msgid "Repair Fees line"
+msgstr "मरम्मत शुल्क लाइन"
+
+#. module: mrp_repair
+#: rml:repair.order:0
+msgid "Fees Line(s)"
+msgstr "फीस लाइन (ओं)"
+
+#. module: mrp_repair
+#: selection:mrp.repair,state:0
+msgid "To be Invoiced"
+msgstr ""
+
+#. module: mrp_repair
+#: rml:repair.order:0
+msgid "Shipping address :"
+msgstr "शिपिंग का पता"
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Start Repair"
+msgstr "मरम्मत शुरू"
+
+#. module: mrp_repair
+#: field:mrp.repair.line,product_uom_qty:0
+msgid "Quantity (UoM)"
+msgstr "मात्रा (UoM)"
+
+#. module: mrp_repair
+#: field:mrp.repair.fee,to_invoice:0
+#: field:mrp.repair.line,to_invoice:0
+msgid "To Invoice"
+msgstr ""
+
+#. module: mrp_repair
+#: model:ir.ui.menu,name:mrp_repair.menu_repair_order
+msgid "Repairs"
+msgstr "मरम्मत"
+
+#. module: mrp_repair
+#: field:mrp.repair,picking_id:0
+msgid "Packing"
+msgstr "पैकिंग"
+
+#. module: mrp_repair
+#: rml:repair.order:0
+msgid "Total :"
+msgstr "कुल:"
+
+#. module: mrp_repair
+#: field:mrp.repair,pricelist_id:0
+msgid "Pricelist"
+msgstr "मूल्य सूची"
+
+#. module: mrp_repair
+#: help:mrp.repair,state:0
+msgid "Gives the state of the Repair Order"
+msgstr "मरम्मत के आदेश की स्थिति देना"
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+#: field:mrp.repair,quotation_notes:0
+msgid "Quotation Notes"
+msgstr ""
+
+#. module: mrp_repair
+#: model:ir.actions.act_window,name:mrp_repair.action_repair_progress_tree
+#: model:ir.ui.menu,name:mrp_repair.menu_repair_progress
+msgid "Repairs in progress"
+msgstr "मरम्मत में प्रगति"
+
+#. module: mrp_repair
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "संरचना देखने के लिए अमान्य XML!"
+
+#. module: mrp_repair
+#: help:mrp.repair,guarantee_limit:0
+msgid ""
+"The garantee limit is computed as: last move date + warranty defined on "
+"selected product. If the current date is below the garantee limit, each "
+"operation and fee you will add will be set as 'not to invoiced' by default. "
+"Note that you can change manually afterwards."
+msgstr ""
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Repair Line"
+msgstr ""
+
+#. module: mrp_repair
+#: rml:repair.order:0
+msgid "N° :"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair,invoice_method:0
+msgid "Invoice Method"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair,repaired:0
+msgid "Repaired"
+msgstr ""
+
+#. module: mrp_repair
+#: wizard_field:mrp.repair.make_invoice,init,group:0
+msgid "Group by partner invoice address"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair.fee,invoice_line_id:0
+#: field:mrp.repair.line,invoice_line_id:0
+msgid "Invoice Line"
+msgstr ""
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Total amount"
+msgstr ""
+
+#. module: mrp_repair
+#: selection:mrp.repair.line,state:0
+msgid "Canceled"
+msgstr ""
+
+#. module: mrp_repair
+#: selection:mrp.repair,invoice_method:0
+msgid "Before Repair"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair,location_id:0
+msgid "Current Location"
+msgstr ""
+
+#. module: mrp_repair
+#: wizard_button:mrp.repair.cancel,display,yes:0
+msgid "Yes"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair,invoiced:0
+#: field:mrp.repair.fee,invoiced:0
+#: field:mrp.repair.line,invoiced:0
+msgid "Invoiced"
+msgstr ""
+
+#. module: mrp_repair
+#: wizard_button:mrp.repair.cancel,display,end:0
+msgid "No"
+msgstr ""
+
+#. module: mrp_repair
+#: wizard_view:mrp.repair.make_invoice,init:0
+#: wizard_button:mrp.repair.make_invoice,init,invoice:0
+msgid "Create invoices"
+msgstr ""
+
+#. module: mrp_repair
+#: selection:mrp.repair.line,type:0
+#: rml:repair.order:0
+msgid "Add"
+msgstr ""
+
+#. module: mrp_repair
+#: selection:mrp.repair.line,state:0
+msgid "Draft"
+msgstr ""
+
+#. module: mrp_repair
+#: model:ir.actions.act_window,name:mrp_repair.action_repair_order_form
+#: model:ir.ui.menu,name:mrp_repair.menu_repair_form
+msgid "New Repair"
+msgstr ""
+
+#. module: mrp_repair
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair,amount_untaxed:0
+msgid "Untaxed Amount"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair.line,state:0
+msgid "Status"
+msgstr ""
+
+#. module: mrp_repair
+#: rml:repair.order:0
+msgid "Guarantee Limit"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair,product_id:0
+#: rml:repair.order:0
+msgid "Product to Repair"
+msgstr ""
+
+#. module: mrp_repair
+#: help:mrp.repair,pricelist_id:0
+msgid "The pricelist comes from the selected partner, by default."
+msgstr ""
+
+#. module: mrp_repair
+#: wizard_view:mrp.repair.cancel,display:0
+msgid ""
+"This operation will cancel the Repair process, but will not cancel it's "
+"Invoice. Do you want to continue?"
+msgstr ""
+
+#. module: mrp_repair
+#: selection:mrp.repair,state:0
+msgid "Quotation"
+msgstr ""
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Compute"
+msgstr ""
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Confirm Repair"
+msgstr ""
+
+#. module: mrp_repair
+#: rml:repair.order:0
+msgid "Repair Quotation"
+msgstr ""
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "End Repair"
+msgstr ""
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "History"
+msgstr ""
+
+#. module: mrp_repair
+#: model:ir.model,name:mrp_repair.model_mrp_repair
+msgid "Repairs Order"
+msgstr ""
+
+#. module: mrp_repair
+#: model:ir.actions.act_window,name:mrp_repair.action_repair_ready_tree
+#: model:ir.ui.menu,name:mrp_repair.menu_repair_ready
+msgid "Repairs Ready to Start"
+msgstr ""
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Qty"
+msgstr ""
+
+#. module: mrp_repair
+#: selection:mrp.repair,state:0
+#: selection:mrp.repair.line,state:0
+msgid "Done"
+msgstr ""
+
+#. module: mrp_repair
+#: model:ir.actions.act_window,name:mrp_repair.action_repair_2binvoiced_tree
+#: model:ir.ui.menu,name:mrp_repair.menu_repair_2binvoiced
+msgid "Repairs to be invoiced"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair,invoice_id:0
+msgid "Invoice"
+msgstr ""
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Fees"
+msgstr ""
+
+#. module: mrp_repair
+#: selection:mrp.repair,state:0
+#: wizard_button:mrp.repair.make_invoice,init,end:0
+msgid "Cancel"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair.line,location_dest_id:0
+msgid "Dest. Location"
+msgstr ""
+
+#. module: mrp_repair
+#: rml:repair.order:0
+msgid "Operation Line(s)"
+msgstr ""
+
+#. module: mrp_repair
+#: model:ir.model,name:mrp_repair.model_mrp_repair_line
+msgid "Repair Operations Lines"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair,location_dest_id:0
+msgid "Delivery Location"
+msgstr ""
+
+#. module: mrp_repair
+#: model:ir.module.module,shortdesc:mrp_repair.module_meta_information
+msgid "Products Repairs Module"
+msgstr ""
+
+#. module: mrp_repair
+#: help:mrp.repair,invoice_method:0
+msgid ""
+"This field allow you to change the workflow of the repair order. If value "
+"selected is different from 'No Invoice', it also allow you to select the "
+"pricelist and invoicing address."
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair.fee,price_unit:0
+#: field:mrp.repair.line,price_unit:0
+#: rml:repair.order:0
+msgid "Unit Price"
+msgstr ""
+
+#. module: mrp_repair
+#: wizard_view:mrp.repair.make_invoice,init:0
+msgid "Do you really want to create the invoices ?"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair.fee,name:0
+#: field:mrp.repair.line,name:0
+#: rml:repair.order:0
+msgid "Description"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair,operations:0
+msgid "Operation Lines"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair.fee,product_id:0
+#: field:mrp.repair.line,product_id:0
+msgid "Product"
+msgstr ""
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Invoice Corrected"
+msgstr ""
+
+#. module: mrp_repair
+#: help:mrp.repair,deliver_bool:0
+msgid ""
+"Check this box if you want to manage the delivery once the product is "
+"repaired. If cheked, it will create a packing with selected product. Note "
+"that you can select the locations in the Info tab, if you have the extended "
+"view."
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair.line,type:0
+msgid "Type"
+msgstr ""
+
+#. module: mrp_repair
+#: rml:repair.order:0
+msgid "Price"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair,deliver_bool:0
+msgid "Deliver"
+msgstr ""
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+#: field:mrp.repair,internal_notes:0
+msgid "Internal Notes"
+msgstr ""
+
+#. module: mrp_repair
+#: rml:repair.order:0
+msgid "Taxes:"
+msgstr ""
+
+#. module: mrp_repair
+#: model:ir.actions.wizard,name:mrp_repair.wizard_mrp_repair_make_invoice
+msgid "Make invoices"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair,name:0
+msgid "Repair Ref"
+msgstr ""
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "UoM"
+msgstr ""
+
+#. module: mrp_repair
+#: selection:mrp.repair.line,type:0
+#: rml:repair.order:0
+msgid "Remove"
+msgstr ""
+
+#. module: mrp_repair
+#: wizard_view:mrp.repair.cancel,display:0
+msgid "Cancel Repair...??"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair.fee,product_uom:0
+#: field:mrp.repair.line,product_uom:0
+msgid "Product UoM"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair,partner_invoice_id:0
+msgid "Invoicing Address"
+msgstr ""
+
+#. module: mrp_repair
+#: selection:mrp.repair,invoice_method:0
+msgid "After Repair"
+msgstr ""
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Invoicing"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair.line,location_id:0
+msgid "Source Location"
+msgstr ""
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "Quality"
+msgstr ""
+
+#. module: mrp_repair
+#: model:ir.actions.wizard,name:mrp_repair.action_cancel_repair
+#: view:mrp.repair:0
+msgid "Cancel Repair"
+msgstr ""
+
+#. module: mrp_repair
+#: selection:mrp.repair,invoice_method:0
+msgid "No Invoice"
+msgstr ""
+
+#. module: mrp_repair
+#: view:mrp.repair:0
+msgid "States"
+msgstr ""
+
+#. module: mrp_repair
+#: help:mrp.repair,partner_id:0
+msgid ""
+"This field allow you to choose the parner that will be invoiced and delivered"
+msgstr ""
+
+#. module: mrp_repair
+#: field:mrp.repair,amount_total:0
+msgid "Total"
+msgstr ""
+
+#. module: mrp_repair
+#: selection:mrp.repair,state:0
+msgid "Ready to Repair"
+msgstr ""
diff --git a/addons/multi_company/i18n/it.po b/addons/multi_company/i18n/it.po
index e817d7b073b..aa820150b5a 100644
--- a/addons/multi_company/i18n/it.po
+++ b/addons/multi_company/i18n/it.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-12-08 11:46+0000\n"
-"PO-Revision-Date: 2010-01-26 11:01+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"PO-Revision-Date: 2010-06-15 12:42+0000\n"
+"Last-Translator: Rinux <Unknown>\n"
"Language-Team: Italian <it@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-04-17 04:21+0000\n"
+"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
@@ -70,7 +70,7 @@ msgstr ""
#: model:ir.module.module,shortdesc:multi_company.module_meta_information
#: view:multi_company.default:0
msgid "Multi Company"
-msgstr ""
+msgstr "Multi Azienda"
#. module: multi_company
#: model:ir.module.module,description:multi_company.module_meta_information
@@ -133,17 +133,17 @@ msgstr ""
#. module: multi_company
#: model:ir.model,name:multi_company.model_multi_company_default
msgid "multi_company.default"
-msgstr ""
+msgstr "multi_azienda.default"
#. module: multi_company
#: help:multi_company.default,company_id:0
msgid "Company where the user is connected"
-msgstr ""
+msgstr "Azienda con la quale l'utente è connesso"
#. module: multi_company
#: model:ir.actions.act_window,name:multi_company.action_inventory_form
msgid "Default Company per Object"
-msgstr ""
+msgstr "Azienda Predefinita per Oggetto"
#. module: multi_company
#: field:multi_company.default,expression:0
@@ -173,12 +173,12 @@ msgstr ""
#. module: multi_company
#: help:multi_company.default,expression:0
msgid "Expression, must be True to match"
-msgstr ""
+msgstr "Espressione, deve essere Vero per corrispondere"
#. module: multi_company
#: model:ir.ui.menu,name:multi_company.menu_action_inventory_form
msgid "Default company per Object"
-msgstr ""
+msgstr "Azienda predefinitaa per Oggetto"
#. module: multi_company
#: code:addons/multi_company/multi_company.py:0
diff --git a/addons/point_of_sale/__openerp__.py b/addons/point_of_sale/__openerp__.py
index 27707bcf0e0..68d3bd85d8d 100644
--- a/addons/point_of_sale/__openerp__.py
+++ b/addons/point_of_sale/__openerp__.py
@@ -66,6 +66,7 @@ Main features :
'pos_report.xml',
# 'pos_wizard.xml',
'pos_view.xml',
+ 'report/report_pos_order_view.xml',
'pos_sequence.xml',
'posrule_data.xml',
'pos_data.xml',
diff --git a/addons/point_of_sale/account_bank_statement.py b/addons/point_of_sale/account_bank_statement.py
index 1f8ccc80162..7b808a7273c 100644
--- a/addons/point_of_sale/account_bank_statement.py
+++ b/addons/point_of_sale/account_bank_statement.py
@@ -246,6 +246,9 @@ class account_bank_statement(osv.osv):
self.write(cr, uid, statement.id, {'balance_end_real':Decimal(str(val_statement_line))+Decimal(str(val2)),'closing_date':time.strftime("%Y-%m-%d %H:%M:%S"),'state':'draft'})
# self.write(cr, uid, statement.id, {'balance_end_real':bal_st+val_statement_line,'closing_date':time.strftime("%Y-%m-%d %H:%M:%S"),'state':'draft'})
return super(account_bank_statement, self).button_confirm(cr, uid, ids, context=None)
+
+ def button_cancel(self, cr, uid, ids, context={}):
+ self.write(cr, uid, ids, {'state':'draft'}, context=context)
account_bank_statement()
diff --git a/addons/point_of_sale/report/__init__.py b/addons/point_of_sale/report/__init__.py
index 4af503ff9da..9f0f94bb816 100644
--- a/addons/point_of_sale/report/__init__.py
+++ b/addons/point_of_sale/report/__init__.py
@@ -37,5 +37,6 @@ import pos_sales_user_today_current_user
import pos_receipt_with_remboursment
import pos_receipt_without_remboursment
import point_of_sale_report
+import report_pos_order
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/point_of_sale/report/report_pos_order.py b/addons/point_of_sale/report/report_pos_order.py
new file mode 100644
index 00000000000..082ff3f434e
--- /dev/null
+++ b/addons/point_of_sale/report/report_pos_order.py
@@ -0,0 +1,89 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import tools
+from osv import fields,osv
+
+class report_pos_order(osv.osv):
+ _name = "report.pos.order"
+ _description = "Point of Sale Orders Statistics"
+ _auto = False
+ _columns ={
+ 'date': fields.date('Date Order', readonly=True),
+ 'date_validation': fields.date('Date Confirm', readonly=True),
+ 'date_payment': fields.date('Date Confirm', readonly=True),
+ 'year': fields.char('Year', size=4, readonly=True),
+ 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
+ ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
+ ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
+ 'day': fields.char('Day', size=128, readonly=True),
+ 'partner_id':fields.many2one('res.partner', 'Partner', readonly=True),
+ 'product_id':fields.many2one('product.product', 'Product', readonly=True),
+ 'state': fields.selection([('draft', 'Draft'), ('payment', 'Payment'),
+ ('advance','Advance'),
+ ('paid', 'Paid'), ('done', 'Done'), ('invoiced', 'Invoiced'), ('cancel', 'Cancel')],
+ 'State'),
+ 'user_id':fields.many2one('res.users', 'Salesman', readonly=True),
+ 'price_total':fields.float('Total Price', readonly=True),
+ 'shop_id':fields.many2one('sale.shop', 'Shop', readonly=True),
+ 'company_id':fields.many2one('res.company', 'Company', readonly=True),
+ 'nbr':fields.integer('# of Lines', readonly=True),
+ 'product_qty':fields.float('# of Qty', readonly=True),
+ 'journal_id': fields.many2one('account.journal', 'Journal'),
+ }
+ _order = 'date desc'
+ def init(self, cr):
+ tools.drop_view_if_exists(cr, 'report_pos_order')
+ cr.execute("""
+ create or replace view report_pos_order as (
+ select el.*,
+
+ (select 1) as nbr,
+ to_date(to_char(po.date_order, 'dd-MM-YYYY'),'dd-MM-YYYY') as date,
+ po.date_validation as date_validation,
+ po.date_payment as date_payment,
+ to_char(po.date_order, 'YYYY') as year,
+ to_char(po.date_order, 'MM') as month,
+ to_char(po.date_order, 'YYYY-MM-DD') as day,
+ po.partner_id as partner_id,
+ po.state as state,
+ po.user_id as user_id,
+ po.shop_id as shop_id,
+ po.company_id as company_id,
+ po.sale_journal as journal_id
+
+ from
+ pos_order as po,
+ ( select pl.id as id,
+ pl.product_id as product_id,
+ pl.qty as product_qty,
+ sum(pl.qty * pl.price_unit)- sum(pl.qty * pl.price_ded) as price_total,
+ pl.order_id
+ from
+ pos_order_line as pl
+ left join product_template pt on (pt.id=pl.product_id)
+ group by
+ pl.id,pl.order_id, pl.qty,pl.product_id) el
+ where po.id = el.order_id
+ )
+ """)
+
+report_pos_order()
diff --git a/addons/point_of_sale/report/report_pos_order_view.xml b/addons/point_of_sale/report/report_pos_order_view.xml
new file mode 100644
index 00000000000..ecd3d431a3a
--- /dev/null
+++ b/addons/point_of_sale/report/report_pos_order_view.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <record id="view_report_pos_order_tree" model="ir.ui.view">
+ <field name="name">report.pos.order.tree</field>
+ <field name="model">report.pos.order</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Point of Sale Analysis">
+ <field name="date" />
+ <field name="date_validation" invisible="1"/>
+ <field name="date_payment" invisible="1"/>
+ <field name="user_id" invisible="1"/>
+ <field name="year" invisible="1"/>
+ <field name="day" invisible="1"/>
+ <field name="month" invisible="1"/>
+ <field name="partner_id" invisible="1"/>
+ <field name="product_id" invisible="1"/>
+ <field name="shop_id" invisible="1"/>
+ <field name="journal_id" invisible="1"/>
+ <field name="company_id" invisible="1" groups="base.group_multi_company"/>
+ <field name="nbr" sum="# of Lines"/>
+ <field name="product_qty" sum="# of Qty"/>
+ <field name="price_total" sum="Total Price"/>
+ <field name="state" invisible="1"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="view_report_pos_order_search" model="ir.ui.view">
+ <field name="name">report.pos.order.search</field>
+ <field name="model">report.pos.order</field>
+ <field name="type">search</field>
+ <field name="arch" type="xml">
+ <search string="Point of Sale Analysis">
+ <group>
+ <filter icon="terp-go-year" string=" 365 Days "
+ domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
+ help="POS ordered created last 365 days"/>
+ <filter icon="terp-go-month" string=" 30 Days "
+ name="month"
+ domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
+ help="POS ordered created in last 30 days"/>
+ <filter icon="terp-go-week"
+ string=" 7 Days "
+ separator="1"
+ domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
+ help="POS ordered created last 7 days"/>
+ <separator orientation="vertical"/>
+ <filter icon="terp-document-new"
+ string="Draft"
+ domain="[('state','=','draft')]"/>
+ <filter icon="terp-dolar"
+ string="Paid"
+ domain="[('state','=',('paid'))]"/>
+ <filter icon="terp-dolar"
+ string="Invoiced"
+ domain="[('state','=',('invoiced'))]"/>
+ <separator orientation="vertical"/>
+ <field name="partner_id"/>
+ <field name="user_id" widget="selection">
+ <filter icon="terp-dolar"
+ string="My Sales"
+ help="My Sales"
+ domain="[('user_id','=',uid)]"/>
+ </field>
+ </group>
+ <newline/>
+ <group expand="0" string="Group By..." colspan="10" col="12">
+ <filter string="Salesman" icon="terp-personal" name="User" context="{'group_by':'user_id'}"/>
+ <filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}"/>
+ <separator orientation="vertical"/>
+ <filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
+ <separator orientation="vertical"/>
+ <filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
+ <filter string="Shop" icon="terp-go-home" context="{'group_by':'shop_id'}"/>
+ <filter string="Company" icon="terp-go-home" groups="base.group_multi_company" context="{'group_by':'company_id'}"/>
+ <separator orientation="vertical"/>
+ <filter string="Day" icon="terp-go-month" context="{'group_by':'day'}"/>
+ <filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
+ <filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record id="action_report_pos_order_all" model="ir.actions.act_window">
+ <field name="name">Point of Sale Analysis</field>
+ <field name="res_model">report.pos.order</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,graph</field>
+ <field name="search_view_id" ref="view_report_pos_order_search"/>
+ <field name="context">{'search_default_month':1,'search_default_User':1}</field>
+ </record>
+
+ <menuitem action="action_report_pos_order_all" id="menu_report_pos_order_all" parent="menu_point_rep" sequence="1"/>
+ </data>
+</openerp> \ No newline at end of file
diff --git a/addons/point_of_sale/security/ir.model.access.csv b/addons/point_of_sale/security/ir.model.access.csv
index ac87e1cc8b9..ee428ec2b19 100644
--- a/addons/point_of_sale/security/ir.model.access.csv
+++ b/addons/point_of_sale/security/ir.model.access.csv
@@ -37,3 +37,5 @@
"access_pos_make_payment","pos.make.payment","model_pos_make_payment","point_of_sale.group_pos_user",1,0,0,0
"access_pos_scan_product","pos.scan.product","model_pos_scan_product","point_of_sale.group_pos_user",1,0,0,0
"access_pos_payment_report","pos.payment.report","model_pos_payment_report","point_of_sale.group_pos_user",1,0,0,0
+"access_report_pos_order","report.pos.order","model_report_pos_order","point_of_sale.group_pos_user",1,0,0,0
+"access_pos_return","pos.return","model_pos_return","point_of_sale.group_pos_user",1,0,0,0
diff --git a/addons/point_of_sale/statement_view.xml b/addons/point_of_sale/statement_view.xml
index a4acd7429ec..65b5fb419d6 100644
--- a/addons/point_of_sale/statement_view.xml
+++ b/addons/point_of_sale/statement_view.xml
@@ -24,7 +24,7 @@
<field name="model">account.bank.statement</field>
<field name="type">tree</field>
<field name="arch" type="xml">
- <tree colors="red:balance_end_real!=balance_end;blue:state=='draft' and (balance_end_real==balance_end)" string="Statement">
+ <tree colors="red:balance_end_real!=balance_end;blue:state=='draft' and (balance_end_real==balance_end);black:state in ('open');blue:state in ('draft')" string="Statement">
<field name="date"/>
<field name="name"/>
<field name="journal_id"/>
@@ -34,6 +34,9 @@
<field name="balance_end"/>
<field name="user_id"/>
<field name="state"/>
+ <button type="object" string="Open" name="button_open" states="draft" icon="terp-camera_test"/>
+ <button type="object" string="Confirm" name="button_confirm" states="open" icon="terp-gtk-go-back-rtl"/>
+ <button type="object" string="Cancel" name="button_cancel" states="confirm" icon="terp-gtk-stop"/>
</tree>
</field>
</record>
@@ -349,11 +352,43 @@
<menuitem action="action_bank_statement_treenew" id="menu_statement_tree2" parent="menu_statement_tree_all" sequence="1"/>
+ <record id="view_account_bank_statment_filter" model="ir.ui.view">
+ <field name="name">account.bank.statment.select</field>
+ <field name="model">account.bank.statement</field>
+ <field name="type">search</field>
+ <field name="arch" type="xml">
+ <search string="Search Cashbox">
+ <group col='9' colspan='4'>
+ <filter icon="terp-camera_test" string="Open"
+ domain="[('state','=','open')]"
+ help="All open cashboxes"/>
+ <filter icon="terp-dialog-close" string="To Close"
+ domain="[('state','=','draft')]"
+ help="All cashboxes to close"/>
+ <filter icon="terp-go-today" name="Today" string="Today"
+ domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d 23:59:59'))]"
+ help="All cashboxes to opened today"/>
+ <separator orientation="vertical"/>
+ <field name="name"/>
+ </group>
+ <newline/>
+ <group expand="0" string="Group By..." colspan="4" col="20">
+ <filter string="Journal" icon="terp-folder-blue" domain="[]" context="{'group_by':'journal_id'}"/>
+ <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
<record model="ir.actions.act_window" id="action_pos_account_bank_statment">
<field name="name">All Cashboxes</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.bank.statement</field>
<field name="view_type">form</field>
+ <field name="view_id" eval="False"/>
+ <field name="context">{'search_default_Today':1}</field>
+ <field name="search_view_id" ref="view_account_bank_statment_filter"/>
+
</record>
<record model="ir.actions.act_window.view" id="act_statement_a1">
<field name="sequence" eval="1"/>
@@ -367,7 +402,7 @@
<field name="view_id" ref="view_bank_statement_form3"/>
<field name="act_window_id" ref="action_pos_account_bank_statment"/>
</record>
- <menuitem name="All Cashboxes" parent="menu_point_report_register"
+ <menuitem name="All Cashboxes" parent="menu_statement_tree_all"
action="action_pos_account_bank_statment" id="menu_pos_bank_statment_tree" groups="base.group_extended" sequence="4"/>
<record model="ir.actions.act_window" id="action_my_all_pos_account_bank_statment">
@@ -414,8 +449,8 @@
<field name="act_window_id" ref="action_cashboxes_to_close"/>
</record>
- <menuitem name="Cashboxes to Close" parent="menu_pos_bank_statment_tree"
- action="action_cashboxes_to_close" id="menu_cashboxes_to_close_tree" groups="base.group_extended"/>
+<!-- <menuitem name="Cashboxes to Close" parent="menu_statement_tree_all"-->
+<!-- action="action_cashboxes_to_close" id="menu_cashboxes_to_close_tree" groups="base.group_extended"/>-->
<menuitem
diff --git a/addons/procurement/schedulers.py b/addons/procurement/schedulers.py
index 6a4e2736dbd..bdc37c1b660 100644
--- a/addons/procurement/schedulers.py
+++ b/addons/procurement/schedulers.py
@@ -37,7 +37,9 @@ class procurement_order(osv.osv):
context = {}
if use_new_cursor:
+ print 'Cursor New', cr,
cr = pooler.get_db(use_new_cursor).cursor()
+ print cr
wf_service = netsvc.LocalService("workflow")
procurement_obj = self.pool.get('procurement.order')
@@ -122,6 +124,7 @@ class procurement_order(osv.osv):
})
if use_new_cursor:
cr.commit()
+ print 'Cursor Close', cr
cr.close()
return {}
@@ -172,7 +175,9 @@ class procurement_order(osv.osv):
if not context:
context = {}
if use_new_cursor:
+ print 'Cursor New', cr,
cr = pooler.get_db(use_new_cursor).cursor()
+ print cr
orderpoint_obj = self.pool.get('stock.warehouse.orderpoint')
location_obj = self.pool.get('stock.location')
procurement_obj = self.pool.get('procurement.order')
@@ -236,6 +241,7 @@ class procurement_order(osv.osv):
})
if use_new_cursor:
cr.commit()
+ print 'Cursor Close', cr
cr.close()
return {}
procurement_order()
diff --git a/addons/procurement/security/ir.model.access.csv b/addons/procurement/security/ir.model.access.csv
index f13decfa9f2..6cc6cc8acb4 100644
--- a/addons/procurement/security/ir.model.access.csv
+++ b/addons/procurement/security/ir.model.access.csv
@@ -1,9 +1,11 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_mrp_property_group","mrp.property.group","model_mrp_property_group",stock.group_stock_manager,1,1,1,1
+"access_mrp_property","mrp.property","model_mrp_property",stock.group_stock_manager,1,1,1,1
"access_mrp_property_group","mrp.property.group","model_mrp_property_group",,1,0,0,0
-"access_mrp_property","mrp.property","model_mrp_property",,1,0,0,0
-"access_procurement","procurement.order","model_procurement_order",,1,0,0,0
-"access_stock_warehouse_orderpoint","stock.warehouse.orderpoint","model_stock_warehouse_orderpoint",,1,0,0,0
-"access_procurement_compute_all","procurement.order.compute.all","model_procurement_order_compute_all",,1,0,0,0
-"access_procurement_orderpoint_compute","procurement.orderpoint.compute","model_procurement_orderpoint_compute",,1,0,0,0
-"access_mrp_make_procurement","make.procurement","model_make_procurement",,1,0,0,0
-"access_mrp_make_procurement","procurement.order.compute","model_procurement_order_compute",,1,0,0,0
+"access_mrp_property","mrp.property","model_mrp_property",base.group_user,1,0,0,0
+"access_procurement","procurement.order","model_procurement_order",base.group_user,1,0,0,0
+"access_stock_warehouse_orderpoint","stock.warehouse.orderpoint","model_stock_warehouse_orderpoint",stock.group_stock_manager,1,1,1,1
+"access_procurement_compute_all","procurement.order.compute.all","model_procurement_order_compute_all",stock.group_stock_manager,1,1,1,1
+"access_procurement_orderpoint_compute","procurement.orderpoint.compute","model_procurement_orderpoint_compute",stock.group_stock_manager,1,1,1,1
+"access_mrp_make_procurement","make.procurement","model_make_procurement",stock.group_stock_manager,1,1,1,1
+"access_mrp_make_procurement","procurement.order.compute","model_procurement_order_compute",stock.group_stock_manager,1,1,1,1
diff --git a/addons/procurement/wizard/mrp_procurement.py b/addons/procurement/wizard/mrp_procurement.py
index 466a462a55d..659a2ad4d51 100644
--- a/addons/procurement/wizard/mrp_procurement.py
+++ b/addons/procurement/wizard/mrp_procurement.py
@@ -31,7 +31,8 @@ class procurement_compute(osv.osv_memory):
proc_obj = self.pool.get('procurement.order')
proc_obj._procure_confirm(cr, uid, use_new_cursor=cr.dbname, context=context)
finally:
- cr.close()
+ pass
+ #cr.close()
return {}
def procure_calculation(self, cr, uid, ids, context):
diff --git a/addons/procurement/wizard/schedulers_all.py b/addons/procurement/wizard/schedulers_all.py
index 6a02048ed71..73efc77d017 100644
--- a/addons/procurement/wizard/schedulers_all.py
+++ b/addons/procurement/wizard/schedulers_all.py
@@ -45,10 +45,12 @@ class procurement_compute_all(osv.osv_memory):
"""
proc_obj = self.pool.get('procurement.order')
for proc in self.browse(cr, uid, ids):
+ print 'Cursor', cr
proc_obj.run_scheduler(cr, uid, automatic=proc.automatic, use_new_cursor=cr.dbname,\
context=context)
+ print 'Cursor', cr
return {}
-
+
def procure_calculation(self, cr, uid, ids, context):
"""
@param self: The object pointer.
diff --git a/addons/product/i18n/vi.po b/addons/product/i18n/vi.po
index a2c65299744..35d5e643150 100644
--- a/addons/product/i18n/vi.po
+++ b/addons/product/i18n/vi.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-06-14 03:42+0000\n"
+"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: product
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index edd5e9e3499..09a287f0a38 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -45,7 +45,7 @@
<field name="name"/>
<field name="categ_id" invisible="1"/>
<field name="variants" groups="product.group_product_variant"/>
- <field name="uom_id"/>
+ <field name="uom_id" string="UoM"/>
<field name="type"/>
<field name="qty_available"/>
<field name="virtual_available"/>
diff --git a/addons/product_expiry/__init__.py b/addons/product_expiry/__init__.py
new file mode 100644
index 00000000000..3b5500415c2
--- /dev/null
+++ b/addons/product_expiry/__init__.py
@@ -0,0 +1,25 @@
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import product_expiry
+import wizard
+import report
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/product_expiry/__terp__.py b/addons/product_expiry/__terp__.py
new file mode 100644
index 00000000000..2e44f2c6462
--- /dev/null
+++ b/addons/product_expiry/__terp__.py
@@ -0,0 +1,39 @@
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+{
+ "name" : "Products date of expiry",
+ "version" : "1.0",
+ "author" : "Tiny",
+ "category" : "Enterprise Specific Modules/Food Industries",
+ "depends" : ["base", "account", "product", "stock"],
+ "init_xml" : [],
+ "demo_xml" : ["product_expiry_demo.xml"],
+ "description": '''Track different dates on products and production lots:
+ - end of life
+ - best before date
+ - removal date
+ - alert date
+Used, for example, in food industries.''',
+ "update_xml" : ["product_expiry_view.xml", "report/report_stock_view.xml", "wizard/stock_partial_view.xml"],
+ "active": False,
+ "installable": True
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/product_expiry/i18n/ca.po b/addons/product_expiry/i18n/ca.po
new file mode 100644
index 00000000000..3bffba540b9
--- /dev/null
+++ b/addons/product_expiry/i18n/ca.po
@@ -0,0 +1,180 @@
+# Catalan 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-06-30 15:09+0000\n"
+"PO-Revision-Date: 2010-01-10 22:56+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Catalan <ca@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-05-21 03:45+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: product_expiry
+#: field:product.product,life_time:0
+msgid "Product lifetime"
+msgstr "Cicle de vida producte"
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_from_product_template
+msgid "Ham"
+msgstr "Pernil"
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_lait_product_template
+msgid "Cow milk"
+msgstr "Llet de vaca"
+
+#. module: product_expiry
+#: model:ir.module.module,shortdesc:product_expiry.module_meta_information
+msgid "Products date of expiry"
+msgstr "Data de caducitat de productes"
+
+#. module: product_expiry
+#: constraint:product.template:0
+msgid ""
+"Error: The default UOM and the purchase UOM must be in the same category."
+msgstr ""
+"Error: La UdM per defecte i la UdM de compra han d'estar en la mateixa "
+"categoria."
+
+#. module: product_expiry
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "XML no vàlid per a la definició de la vista!"
+
+#. module: product_expiry
+#: help:stock.production.lot,life_date:0
+msgid "The date the lot may become dangerous and should not be consumed."
+msgstr ""
+
+#. module: product_expiry
+#: field:stock.production.lot,removal_date:0
+msgid "Removal Date"
+msgstr ""
+
+#. module: product_expiry
+#: model:ir.module.module,description:product_expiry.module_meta_information
+msgid ""
+"Track different dates on products and production lots:\n"
+" - end of life\n"
+" - best before date\n"
+" - removal date\n"
+" - alert date\n"
+"Used, for example, in food industries."
+msgstr ""
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_pain_product_template
+msgid "Bread"
+msgstr "Pa"
+
+#. module: product_expiry
+#: model:product.uom,name:product_expiry.product_uom_ltr
+#: model:product.uom.categ,name:product_expiry.product_uom_categ_vol
+msgid "LTR"
+msgstr ""
+
+#. module: product_expiry
+#: view:product.product:0
+#: view:stock.production.lot:0
+msgid "Dates"
+msgstr "Dates"
+
+#. module: product_expiry
+#: constraint:product.template:0
+msgid "Error: UOS must be in a different category than the UOM"
+msgstr "Error: La UdV ha d'estar en una categoria diferent que la UdM."
+
+#. module: product_expiry
+#: field:stock.production.lot,life_date:0
+msgid "End of Life Date"
+msgstr ""
+
+#. module: product_expiry
+#: field:stock.production.lot,use_date:0
+msgid "Best before Date"
+msgstr ""
+
+#. module: product_expiry
+#: help:stock.production.lot,use_date:0
+msgid "The date the lot starts deteriorating without becoming dangerous."
+msgstr ""
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_jambon_product_template
+msgid "French cheese Camenbert"
+msgstr "Formatge Camembert francès"
+
+#. module: product_expiry
+#: help:product.product,removal_time:0
+msgid "The number of days before a production lot should be removed."
+msgstr ""
+
+#. module: product_expiry
+#: field:product.product,use_time:0
+msgid "Product usetime"
+msgstr "Temps d'ús producte"
+
+#. module: product_expiry
+#: field:stock.production.lot,alert_date:0
+msgid "Alert Date"
+msgstr ""
+
+#. module: product_expiry
+#: field:product.product,removal_time:0
+msgid "Product removal time"
+msgstr "Data eliminació producte"
+
+#. module: product_expiry
+#: help:product.product,use_time:0
+msgid ""
+"The number of days before a production lot starts deteriorating without "
+"becoming dangerous."
+msgstr ""
+
+#. module: product_expiry
+#: constraint:product.product:0
+msgid "Error: Invalid ean code"
+msgstr "Error: Codi EAN erroni"
+
+#. module: product_expiry
+#: help:product.product,life_time:0
+msgid ""
+"The number of days before a production lot may become dangerous and should "
+"not be consumed."
+msgstr ""
+
+#. module: product_expiry
+#: help:stock.production.lot,removal_date:0
+msgid "The date the lot should be removed."
+msgstr ""
+
+#. module: product_expiry
+#: field:product.product,alert_time:0
+msgid "Product alert time"
+msgstr "Data alerta producte"
+
+#~ msgid "Alert date"
+#~ msgstr "Data alarma"
+
+#~ msgid ""
+#~ "Track different dates on products and lots. Used, for exampel, in food "
+#~ "industries: expiry date, alert date, date of removal, eso."
+#~ msgstr ""
+#~ "Gestiona diferents dates per a productes i lots. Utilitzat, per exemple, en "
+#~ "la indústria alimentària: Data de caducitat, data d'alarma, data "
+#~ "d'eliminació, ..."
+
+#~ msgid "DLUO"
+#~ msgstr "Data caducitat"
+
+#~ msgid "Removal date"
+#~ msgstr "Data eliminació"
diff --git a/addons/product_expiry/i18n/es.po b/addons/product_expiry/i18n/es.po
new file mode 100644
index 00000000000..c0b8140f48b
--- /dev/null
+++ b/addons/product_expiry/i18n/es.po
@@ -0,0 +1,180 @@
+# 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-06-30 15:09+0000\n"
+"PO-Revision-Date: 2010-04-29 04:43+0000\n"
+"Last-Translator: Rhubeni Lopes de Andrade <rhube.itsasecret@gmail.com>\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-05-21 03:45+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: product_expiry
+#: field:product.product,life_time:0
+msgid "Product lifetime"
+msgstr "Ciclo de vida producto"
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_from_product_template
+msgid "Ham"
+msgstr "Jamón"
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_lait_product_template
+msgid "Cow milk"
+msgstr "Leche de vaca"
+
+#. module: product_expiry
+#: model:ir.module.module,shortdesc:product_expiry.module_meta_information
+msgid "Products date of expiry"
+msgstr "Fecha de caducidad de productos"
+
+#. module: product_expiry
+#: constraint:product.template:0
+msgid ""
+"Error: The default UOM and the purchase UOM must be in the same category."
+msgstr ""
+"Error: La UdM por defecto y la UdM de compra deben estar en la misma "
+"categoría."
+
+#. module: product_expiry
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "¡XML no válido para la definición de la vista!"
+
+#. module: product_expiry
+#: help:stock.production.lot,life_date:0
+msgid "The date the lot may become dangerous and should not be consumed."
+msgstr ""
+
+#. module: product_expiry
+#: field:stock.production.lot,removal_date:0
+msgid "Removal Date"
+msgstr ""
+
+#. module: product_expiry
+#: model:ir.module.module,description:product_expiry.module_meta_information
+msgid ""
+"Track different dates on products and production lots:\n"
+" - end of life\n"
+" - best before date\n"
+" - removal date\n"
+" - alert date\n"
+"Used, for example, in food industries."
+msgstr ""
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_pain_product_template
+msgid "Bread"
+msgstr "Pan"
+
+#. module: product_expiry
+#: model:product.uom,name:product_expiry.product_uom_ltr
+#: model:product.uom.categ,name:product_expiry.product_uom_categ_vol
+msgid "LTR"
+msgstr "LTR"
+
+#. module: product_expiry
+#: view:product.product:0
+#: view:stock.production.lot:0
+msgid "Dates"
+msgstr "Fechas"
+
+#. module: product_expiry
+#: constraint:product.template:0
+msgid "Error: UOS must be in a different category than the UOM"
+msgstr "Error: La UdV debe estar en una categoría diferente que la UdM."
+
+#. module: product_expiry
+#: field:stock.production.lot,life_date:0
+msgid "End of Life Date"
+msgstr ""
+
+#. module: product_expiry
+#: field:stock.production.lot,use_date:0
+msgid "Best before Date"
+msgstr ""
+
+#. module: product_expiry
+#: help:stock.production.lot,use_date:0
+msgid "The date the lot starts deteriorating without becoming dangerous."
+msgstr ""
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_jambon_product_template
+msgid "French cheese Camenbert"
+msgstr "Queso Camembert francés"
+
+#. module: product_expiry
+#: help:product.product,removal_time:0
+msgid "The number of days before a production lot should be removed."
+msgstr ""
+
+#. module: product_expiry
+#: field:product.product,use_time:0
+msgid "Product usetime"
+msgstr "Tiempo de uso producto"
+
+#. module: product_expiry
+#: field:stock.production.lot,alert_date:0
+msgid "Alert Date"
+msgstr ""
+
+#. module: product_expiry
+#: field:product.product,removal_time:0
+msgid "Product removal time"
+msgstr "Fecha eliminación producto"
+
+#. module: product_expiry
+#: help:product.product,use_time:0
+msgid ""
+"The number of days before a production lot starts deteriorating without "
+"becoming dangerous."
+msgstr ""
+
+#. module: product_expiry
+#: constraint:product.product:0
+msgid "Error: Invalid ean code"
+msgstr "Error: Código EAN erróneo"
+
+#. module: product_expiry
+#: help:product.product,life_time:0
+msgid ""
+"The number of days before a production lot may become dangerous and should "
+"not be consumed."
+msgstr ""
+
+#. module: product_expiry
+#: help:stock.production.lot,removal_date:0
+msgid "The date the lot should be removed."
+msgstr ""
+
+#. module: product_expiry
+#: field:product.product,alert_time:0
+msgid "Product alert time"
+msgstr "Fecha alerta producto"
+
+#~ msgid "Alert date"
+#~ msgstr "Fecha alarma"
+
+#~ msgid ""
+#~ "Track different dates on products and lots. Used, for exampel, in food "
+#~ "industries: expiry date, alert date, date of removal, eso."
+#~ msgstr ""
+#~ "Gestiona distintas fechas para productos y lotes. Utilizado, por ejemplo, en "
+#~ "industria alimentaria: Fecha de caducidad, fecha de alarma, fecha de "
+#~ "eliminación, ..."
+
+#~ msgid "DLUO"
+#~ msgstr "Fecha caducidad"
+
+#~ msgid "Removal date"
+#~ msgstr "Fecha eliminación"
diff --git a/addons/product_expiry/i18n/fr.po b/addons/product_expiry/i18n/fr.po
new file mode 100644
index 00000000000..27fa25095b2
--- /dev/null
+++ b/addons/product_expiry/i18n/fr.po
@@ -0,0 +1,178 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * product_expiry
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.1\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-06-30 15:09+0000\n"
+"PO-Revision-Date: 2010-01-04 18:19+0000\n"
+"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\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-05-21 03:45+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: product_expiry
+#: field:product.product,life_time:0
+msgid "Product lifetime"
+msgstr "Durée limite de consommation"
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_from_product_template
+msgid "Ham"
+msgstr "Jambon"
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_lait_product_template
+msgid "Cow milk"
+msgstr "Lait de vache"
+
+#. module: product_expiry
+#: model:ir.module.module,shortdesc:product_expiry.module_meta_information
+msgid "Products date of expiry"
+msgstr "Dates de péremption des produits"
+
+#. module: product_expiry
+#: constraint:product.template:0
+msgid ""
+"Error: The default UOM and the purchase UOM must be in the same category."
+msgstr ""
+"Erreur: l'unité de mesure par défaut et l'unité de mesure d'achat doivent "
+"faire partie de la même catégorie"
+
+#. module: product_expiry
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "XML non valide pour l'architecture de la vue"
+
+#. module: product_expiry
+#: help:stock.production.lot,life_date:0
+msgid "The date the lot may become dangerous and should not be consumed."
+msgstr ""
+"La date à laquelle le lot peut devenir dangereux et ne doit plus être "
+"consommé."
+
+#. module: product_expiry
+#: field:stock.production.lot,removal_date:0
+msgid "Removal Date"
+msgstr "Date de retrait"
+
+#. module: product_expiry
+#: model:ir.module.module,description:product_expiry.module_meta_information
+msgid ""
+"Track different dates on products and production lots:\n"
+" - end of life\n"
+" - best before date\n"
+" - removal date\n"
+" - alert date\n"
+"Used, for example, in food industries."
+msgstr ""
+"Suit les différentes dates des produits et des lots de production\n"
+" - Date limite de consommation\n"
+" - DLUO\n"
+" - Date de retrait\n"
+" - Date d'alerte\n"
+"Utilisé par exemple dans les industries alimentaires"
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_pain_product_template
+msgid "Bread"
+msgstr "Pain"
+
+#. module: product_expiry
+#: model:product.uom,name:product_expiry.product_uom_ltr
+#: model:product.uom.categ,name:product_expiry.product_uom_categ_vol
+msgid "LTR"
+msgstr "LTR"
+
+#. module: product_expiry
+#: view:product.product:0
+#: view:stock.production.lot:0
+msgid "Dates"
+msgstr "Dates"
+
+#. module: product_expiry
+#: constraint:product.template:0
+msgid "Error: UOS must be in a different category than the UOM"
+msgstr ""
+"Erreur: l'unité de vente doit appartenir à une catégorie différente que "
+"l'unité de mesure"
+
+#. module: product_expiry
+#: field:stock.production.lot,life_date:0
+msgid "End of Life Date"
+msgstr "Date limite de consommation"
+
+#. module: product_expiry
+#: field:stock.production.lot,use_date:0
+msgid "Best before Date"
+msgstr "Date limite d'utilisation optimale"
+
+#. module: product_expiry
+#: help:stock.production.lot,use_date:0
+msgid "The date the lot starts deteriorating without becoming dangerous."
+msgstr ""
+"La date à laquelle le lot commencera à se déteriorer sans devenir dangereux."
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_jambon_product_template
+msgid "French cheese Camenbert"
+msgstr "Fromage Camembert Français"
+
+#. module: product_expiry
+#: help:product.product,removal_time:0
+msgid "The number of days before a production lot should be removed."
+msgstr ""
+"Le nombre de jours après lesquels un lot de production doit être retiré."
+
+#. module: product_expiry
+#: field:product.product,use_time:0
+msgid "Product usetime"
+msgstr "Durée limite d'utilisation optimale"
+
+#. module: product_expiry
+#: field:stock.production.lot,alert_date:0
+msgid "Alert Date"
+msgstr "Date d'alerte"
+
+#. module: product_expiry
+#: field:product.product,removal_time:0
+msgid "Product removal time"
+msgstr "Durée avant retrait"
+
+#. module: product_expiry
+#: help:product.product,use_time:0
+msgid ""
+"The number of days before a production lot starts deteriorating without "
+"becoming dangerous."
+msgstr ""
+"Le nombre de jours après lesquels un lot de production commencera à se "
+"déteriorer sans devenir dangereux"
+
+#. module: product_expiry
+#: constraint:product.product:0
+msgid "Error: Invalid ean code"
+msgstr "Erreur: code EAN invalide"
+
+#. module: product_expiry
+#: help:product.product,life_time:0
+msgid ""
+"The number of days before a production lot may become dangerous and should "
+"not be consumed."
+msgstr ""
+"Nombre de jours après lesquels un lot de production peut devenir dangereux "
+"et ne doit plus être consommé."
+
+#. module: product_expiry
+#: help:stock.production.lot,removal_date:0
+msgid "The date the lot should be removed."
+msgstr "La date à laquelle le lot doit être retiré."
+
+#. module: product_expiry
+#: field:product.product,alert_time:0
+msgid "Product alert time"
+msgstr "Durée avant alerte"
diff --git a/addons/product_expiry/i18n/fr_FR.po b/addons/product_expiry/i18n/fr_FR.po
new file mode 100644
index 00000000000..3aede86982b
--- /dev/null
+++ b/addons/product_expiry/i18n/fr_FR.po
@@ -0,0 +1,159 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * product_expiry
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.1\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-06-30 15:09:36+0000\n"
+"PO-Revision-Date: 2009-06-30 15:09:36+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: product_expiry
+#: field:product.product,life_time:0
+msgid "Product lifetime"
+msgstr "Durée limite de consommation"
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_from_product_template
+msgid "Ham"
+msgstr "Jambon"
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_lait_product_template
+msgid "Cow milk"
+msgstr "Lait de vache"
+
+#. module: product_expiry
+#: model:ir.module.module,shortdesc:product_expiry.module_meta_information
+msgid "Products date of expiry"
+msgstr "Dates de péremption des produits"
+
+#. module: product_expiry
+#: constraint:product.template:0
+msgid "Error: The default UOM and the purchase UOM must be in the same category."
+msgstr "Erreur: l'unité de mesure par défaut et l'unité de mesure d'achat doivent faire partie de la même catégorie"
+
+#. module: product_expiry
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "XML non valide pour l'architecture de la vue"
+
+#. module: product_expiry
+#: help:stock.production.lot,life_date:0
+msgid "The date the lot may become dangerous and should not be consumed."
+msgstr "La date à laquelle le lot peut devenir dangereux et ne doit plus être consommé."
+
+#. module: product_expiry
+#: field:stock.production.lot,removal_date:0
+msgid "Removal Date"
+msgstr "Date de retrait"
+
+#. module: product_expiry
+#: model:ir.module.module,description:product_expiry.module_meta_information
+msgid "Track different dates on products and production lots:\n"
+" - end of life\n"
+" - best before date\n"
+" - removal date\n"
+" - alert date\n"
+"Used, for example, in food industries."
+msgstr "Suit les différentes dates des produits et des lots de production\n"
+" - Date limite de consommation\n"
+" - DLUO\n"
+" - Date de retrait\n"
+" - Date d'alerte\n"
+"Utilisé par exemple dans les industries alimentaires"
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_pain_product_template
+msgid "Bread"
+msgstr "Pain"
+
+#. module: product_expiry
+#: model:product.uom,name:product_expiry.product_uom_ltr
+#: model:product.uom.categ,name:product_expiry.product_uom_categ_vol
+msgid "LTR"
+msgstr "LTR"
+
+#. module: product_expiry
+#: view:product.product:0
+#: view:stock.production.lot:0
+msgid "Dates"
+msgstr "Dates"
+
+#. module: product_expiry
+#: constraint:product.template:0
+msgid "Error: UOS must be in a different category than the UOM"
+msgstr "Erreur: l'unité de vente doit appartenir à une catégorie différente que l'unité de mesure"
+
+#. module: product_expiry
+#: field:stock.production.lot,life_date:0
+msgid "End of Life Date"
+msgstr "Date limite de consommation"
+
+#. module: product_expiry
+#: field:stock.production.lot,use_date:0
+msgid "Best before Date"
+msgstr "Date limite d'utilisation optimale"
+
+#. module: product_expiry
+#: help:stock.production.lot,use_date:0
+msgid "The date the lot starts deteriorating without becoming dangerous."
+msgstr "La date à laquelle le lot commencera à se déteriorer sans devenir dangereux."
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_jambon_product_template
+msgid "French cheese Camenbert"
+msgstr "Fromage Camembert Français"
+
+#. module: product_expiry
+#: help:product.product,removal_time:0
+msgid "The number of days before a production lot should be removed."
+msgstr "Le nombre de jours après lesquels un lot de production doit être retiré."
+
+#. module: product_expiry
+#: field:product.product,use_time:0
+msgid "Product usetime"
+msgstr "Durée limite d'utilisation optimale"
+
+#. module: product_expiry
+#: field:stock.production.lot,alert_date:0
+msgid "Alert Date"
+msgstr "Date d'alerte"
+
+#. module: product_expiry
+#: field:product.product,removal_time:0
+msgid "Product removal time"
+msgstr "Durée avant retrait"
+
+#. module: product_expiry
+#: help:product.product,use_time:0
+msgid "The number of days before a production lot starts deteriorating without becoming dangerous."
+msgstr "Le nombre de jours après lesquels un lot de production commencera à se déteriorer sans devenir dangereux"
+
+#. module: product_expiry
+#: constraint:product.product:0
+msgid "Error: Invalid ean code"
+msgstr "Erreur: code EAN invalide"
+
+#. module: product_expiry
+#: help:product.product,life_time:0
+msgid "The number of days before a production lot may become dangerous and should not be consumed."
+msgstr "Nombre de jours après lesquels un lot de production peut devenir dangereux et ne doit plus être consommé."
+
+#. module: product_expiry
+#: help:stock.production.lot,removal_date:0
+msgid "The date the lot should be removed."
+msgstr "La date à laquelle le lot doit être retiré."
+
+#. module: product_expiry
+#: field:product.product,alert_time:0
+msgid "Product alert time"
+msgstr "Durée avant alerte"
+
diff --git a/addons/product_expiry/i18n/product_expiry.pot b/addons/product_expiry/i18n/product_expiry.pot
new file mode 100644
index 00000000000..d56ff324485
--- /dev/null
+++ b/addons/product_expiry/i18n/product_expiry.pot
@@ -0,0 +1,154 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * product_expiry
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.1\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-06-30 15:09:08+0000\n"
+"PO-Revision-Date: 2009-06-30 15:09:08+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: product_expiry
+#: field:product.product,life_time:0
+msgid "Product lifetime"
+msgstr ""
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_from_product_template
+msgid "Ham"
+msgstr ""
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_lait_product_template
+msgid "Cow milk"
+msgstr ""
+
+#. module: product_expiry
+#: model:ir.module.module,shortdesc:product_expiry.module_meta_information
+msgid "Products date of expiry"
+msgstr ""
+
+#. module: product_expiry
+#: constraint:product.template:0
+msgid "Error: The default UOM and the purchase UOM must be in the same category."
+msgstr ""
+
+#. module: product_expiry
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: product_expiry
+#: help:stock.production.lot,life_date:0
+msgid "The date the lot may become dangerous and should not be consumed."
+msgstr ""
+
+#. module: product_expiry
+#: field:stock.production.lot,removal_date:0
+msgid "Removal Date"
+msgstr ""
+
+#. module: product_expiry
+#: model:ir.module.module,description:product_expiry.module_meta_information
+msgid "Track different dates on products and production lots:\n"
+" - end of life\n"
+" - best before date\n"
+" - removal date\n"
+" - alert date\n"
+"Used, for example, in food industries."
+msgstr ""
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_pain_product_template
+msgid "Bread"
+msgstr ""
+
+#. module: product_expiry
+#: model:product.uom,name:product_expiry.product_uom_ltr
+#: model:product.uom.categ,name:product_expiry.product_uom_categ_vol
+msgid "LTR"
+msgstr ""
+
+#. module: product_expiry
+#: view:product.product:0
+#: view:stock.production.lot:0
+msgid "Dates"
+msgstr ""
+
+#. module: product_expiry
+#: constraint:product.template:0
+msgid "Error: UOS must be in a different category than the UOM"
+msgstr ""
+
+#. module: product_expiry
+#: field:stock.production.lot,life_date:0
+msgid "End of Life Date"
+msgstr ""
+
+#. module: product_expiry
+#: field:stock.production.lot,use_date:0
+msgid "Best before Date"
+msgstr ""
+
+#. module: product_expiry
+#: help:stock.production.lot,use_date:0
+msgid "The date the lot starts deteriorating without becoming dangerous."
+msgstr ""
+
+#. module: product_expiry
+#: model:product.template,name:product_expiry.product_product_jambon_product_template
+msgid "French cheese Camenbert"
+msgstr ""
+
+#. module: product_expiry
+#: help:product.product,removal_time:0
+msgid "The number of days before a production lot should be removed."
+msgstr ""
+
+#. module: product_expiry
+#: field:product.product,use_time:0
+msgid "Product usetime"
+msgstr ""
+
+#. module: product_expiry
+#: field:stock.production.lot,alert_date:0
+msgid "Alert Date"
+msgstr ""
+
+#. module: product_expiry
+#: field:product.product,removal_time:0
+msgid "Product removal time"
+msgstr ""
+
+#. module: product_expiry
+#: help:product.product,use_time:0
+msgid "The number of days before a production lot starts deteriorating without becoming dangerous."
+msgstr ""
+
+#. module: product_expiry
+#: constraint:product.product:0
+msgid "Error: Invalid ean code"
+msgstr ""
+
+#. module: product_expiry
+#: help:product.product,life_time:0
+msgid "The number of days before a production lot may become dangerous and should not be consumed."
+msgstr ""
+
+#. module: product_expiry
+#: help:stock.production.lot,removal_date:0
+msgid "The date the lot should be removed."
+msgstr ""
+
+#. module: product_expiry
+#: field:product.product,alert_time:0
+msgid "Product alert time"
+msgstr ""
+
diff --git a/addons/product_expiry/product_expiry.py b/addons/product_expiry/product_expiry.py
new file mode 100644
index 00000000000..fd22ecff8b6
--- /dev/null
+++ b/addons/product_expiry/product_expiry.py
@@ -0,0 +1,91 @@
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import datetime
+from osv import fields, osv
+import pooler
+import time
+
+class stock_production_lot(osv.osv):
+ _name = 'stock.production.lot'
+ _inherit = 'stock.production.lot'
+ def name_get(self, cr, uid, ids, context=None):
+ if not len(ids):
+ return []
+ result = []
+ for line in self.browse(cr, uid, ids, context):
+ if line.life_date:
+ result.append((line.id, (line.name or '')+' ('+line.life_date+')'))
+ else:
+ result.append((line.id, line.name))
+ return result
+
+
+ def _get_date(dtype):
+ """Return a function to compute the limit date for this type"""
+ def calc_date(self, cr, uid, context=None):
+ """Compute the limit date for a given date"""
+ if context is None:
+ context = {}
+ if not context.get('product_id', False):
+ date = False
+ else:
+ product = pooler.get_pool(cr.dbname).get('product.product').browse(
+ cr, uid, context['product_id'])
+ duration = getattr(product, dtype)
+ # set date to False when no expiry time specified on the product
+ date = duration and (datetime.datetime.today()
+ + datetime.timedelta(days=duration))
+ return date and date.strftime('%Y-%m-%d')
+ return calc_date
+
+ _columns = {
+ 'life_date': fields.date('End of Life Date',
+ help='The date the lot may become dangerous and should not be consumed.'),
+ 'use_date': fields.date('Best before Date',
+ help='The date the lot starts deteriorating without becoming dangerous.'),
+ 'removal_date': fields.date('Removal Date',
+ help='The date the lot should be removed.'),
+ 'alert_date': fields.date('Alert Date'),
+ }
+
+ _defaults = {
+ # 'life_date': _get_date('life_time'),
+ # 'use_date': _get_date('use_time'),
+ # 'removal_date': _get_date('removal_time'),
+ # 'alert_date': _get_date('alert_time'),
+ }
+stock_production_lot()
+
+class product_product(osv.osv):
+ _inherit = 'product.product'
+ _name = 'product.product'
+ _columns = {
+ 'life_time': fields.integer('Product lifetime',
+ help='The number of days before a production lot may become dangerous and should not be consumed.'),
+ 'use_time': fields.integer('Product usetime',
+ help='The number of days before a production lot starts deteriorating without becoming dangerous.'),
+ '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'),
+ }
+product_product()
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/product_expiry/product_expiry_demo.xml b/addons/product_expiry/product_expiry_demo.xml
new file mode 100644
index 00000000000..b5e8adc6b07
--- /dev/null
+++ b/addons/product_expiry/product_expiry_demo.xml
@@ -0,0 +1,128 @@
+<openerp>
+ <data noupdate="1">
+
+ <record id="product_uom_categ_vol" model="product.uom.categ">
+ <field name="name">LTR</field>
+ </record>
+ <record id="product_uom_ltr" model="product.uom">
+ <field name="category_id" ref="product_uom_categ_vol"/>
+ <field name="name">LTR</field>
+ </record>
+
+ <record id="product_product_jambon" model="product.product">
+ <field name="supply_method">buy</field>
+ <field name="list_price">7.0</field>
+ <field name="standard_price">5.0</field>
+ <field name="uom_id" ref="product.product_uom_unit"/>
+ <field name="uom_po_id" ref="product.product_uom_unit"/>
+ <field name="uos_id" ref="product.product_uom_kgm" />
+ <field name="uos_coeff">3</field>
+ <field name="name">French cheese Camenbert</field>
+ <field name="life_time">15</field>
+ <field name="use_time">10</field>
+ <field name="removal_time">6</field>
+ <field name="alert_time">5</field>
+ <field name="default_code">JKB</field>
+ <field name="ean13">3307630302014</field>
+ <field name="categ_id" search="[]" model="product.category"/>
+ </record>
+ <record model="product.packaging">
+ <field name="name">box of 10</field>
+ <field name="qty">12</field>
+ <field name="ul" ref="product.product_ul_box" />
+ <field name="ul_qty">6</field>
+ <field name="rows">4</field>
+ <field name="product_id" ref="product_product_jambon" />
+ <field name="ean">12345678901234</field>
+ <field name="weight">10</field>
+ <field name="weight_ul">240</field>
+ </record>
+
+ <record id="product_product_from" model="product.product">
+ <field name="supply_method">buy</field>
+ <field name="list_price">8.0</field>
+ <field name="standard_price">6.0</field>
+ <field name="uom_id" ref="product.product_uom_unit"/>
+ <field name="uom_po_id" ref="product.product_uom_unit"/>
+ <field name="uos_id" ref="product.product_uom_kgm" />
+ <field name="uos_coeff">0.5</field>
+ <field name="name">Ham</field>
+ <field name="life_time">30</field>
+ <field name="use_time">25</field>
+ <field name="removal_time">20</field>
+ <field name="alert_time">19</field>
+ <field name="default_code">FKS</field>
+ <field name="ean13">3307631101876</field>
+ <field name="categ_id" search="[]" model="product.category"/>
+ </record>
+ <record model="product.packaging">
+ <field name="name">Box of 5</field>
+ <field name="qty">12</field>
+ <field name="ul" ref="product.product_ul_box" />
+ <field name="ul_qty">6</field>
+ <field name="rows">4</field>
+ <field name="product_id" ref="product_product_from" />
+ <field name="ean">12345678901234</field>
+ <field name="weight">10</field>
+ <field name="weight_ul">240</field>
+ </record>
+
+ <record id="product_product_pain" model="product.product">
+ <field name="supply_method">buy</field>
+ <field name="list_price">8.0</field>
+ <field name="standard_price">6.0</field>
+ <field name="uom_id" ref="product.product_uom_unit"/>
+ <field name="uom_po_id" ref="product.product_uom_unit"/>
+ <field name="uos_id" ref="product.product_uom_kgm" />
+ <field name="uos_coeff">0.5</field>
+ <field name="name">Bread</field>
+ <field name="life_time">30</field>
+ <field name="use_time">25</field>
+ <field name="removal_time">20</field>
+ <field name="alert_time">19</field>
+ <field name="default_code">PKB</field>
+ <field name="ean13">3307631102323</field>
+ <field name="categ_id" search="[]" model="product.category"/>
+ </record>
+ <record model="product.packaging">
+ <field name="name">Bag of 2</field>
+ <field name="qty">6</field>
+ <field name="ul" ref="product.product_ul_box" />
+ <field name="ul_qty">6</field>
+ <field name="rows">4</field>
+ <field name="product_id" ref="product_product_pain" />
+ <field name="ean">12345678901234</field>
+ <field name="weight">10</field>
+ <field name="weight_ul">240</field>
+ </record>
+
+ <record id="product_product_lait" model="product.product">
+ <field name="supply_method">buy</field>
+ <field name="list_price">8.0</field>
+ <field name="standard_price">6.0</field>
+ <field name="uom_id" ref="product.product_uom_unit"/>
+ <field name="uom_po_id" ref="product.product_uom_unit"/>
+ <field name="uos_id" ref="product_uom_ltr" />
+ <field name="uos_coeff">0.5</field>
+ <field name="name">Cow milk</field>
+ <field name="life_time">30</field>
+ <field name="use_time">25</field>
+ <field name="removal_time">20</field>
+ <field name="alert_time">19</field>
+ <field name="default_code">LEX</field>
+ <field name="ean13">3307630302045</field>
+ <field name="categ_id" search="[]" model="product.category"/>
+ </record>
+ <record model="product.packaging">
+ <field name="name">Boxes of 1 liter</field>
+ <field name="qty">4</field>
+ <field name="ul" ref="product.product_ul_box" />
+ <field name="ul_qty">6</field>
+ <field name="rows">4</field>
+ <field name="product_id" ref="product_product_lait" />
+ <field name="ean">12345678901234</field>
+ <field name="weight">10</field>
+ <field name="weight_ul">240</field>
+ </record>
+ </data>
+</openerp>
diff --git a/addons/product_expiry/product_expiry_view.xml b/addons/product_expiry/product_expiry_view.xml
new file mode 100644
index 00000000000..245a4a2c600
--- /dev/null
+++ b/addons/product_expiry/product_expiry_view.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" ?>
+<openerp>
+ <data>
+ <record model="ir.ui.view" id="view_move_form_expiry">
+ <field name="name">stock.production.lot.form</field>
+ <field name="model">stock.production.lot</field>
+ <field name="inherit_id" ref="stock.view_production_lot_form" />
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <field name="date" position="after">
+ <separator string="Dates" colspan="4" />
+ <field name="life_date" />
+ <field name="use_date" />
+ <field name="removal_date" />
+ <field name="alert_date" />
+ </field>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="view_product_form_expiry">
+ <field name="name">product.normal.form</field>
+ <field name="model">product.product</field>
+ <field name="inherit_id" ref="product.product_normal_form_view" />
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <notebook position="inside">
+ <page string="Dates">
+ <separator string="Dates" colspan="4" />
+ <field name="life_time" />
+ <field name="use_time" />
+ <field name="removal_time" />
+ <field name="alert_time" />
+ </page>
+ </notebook>
+ </field>
+ </record>
+ </data>
+</openerp>
+
diff --git a/addons/product_expiry/report/__init__.py b/addons/product_expiry/report/__init__.py
new file mode 100644
index 00000000000..a6006ed47b3
--- /dev/null
+++ b/addons/product_expiry/report/__init__.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import report_stock
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/product_expiry/report/report_stock.py b/addons/product_expiry/report/report_stock.py
new file mode 100644
index 00000000000..bef64eaffa6
--- /dev/null
+++ b/addons/product_expiry/report/report_stock.py
@@ -0,0 +1,121 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import osv, fields
+from tools.translate import _
+import tools
+from tools.sql import drop_view_if_exists
+
+class stock_report_prodlots(osv.osv):
+ _name = "stock.report.prodlots1"
+ _description = "Stock report by production lots"
+ _auto = False
+ _columns = {
+ 'name': fields.float('Quantity', readonly=True),
+ 'location_id': fields.many2one('stock.location', 'Location', readonly=True, select=True),
+ 'product_id': fields.many2one('product.product', 'Product', readonly=True, select=True),
+ 'prodlot_id': fields.many2one('stock.production.lot', 'Production lot', readonly=True, select=True),
+ 'life_date': fields.date('End of Life Date',
+ help='The date the lot may become dangerous and should not be consumed.'),
+ 'use_date': fields.date('Best before Date',
+ help='The date the lot starts deteriorating without becoming dangerous.'),
+ 'removal_date': fields.date('Removal Date',
+ help='The date the lot should be removed.'),
+ 'alert_date': fields.date('Alert Date'),
+
+ }
+
+ def init(self, cr):
+ drop_view_if_exists(cr, 'stock_report_prodlots1')
+ cr.execute("""
+ create or replace view stock_report_prodlots1 as (
+ select max(id) as id,
+ location_id,
+ product_id,
+ prodlot_id,
+ life_date,
+ use_date,
+ removal_date,
+ alert_date,
+ sum(qty) as name
+ from (
+ select -max(sm.id) as id,
+ sm.location_id,
+ sm.product_id,
+ sm.prodlot_id,
+ spl.life_date,
+ spl.use_date,
+ spl.removal_date,
+ spl.alert_date,
+ -sum(sm.product_qty /uo.factor) as qty
+ from stock_move as sm
+ left join stock_location sl
+ on (sl.id = sm.location_id)
+ left join stock_production_lot spl
+ on (sm.prodlot_id=spl.id)
+ left join product_uom uo
+ on (uo.id=sm.product_uom)
+ where state = 'done'
+ group by sm.location_id, sm.product_id, sm.product_uom, sm.prodlot_id,
+ spl.life_date,
+ spl.use_date,
+ spl.removal_date,
+ spl.alert_date
+
+ union all
+ select max(sm.id) as id,
+ sm.location_dest_id as location_id,
+ sm.product_id,
+ sm.prodlot_id,
+ spl.life_date,
+ spl.use_date,
+ spl.removal_date,
+ spl.alert_date,
+ sum(sm.product_qty /uo.factor) as qty
+ from stock_move as sm
+ left join stock_location sl
+ on (sl.id = sm.location_dest_id)
+ left join stock_production_lot spl
+ on (sm.prodlot_id=spl.id)
+ left join product_uom uo
+ on (uo.id=sm.product_uom)
+ where sm.state = 'done'
+ group by sm.location_dest_id, sm.product_id, sm.product_uom, sm.prodlot_id,
+ spl.life_date,
+ spl.use_date,
+ spl.removal_date,
+ spl.alert_date
+
+ ) as report
+ group by location_id, product_id, prodlot_id,
+ life_date,
+ use_date,
+ removal_date,
+ alert_date
+ )""")
+
+ def unlink(self, cr, uid, ids, context={}):
+ raise osv.except_osv(_('Error !'), _('You cannot delete any record!'))
+
+
+stock_report_prodlots()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/product_expiry/report/report_stock_view.xml b/addons/product_expiry/report/report_stock_view.xml
new file mode 100644
index 00000000000..68198e87dd3
--- /dev/null
+++ b/addons/product_expiry/report/report_stock_view.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record id="view_stock_report_prodlots_filter" model="ir.ui.view">
+ <field name="name">stock.report.prodlots.filter</field>
+ <field name="model">stock.report.prodlots1</field>
+ <field name="type">search</field>
+ <field name="arch" type="xml">
+ <search string="Search Location">
+ <group col="10" colspan="4">
+ <filter icon="terp-go-home" name="internal_locations" string="Internal Locations" domain="[('location_id.usage', '=', 'internal')]" help="Internal Locations"/>
+ <filter icon="terp-go-home" string="Customer Locations" domain="[('location_id.usage', '=', 'customer')]" help="Customer Locations" />
+ <filter icon="terp-go-home" string="Supplier Locations" domain="[('location_id.usage', '=', 'supplier')]" help="Supplier Locations" />
+ <separator orientation="vertical"/>
+ <field name="location_id"/>
+ <field name="product_id"/>
+ <newline/>
+ <field name="use_date" />
+ <field name="life_date" string="End of Life" />
+ <field name="alert_date" />
+ <field name="removal_date" string="Removal D." />
+ </group>
+ <newline/>
+ <group expand="1" string="Group By..." colspan="4" col="10">
+ <filter string="Location" icon="terp-go-home" domain="[]" context="{'group_by':'location_id'}"/>
+ <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+
+ <record id="stock_report_prodlots_form" model="ir.ui.view">
+ <field name="name">stock.report.prodlots.view</field>
+ <field name="model">stock.report.prodlots1</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Stock by Lots">
+ <field name="location_id"/>
+ <field name="product_id"/>
+ <field name="prodlot_id" groups="base.group_extended"/>
+ <field name="name"/>
+ <field name="use_date" />
+ <field name="life_date" string="End of Life" />
+ <field name="alert_date" />
+ <field name="removal_date" string="Removal D." />
+ </form>
+ </field>
+ </record>
+
+ <record id="stock_report_prodlots_tree" model="ir.ui.view">
+ <field name="name">stock.report.prodlots.view</field>
+ <field name="model">stock.report.prodlots1</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Stock by Lots">
+ <field name="location_id"/>
+ <field name="product_id"/>
+ <field name="prodlot_id" groups="base.group_extended"/>
+ <field name="name"/>
+ <field name="use_date" />
+ <field name="life_date" string="End of Life" />
+ <field name="alert_date" />
+ <field name="removal_date" string="Removal D." />
+ </tree>
+ </field>
+ </record>
+
+ <record id="stock_report_prodlots_graph" model="ir.ui.view">
+ <field name="name">stock.report.prodlots.view</field>
+ <field name="model">stock.report.prodlots1</field>
+ <field name="type">graph</field>
+ <field name="arch" type="xml">
+ <graph string="Stock by Lots" type="bar">
+ <field name="product_id"/>
+ <field name="name"/>
+ </graph>
+ </field>
+ </record>
+
+
+ <record id="stock.action_stock_report_prodlots_form" model="ir.actions.act_window">
+ <field name="name">Inventory by Location</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">stock.report.prodlots1</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="context">{'full':'1','search_default_internal_locations':1}</field>
+ <field name="search_view_id" ref="view_stock_report_prodlots_filter" />
+ </record>
+
+ <act_window
+ domain="[('product_id','=',active_id)]"
+ id="stock.act_product_product_2_stock_report_prodlots"
+ name="Stock by Lots"
+ res_model="stock.report.prodlots1"
+ src_model="product.product"
+ groups="base.group_extended"/>
+
+
+ </data>
+</openerp>
diff --git a/addons/product_expiry/wizard/__init__.py b/addons/product_expiry/wizard/__init__.py
new file mode 100644
index 00000000000..2b1b55ed6e0
--- /dev/null
+++ b/addons/product_expiry/wizard/__init__.py
@@ -0,0 +1 @@
+import stock_partial
diff --git a/addons/product_expiry/wizard/stock_partial.py b/addons/product_expiry/wizard/stock_partial.py
new file mode 100644
index 00000000000..94adaa63452
--- /dev/null
+++ b/addons/product_expiry/wizard/stock_partial.py
@@ -0,0 +1,80 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import fields, osv
+from service import web_services
+from tools.misc import UpdateableStr, UpdateableDict
+from tools.translate import _
+import netsvc
+import pooler
+import time
+import datetime
+import wizard
+
+class stock_partial_lot_picking(osv.osv_memory):
+ _inherit = "stock.partial.picking"
+ _name = "stock.partial.picking"
+ _description = "Partial Picking"
+
+ def do_partial(self, cr, uid, ids, context):
+ res = super(stock_partial_lot_picking, self).do_partial(cr, uid, ids, context=context)
+ prodlot_obj = self.pool.get('stock.production.lot')
+ pick_obj = self.pool.get('stock.picking')
+ picking_ids = context.get('active_ids', False)
+ partial = self.browse(cr, uid, ids[0], context)
+ for pick in pick_obj.browse(cr, uid, picking_ids):
+ for m in pick.move_lines:
+ for pick in pick_obj.browse(cr, uid, picking_ids):
+ for m in pick.move_lines:
+ res = {}
+ if (pick.type == 'in') and m.prodlot_id:
+ if not m.prodlot_id.life_date:
+ date_life = (datetime.datetime.strptime(partial.date, '%Y-%m-%d %H:%M:%S') + datetime.timedelta(days=m.product_id.life_time))
+ res['life_date'] = date_life.strftime('%Y-%m-%d')
+ if not m.prodlot_id.use_date:
+ date_use = (datetime.datetime.strptime(partial.date, '%Y-%m-%d %H:%M:%S') + datetime.timedelta(days=m.product_id.use_time))
+ res['use_date'] = date_use.strftime('%Y-%m-%d')
+ if not m.prodlot_id.removal_date:
+ date_removal = (datetime.datetime.strptime(partial.date, '%Y-%m-%d %H:%M:%S') + datetime.timedelta(days=m.product_id.removal_time))
+ res['removal_date'] = date_removal.strftime('%Y-%m-%d')
+ if not m.prodlot_id.alert_date:
+ date_alert = (datetime.datetime.strptime(partial.date, '%Y-%m-%d %H:%M:%S') + datetime.timedelta(days=m.product_id.alert_time))
+ res['alert_date'] = date_alert.strftime('%Y-%m-%d')
+ prodlot_obj.write(cr, uid, [m.prodlot_id.id], res)
+ return res
+stock_partial_lot_picking()
+
+class stock_move_split_lines_exist(osv.osv_memory):
+ _name = "stock.move.split.lines.exist"
+ _inherit = "stock.move.split.lines.exist"
+ _columns = {
+ 'date': fields.date('Expiry Date'),
+ }
+ def on_change_product(self, cr, uid, ids, product_id):
+ if not product_id:
+ return {'value':{'date': False}}
+ day_life = self.pool.get('product.product').browse(cr, uid, product_id).life_time
+ date_life = (datetime.datetime.now() + datetime.timedelta(days=day_life))
+ return {'value':{'date': date_life.strftime('%Y-%m-%d')
+}}
+
+
+stock_move_split_lines_exist()
diff --git a/addons/product_expiry/wizard/stock_partial_view.xml b/addons/product_expiry/wizard/stock_partial_view.xml
new file mode 100644
index 00000000000..ca3554ea900
--- /dev/null
+++ b/addons/product_expiry/wizard/stock_partial_view.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<openerp>
+ <data>
+
+ <record id="view_split_in_lots" model="ir.ui.view">
+ <field name="name">Split in lots</field>
+ <field name="model">stock.move.split</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="stock.view_split_in_lots"/>
+ <field name="arch" type="xml">
+ <data>
+ <xpath expr="//form/group/field[@name='line_exist_ids']/tree/field[@name='prodlot_id']" position="replace">
+ <field name="prodlot_id" on_change="on_change_product(parent.product_id)"/>
+ </xpath>
+ <xpath expr="//form/group/field[@name='line_exist_ids']/tree/field[@name='quantity']" position="after">
+ <field name="date"/>
+ </xpath>
+ </data>
+ </field>
+ </record>
+ </data>
+</openerp>
diff --git a/addons/product_manufacturer/__init__.py b/addons/product_manufacturer/__init__.py
new file mode 100644
index 00000000000..3c3dce04d51
--- /dev/null
+++ b/addons/product_manufacturer/__init__.py
@@ -0,0 +1,23 @@
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+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
new file mode 100644
index 00000000000..5d7e8922520
--- /dev/null
+++ b/addons/product_manufacturer/__openerp__.py
@@ -0,0 +1,34 @@
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+{
+ "name" : "Products Attributes & Manufacturers",
+ "version" : "1.0",
+ "author" : "Tiny",
+ "category" : "Enterprise Specific Modules/Industries",
+ "depends" : ["base", "account", "product", "stock"],
+ "init_xml" : [],
+ "demo_xml" : [],
+ "description": "A module that add manufacturers and attributes on the product form",
+ "update_xml" : ["security/ir.model.access.csv","product_manufacturer_view.xml"],
+ "active": False,
+ "installable": True
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/product_manufacturer/i18n/fr_BE.po b/addons/product_manufacturer/i18n/fr_BE.po
new file mode 100644
index 00000000000..2fc936e9dfc
--- /dev/null
+++ b/addons/product_manufacturer/i18n/fr_BE.po
@@ -0,0 +1,103 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * product_electronic
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.6\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"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: 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/product_manufacturer.pot b/addons/product_manufacturer/i18n/product_manufacturer.pot
new file mode 100644
index 00000000000..2fc936e9dfc
--- /dev/null
+++ b/addons/product_manufacturer/i18n/product_manufacturer.pot
@@ -0,0 +1,103 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * product_electronic
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.6\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"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: 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/product_manufacturer.py b/addons/product_manufacturer/product_manufacturer.py
new file mode 100644
index 00000000000..d77ab518efe
--- /dev/null
+++ b/addons/product_manufacturer/product_manufacturer.py
@@ -0,0 +1,59 @@
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import fields,osv
+
+class product_product(osv.osv):
+ _inherit = 'product.product'
+ _name = 'product.product'
+ _columns = {
+ 'attribute_ids': fields.one2many('product.manufacturer.attribute', 'product_id', 'Attributes'),
+ 'manufacturer_ids': fields.one2many('res.partner.manufacturer', 'product_id', 'Manufacturers'),
+ }
+product_product()
+
+class res_partner_manufacturer(osv.osv):
+ _name = 'res.partner.manufacturer'
+ _rec_name = 'manufacturer_id'
+ _columns = {
+ 'manufacturer_id' : fields.many2one('res.partner', 'Manufacturer'),
+ 'country_id' : fields.many2one('res.country', 'Country'),
+ 'authorized' : fields.boolean('Authorized'),
+ 'product_id': fields.many2one('product.product', 'Product', ondelete='cascade'),
+ }
+ _defaults = {
+ 'authorized': lambda *a: True,
+ }
+
+res_partner_manufacturer()
+
+class product_attribute(osv.osv):
+ _name = "product.manufacturer.attribute"
+ _description = "Product attributes"
+ _columns = {
+ 'name' : fields.char('Attribute', size=64, required=True),
+ 'value' : fields.char('Value', size=64),
+ 'product_id': fields.many2one('product.product', 'Product', ondelete='cascade'),
+ }
+product_attribute()
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/product_manufacturer/product_manufacturer_view.xml b/addons/product_manufacturer/product_manufacturer_view.xml
new file mode 100644
index 00000000000..cfd7f23ae8d
--- /dev/null
+++ b/addons/product_manufacturer/product_manufacturer_view.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" ?>
+<openerp>
+ <data>
+
+ <record model="ir.ui.view" id="view_product_form_expiry">
+ <field name="name">product.normal.form</field>
+ <field name="model">product.product</field>
+ <field name="inherit_id" ref="product.product_normal_form_view" />
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <notebook position="inside">
+ <page string="Manufacturing Data">
+ <separator string="Manufacturing data" colspan="4" />
+ <field name="manufacturer_ids" colspan="4" nolabel="1" widget="one2many_list"/>
+
+ <separator string="Attributes" colspan="4"/>
+ <field name="attribute_ids" colspan="4" nolabel="1" widget="one2many_list" />
+ </page>
+ </notebook>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="product_manufacturer_attribute_tree_view">
+ <field name="name">product.manufacturer.attribute.tree</field>
+ <field name="model">product.manufacturer.attribute</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Product Template Name">
+ <field name="name"/>
+ <field name="value"/>
+ </tree>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="product_manufacturer_attribute_form_view">
+ <field name="name">product.manufacturer.attribute.form</field>
+ <field name="model">product.manufacturer.attribute</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Product Template Name">
+ <field name="name" select="1"/>
+ <field name="value" select="1"/>
+ </form>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="product_manufacturer_manufact_tree_view">
+ <field name="name">res.partner.manufacturer.tree</field>
+ <field name="model">res.partner.manufacturer</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Manufacturers" editable="top">
+ <field name="manufacturer_id"/>
+ <field name="country_id"/>
+ <field name="authorized"/>
+ </tree>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="product_manufacturer_manufa_form_view">
+ <field name="name">res.partner.manufacturer.form</field>
+ <field name="model">res.partner.manufacturer</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Manufacturers">
+ <field name="manufacturer_id" colspan="4"/>
+ <field name="country_id"/>
+ <field name="authorized"/>
+ </form>
+ </field>
+ </record>
+ </data>
+</openerp>
+
diff --git a/addons/product_manufacturer/security/ir.model.access.csv b/addons/product_manufacturer/security/ir.model.access.csv
new file mode 100644
index 00000000000..9a65d0355ff
--- /dev/null
+++ b/addons/product_manufacturer/security/ir.model.access.csv
@@ -0,0 +1,5 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_product_manufacturer_attribute","product.manufacturer.attribute","model_product_manufacturer_attribute","product.group_uos",1,0,0,0
+"access_product_manufacturer_attribute_manager","product.manufacturer.attribute","model_product_manufacturer_attribute","product.group_product_manager",1,1,1,1
+"access_partner_manufacturer","res.partner.manufacturer","model_res_partner_manufacturer","product.group_uos",1,0,0,0
+"access_partner_manufacturer_manager","res.partner.manufacturer","model_res_partner_manufacturer","product.group_uos",1,1,1,1
diff --git a/addons/project/security/ir.model.access.csv b/addons/project/security/ir.model.access.csv
index 1a2fac38c6a..502c8af0596 100644
--- a/addons/project/security/ir.model.access.csv
+++ b/addons/project/security/ir.model.access.csv
@@ -19,9 +19,6 @@
"access_task_by_days","task.by.days","model_task_by_days","project.group_project_user",1,1,1,1
"access_close_task","close.task","model_close_task","project.group_project_user",1,1,1,1
"access_close_task_manager","close.task manager","model_close_task","project.group_project_manager",1,1,1,1
-"access_resource_calendar_project_user","resource.resource.calendar project user","resource.model_resource_calendar","project.group_project_user",1,0,0,0
-"access_resource_calendar_project_manager","resource.resource.calendar project manager","resource.model_resource_calendar","project.group_project_manager",1,1,1,1
-"access_fiscalyear_sequence_project_manager","account.sequence.fiscalyear project manager","account.model_account_sequence_fiscalyear","project.group_project_manager",1,1,0,0
"access_partner_task user","base.res.partner user","base.model_res_partner","project.group_project_user",1,0,0,0
"access_partner_task manager","base.res.partner manager","base.model_res_partner","project.group_project_manager",1,0,0,0
"access_partner_address_task user","base.res.partner.address user","base.model_res_partner_address","project.group_project_user",1,0,0,0
diff --git a/addons/project_planning/project_planning_view.xml b/addons/project_planning/project_planning_view.xml
index d7d2880714c..1d55d9db6c4 100644
--- a/addons/project_planning/project_planning_view.xml
+++ b/addons/project_planning/project_planning_view.xml
@@ -164,10 +164,10 @@
<group col="8" colspan="4">
<filter icon="terp-check" string="Current Plannings" domain="[('date_from','&lt;=',time.strftime('%%Y-%%m-%%d')),('date_to','&gt;=',time.strftime('%%Y-%%m-%%d'))]" help="Current Plannings"/>
<separator orientation="vertical"/>
- <field name="name">
- <field name="code">
- <field name="user_id">
- <field name="state">
+ <field name="name"/>
+ <field name="code"/>
+ <field name="user_id"/>
+ <field name="state"/>
</group>
</search>
</field>
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index 8086a169d9d..3a7277a4766 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -93,7 +93,6 @@
<field name="price_unit"/>
<field name="price_subtotal" groups="base.group_extended"/>
<field name="invoiced"/>
- <field name="state"/>
</tree>
<!-- default form view -->
</field>
diff --git a/addons/purchase/report/purchase_report_view.xml b/addons/purchase/report/purchase_report_view.xml
index b2bdf840c3d..2d18ae18b36 100644
--- a/addons/purchase/report/purchase_report_view.xml
+++ b/addons/purchase/report/purchase_report_view.xml
@@ -112,6 +112,33 @@
</field>
</record>
+ <record model="ir.ui.view" id="view_purchase_order_qty_amount_graph">
+ <field name="name">purchase.order.qty.amount.graph</field>
+ <field name="model">purchase.report</field>
+ <field name="type">graph</field>
+ <field name="arch" type="xml">
+ <graph string="Total Qty and Amount by month" type="bar">
+ <field name="month"/>
+ <field name="quantity" operator="+"/>
+ <field name="price_total" operator="+"/>
+ </graph>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="view_purchase_order_by_user_graph">
+ <field name="name">purchase.order.by.user.graph</field>
+ <field name="model">purchase.report</field>
+ <field name="type">graph</field>
+ <field name="arch" type="xml">
+ <graph string="Total Orders Lines by User per month" orientation="vertical" type="bar">
+ <field name="month" />
+ <field name="nbr" operator="+"/>
+ <field name="user_id" group="True" />
+ </graph>
+ </field>
+ </record>
+
+
<record id="action_purchase_order_report_all" model="ir.actions.act_window">
<field name="name">Purchase Orders</field>
<field name="res_model">purchase.report</field>
@@ -120,6 +147,23 @@
<field name="context">{'search_default_month':1,'search_default_group_partner_id':1,'search_default_group_product_id': 1, 'search_default_orders': 1, 'group_by_no_leaf':1,'group_by':[]}</field>
</record>
+ <record id="action_purchase_order_report_graph" model="ir.actions.act_window">
+ <field name="name">Total Qty and Amount by month</field>
+ <field name="res_model">purchase.report</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">graph,tree</field>
+ <field name="view_id" ref="view_purchase_order_qty_amount_graph"></field>
+ </record>
+
+ <record id="action_purchase_order_by_user_all" model="ir.actions.act_window">
+ <field name="name">Total Orders by User per month</field>
+ <field name="res_model">purchase.report</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">graph,tree</field>
+ <field name="view_id" ref="view_purchase_order_by_user_graph"></field>
+ </record>
+
+
<menuitem id="base.next_id_73" name="Reporting" parent="base.menu_purchase_root" sequence="8"/>
<menuitem action="action_purchase_order_report_all" id="menu_action_purchase_order_report_all" parent="base.next_id_73" sequence="3"/>
diff --git a/addons/resource/security/ir.model.access.csv b/addons/resource/security/ir.model.access.csv
index f52b43adcaa..83e06121937 100644
--- a/addons/resource/security/ir.model.access.csv
+++ b/addons/resource/security/ir.model.access.csv
@@ -2,4 +2,5 @@
"access_resource_calendar","resource.calendar","model_resource_calendar","base.group_system",1,1,1,1
"access_resource_calendar_week","resource.calendar.week","model_resource_calendar_week","base.group_system",1,1,1,1
"access_resource_resource","resource.resource","model_resource_resource","base.group_system",1,1,1,1
+"access_resource_resource_all","resource.resource all","model_resource_resource",,1,0,0,0
"access_resource_calendar_leaves","resource.calendar.leaves","model_resource_calendar_leaves","base.group_system",1,1,1,1
diff --git a/addons/sale/report/sale_report.py b/addons/sale/report/sale_report.py
index 03c14c9576d..7cfc84427da 100644
--- a/addons/sale/report/sale_report.py
+++ b/addons/sale/report/sale_report.py
@@ -100,7 +100,7 @@ class sale_report(osv.osv):
u.name as uom_name,
sum(l.product_uom_qty * u.factor) as product_uom_qty,
sum(l.product_uom_qty*l.price_unit) as price_total,
- (sum(l.product_uom_qty*l.price_unit)/sum(l.product_uom_qty * u.factor))::decimal(16,2) as price_average,
+ (sum(l.product_uom_qty*l.price_unit)/sum(l.product_uom_qty * u.factor)*count(l.product_id))::decimal(16,2) as price_average,
pt.categ_id, l.order_id
from
sale_order_line l
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 9b879d4c136..0d28969c816 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -200,7 +200,7 @@
<field name="amount_untaxed" sum="Untaxed amount"/>
<field name="amount_tax"/>
<field name="amount_total"/>
- <button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/>
+ <button name="button_dummy" states="draft" string="" type="object" icon="gtk-execute"/>
<button name="%(action_view_sale_advance_payment_inv)d" string="Deposit" type="action" icon="gtk-execute"/>
</group>
<group col="13" colspan="4">
@@ -287,7 +287,6 @@
<field name="res_model">sale.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,graph</field>
- <field name="context">{"search_default_user_id":uid}</field>
<field name="search_view_id" ref="view_sales_order_filter"/>
</record>
<menuitem action="action_order_form" id="menu_sale_order" parent="base.menu_sales" sequence="3"/>
diff --git a/addons/sale/test/sale_procurement.yml b/addons/sale/test/sale_procurement.yml
index 33ba22667ec..2475c7bdceb 100644
--- a/addons/sale/test/sale_procurement.yml
+++ b/addons/sale/test/sale_procurement.yml
@@ -2,9 +2,7 @@
In order to test the sale order working with procurements I will create some
products with different supply method and procurement method.
-
- I create two products.
--
- I create one product Table.
+ I create one product Table as MTO.
-
!record {model: product.product, id: product_product_table0}:
categ_id: product.cat1
@@ -15,7 +13,7 @@
uom_id: product.product_uom_unit
uom_po_id: product.product_uom_unit
-
- I create another product Wood.
+ I create another product Wood as MTS.
-
!record {model: product.product, id: product_product_wood0}:
categ_id: product.cat1
@@ -26,7 +24,7 @@
uom_id: product.product_uom_kgm
uom_po_id: product.product_uom_kgm
-
- I define Minimum stock rule for my stockable product wood
+ I define Minimum stock rule for my stockable product Wood (qty between 10 and 15)
-
!record {model: stock.warehouse.orderpoint, id: stock_warehouse_orderpoint_op0}:
company_id: base.main_company
@@ -77,19 +75,16 @@
proc_ids = self.search(cr, uid, [('state','=','confirmed')])
assert proc_ids, _('No Procurements!')
-
- The scheduler runs.
+ I run the scheduler.
-
!function {model: procurement.order, name: run_scheduler}:
- model: procurement.order
search: "[('state','=','confirmed')]"
-
I check that the procurement for the product table is in exception state.
- As my product's supply method is produce and mrp module is yet not installed.
+ As my product's supply method is produce and the BoM is not defined.
-
!python {model: procurement.order}: |
from tools.translate import _
- proc_ids = self.search(cr, uid, [('state','=','exception')])
- assert proc_ids, _('No Procurements are in exception state!')
-
-
- \ No newline at end of file
+ proc_ids = self.search(cr, uid, [('state','=','exception'),('product_id','=',ref('sale.product_product_table0'))])
+ assert proc_ids, _('No Procurements are in exception state for the table!')
diff --git a/addons/sale/test/shipping_manual_sale_order.yml b/addons/sale/test/shipping_manual_sale_order.yml
index c030a80c64a..1f5bc5fe10a 100644
--- a/addons/sale/test/shipping_manual_sale_order.yml
+++ b/addons/sale/test/shipping_manual_sale_order.yml
@@ -1,5 +1,5 @@
-
- In order to test the sale module in the Open-ERP, I need to configure details regarding product & customer.
+ In order to test the sale module, I need to configure details regarding product & customer.
-
I am going to sell my Mobile products to the customer with name Cleartrail
-
diff --git a/addons/sale_order_dates/__init__.py b/addons/sale_order_dates/__init__.py
new file mode 100644
index 00000000000..ed4a8b0a952
--- /dev/null
+++ b/addons/sale_order_dates/__init__.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import sale
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/sale_order_dates/__openerp__.py b/addons/sale_order_dates/__openerp__.py
new file mode 100644
index 00000000000..e8a2cf6e6b6
--- /dev/null
+++ b/addons/sale_order_dates/__openerp__.py
@@ -0,0 +1,44 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+
+{
+ 'name': 'Customer & Sales',
+ 'version': '1.0',
+ 'category': 'Generic Modules/CRM & SRM',
+ 'description': """Sale Orders Dates""",
+ 'author': 'Tiny',
+ 'website': 'http://www.openerp.com',
+ 'depends': ["sale"],
+ 'init_xml': [
+ ],
+
+ 'update_xml': [
+ 'sale_view.xml',
+ ],
+ 'demo_xml': [
+ ],
+ 'test': [],
+ 'installable': True,
+ 'active': False,
+}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/sale_order_dates/sale.py b/addons/sale_order_dates/sale.py
new file mode 100644
index 00000000000..1b4bad360e6
--- /dev/null
+++ b/addons/sale_order_dates/sale.py
@@ -0,0 +1,68 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import fields, osv
+import time
+from mx import DateTime
+class sale_order_dates(osv.osv):
+ _inherit = 'sale.order'
+ _name = 'sale.order'
+
+ def _get_effective_date(self, cr, uid, ids, name, arg, context={}):
+ res = {}
+ dates_list = []
+ for order in self.browse(cr, uid, ids):
+ dates_list = []
+ for pick in order.picking_ids:
+ dates_list.append(pick.date)
+ if dates_list:
+ res[order.id] = min(dates_list)
+ else:
+ res[order.id] =False
+ return res
+
+ def _get_commitment_date(self, cr, uid, ids, name, arg, context={}):
+ res = {}
+ dates_list = []
+ for order in self.browse(cr, uid, ids):
+ dates_list = []
+ for line in order.order_line:
+ dt=DateTime.strptime(order.date_order, '%Y-%m-%d') + DateTime.RelativeDateTime(days=line.delay or 0.0)
+ dt_s = dt.strftime('%Y-%m-%d')
+ dates_list.append(dt_s)
+ res[order.id] = min(dates_list)
+ return res
+
+ _columns = {
+ 'commitment_date': fields.function(_get_commitment_date, method=True,store=True, type='date', string='Commitment Date'),
+ 'requested_date': fields.date('Requested Date'),
+ 'effective_date': fields.function(_get_effective_date, method=True, type='date', store=True,string='Effective Date'),
+ }
+sale_order_dates()
+"""
+ - date_commitment: min(fields.function using delay on SO lines +
+ date_order)
+ - date_requested: fields.date
+ - Effective date: fields.function the first picking done.
+"""
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/sale_order_dates/sale_view.xml b/addons/sale_order_dates/sale_view.xml
new file mode 100644
index 00000000000..7f5edf811ef
--- /dev/null
+++ b/addons/sale_order_dates/sale_view.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<openerp>
+ <data>
+
+ <record id="view_sale_orderfor" model="ir.ui.view">
+ <field name="name">sale.order.form.inherit5</field>
+ <field name="model">sale.order</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="sale.view_order_form"/>
+ <field name="arch" type="xml">
+ <field name="date_confirm" position="after">
+ <separator string="Dates" colspan="4"/>
+ <field name="commitment_date"/>
+ <newline/>
+ <field name="effective_date"/>
+ <field name="requested_date"/>
+ </field>
+ </field>
+ </record>
+
+
+ </data>
+</openerp>
diff --git a/addons/stock/__openerp__.py b/addons/stock/__openerp__.py
index 32adb5e84d2..f0a03f9f2a5 100644
--- a/addons/stock/__openerp__.py
+++ b/addons/stock/__openerp__.py
@@ -50,6 +50,7 @@ Thanks to the double entry management, the inventory controlling is powerful and
"wizard/stock_invoice_onshipping_view.xml",
"wizard/stock_inventory_merge_view.xml",
"wizard/stock_location_product_view.xml",
+ "wizard/stock_splitinto_view.xml",
"wizard/stock_inventory_line_split_view.xml",
"wizard/stock_change_standard_price_view.xml",
"wizard/stock_traceability_view.xml",
diff --git a/addons/stock/i18n/nl.po b/addons/stock/i18n/nl.po
index b3085199524..25a0c9e5358 100644
--- a/addons/stock/i18n/nl.po
+++ b/addons/stock/i18n/nl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-17 10:48+0000\n"
-"Last-Translator: Marcel van der Boom (HS-Development BV) <mrb@hsdev.com>\n"
+"PO-Revision-Date: 2010-06-14 13:39+0000\n"
+"Last-Translator: Marcel van der Boom (HS-Development BV) <marcel@hsdev.com>\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-04-17 03:55+0000\n"
+"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: stock
@@ -44,13 +44,13 @@ msgstr "terp-account"
#. module: stock
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Ongeldige modelnaam in de definitie van de actie."
#. module: stock
#: model:ir.module.module,shortdesc:stock.module_meta_information
#: model:ir.ui.menu,name:stock.menu_stock_root
msgid "Inventory Management"
-msgstr ""
+msgstr "Voorraadbeheer"
#. module: stock
#: selection:stock.location,icon:0
@@ -70,7 +70,7 @@ msgstr "STOCK_MEDIA_FORWARD"
#. module: stock
#: rml:lot.location:0
msgid "Total :"
-msgstr ""
+msgstr "Totaal :"
#. module: stock
#: selection:stock.location,icon:0
@@ -81,7 +81,7 @@ msgstr "STOCK_ZOOM_100"
#: rml:lot.stock.overview:0
#: rml:lot.stock.overview_all:0
msgid "UoM"
-msgstr ""
+msgstr "Meeteenheid"
#. module: stock
#: model:ir.actions.wizard,name:stock.return_picking
@@ -109,7 +109,7 @@ msgstr "Paklijst"
#: rml:lot.stock.overview:0
#: rml:lot.stock.overview_all:0
msgid "Amount"
-msgstr ""
+msgstr "Hoeveelheid"
#. module: stock
#: view:stock.picking:0
@@ -141,8 +141,7 @@ msgstr "Relatie"
#. module: stock
#: help:product.product,track_incoming:0
msgid "Force to use a Production Lot during receptions"
-msgstr ""
-"Forceer om een productie-eenheid te gebruiken tijdens goederenontvangst."
+msgstr "Forceer het gebruik van een batchnummer bij goederenontvangst"
#. module: stock
#: field:stock.move,move_history_ids:0
@@ -155,7 +154,7 @@ msgstr "Notatie"
#: field:stock.production.lot.revision,lot_id:0
#: field:stock.report.prodlots,prodlot_id:0
msgid "Production lot"
-msgstr "Seriegrootte"
+msgstr "Batchnummer"
#. module: stock
#: selection:stock.location,icon:0
@@ -306,7 +305,7 @@ msgstr "STOCK_FLOPPY"
#. module: stock
#: view:stock.production.lot.revision:0
msgid "Production Lot Revisions"
-msgstr "Herziening productie-eenheden"
+msgstr "Batchnummer herzieningen"
#. module: stock
#: view:stock.location:0
@@ -371,7 +370,7 @@ msgstr "Leveringslocatie"
#: model:ir.actions.act_window,name:stock.action_production_lot_form
#: model:ir.ui.menu,name:stock.menu_action_production_lot_form
msgid "Production Lots"
-msgstr "Productie-eenheden"
+msgstr "Batchnummers"
#. module: stock
#: rml:stock.picking.list:0
@@ -425,9 +424,7 @@ msgstr "Locatieadres"
#. module: stock
#: help:stock.move,prodlot_id:0
msgid "Production lot is used to put a serial number on the production"
-msgstr ""
-"Productie-eenheid wordt gebruikt om een serienummer aan de productie toe te "
-"voegen."
+msgstr "Batchnummers worden gebruikt om productie-eenheden te identificeren."
#. module: stock
#: model:stock.location,name:stock.stock_location_13
@@ -493,8 +490,7 @@ msgstr "Voorraadlocatie"
#. module: stock
#: help:product.product,track_production:0
msgid "Force to use a Production Lot during production order"
-msgstr ""
-"Forceer deze op een productie-eenheid te gebruiken tijdens de productieorder"
+msgstr "Forceer het gebruik van een batchnummer bij productieorders"
#. module: stock
#: selection:stock.location,icon:0
@@ -537,7 +533,7 @@ msgstr "Leveringskalender"
#. module: stock
#: field:product.product,track_incoming:0
msgid "Track Incomming Lots"
-msgstr "Traceer inkomende pakketten"
+msgstr "Traceer binnenkomende batches"
#. module: stock
#: model:ir.actions.act_window,name:stock.act_stock_product_location_open
@@ -552,7 +548,7 @@ msgstr "STOCK_SAVE_AS"
#. module: stock
#: model:ir.model,name:stock.model_stock_report_prodlots
msgid "Stock report by production lots"
-msgstr "Voorraadrapport met productie-eenheden"
+msgstr "Voorraadrapport met batchnummers"
#. module: stock
#: field:stock.location,stock_virtual:0
@@ -598,7 +594,7 @@ msgstr "Nieuw ontvangstbon aanmaken"
#. module: stock
#: wizard_field:stock.move.track,init,quantity:0
msgid "Quantity per lot"
-msgstr "Aantal per eenheid"
+msgstr "Aantal per batch"
#. module: stock
#: model:ir.actions.act_window,name:stock.action_move_form2
@@ -661,7 +657,7 @@ msgstr "Verwachte verzenddatum"
#. module: stock
#: rml:stock.picking.list:0
msgid "Shipping Address :"
-msgstr ""
+msgstr "Afleveradres :"
#. module: stock
#: view:stock.tracking:0
@@ -727,7 +723,7 @@ msgstr "Van"
#. module: stock
#: rml:stock.picking.list:0
msgid "weight"
-msgstr ""
+msgstr "gewicht"
#. module: stock
#: rml:stock.picking.list:0
@@ -742,7 +738,7 @@ msgstr "Factuurcontrole"
#. module: stock
#: model:ir.model,name:stock.model_stock_production_lot_revision
msgid "Production lot revisions"
-msgstr "Heroverweeg productie-eenheden"
+msgstr "Batchnummer herzieningen"
#. module: stock
#: view:stock.picking:0
@@ -1554,7 +1550,7 @@ msgstr "Revisiedatum"
#. module: stock
#: rml:stock.picking.list:0
msgid "Lot"
-msgstr "Overdoos"
+msgstr "Batch"
#. module: stock
#: wizard_view:inventory.merge.stock.zero,init:0
@@ -1628,7 +1624,7 @@ msgstr "Leveringsvoorwaarden"
#: rml:lot.stock.overview:0
#: rml:lot.stock.overview_all:0
msgid "Total:"
-msgstr ""
+msgstr "Totaal:"
#. module: stock
#: selection:stock.location,icon:0
@@ -1731,7 +1727,7 @@ msgstr "Magazijnen"
#. module: stock
#: help:product.product,track_outgoing:0
msgid "Force to use a Production Lot during deliveries"
-msgstr "Forceer om productie-eenheiden te gebruiken om te leveren"
+msgstr "Forceer het gebruik van batchnummers bij leveringen"
#. module: stock
#: view:stock.picking:0
@@ -1790,7 +1786,7 @@ msgstr "Product eenh."
#: rml:lot.stock.overview:0
#: rml:lot.stock.overview_all:0
msgid "Variants"
-msgstr ""
+msgstr "Varianten"
#. module: stock
#: field:stock.location,posx:0
@@ -1870,7 +1866,7 @@ msgstr "STOCK_MEDIA_PAUSE"
#. module: stock
#: view:product.product:0
msgid "Lots"
-msgstr "Aantallen"
+msgstr "Batches"
#. module: stock
#: selection:stock.picking,move_type:0
@@ -1880,7 +1876,7 @@ msgstr "Allen te gelijk"
#. module: stock
#: field:product.product,track_outgoing:0
msgid "Track Outging Lots"
-msgstr "Uitgaande voorraadeenheden"
+msgstr "Traceer uitgaande batches"
#. module: stock
#: model:ir.actions.act_window,name:stock.action_stock_line_date
@@ -1903,7 +1899,7 @@ msgstr "STOCK_FIND"
#. module: stock
#: view:stock.inventory:0
msgid "Lot Inventory"
-msgstr "Partijvoorraad"
+msgstr "Batchvoorraad"
#. module: stock
#: help:stock.location,chained_auto_packing:0
@@ -2088,7 +2084,7 @@ msgstr "terp-project"
#: model:ir.ui.menu,name:stock.menu_stock_report_prodlots
#: view:stock.report.prodlots:0
msgid "Stock by Lots"
-msgstr "In voorraad per verpakkingseenheid"
+msgstr "Voorraad per batch"
#. module: stock
#: field:stock.move,auto_validate:0
@@ -2199,7 +2195,7 @@ msgstr "STOCK_REVERT_TO_SAVED"
#. module: stock
#: field:product.product,track_production:0
msgid "Track Production Lots"
-msgstr "Traceerd productie-eenheden"
+msgstr "Traceer productiebatches"
#. module: stock
#: view:stock.picking:0
@@ -2232,7 +2228,7 @@ msgstr "stock.picking.move.wizard"
#: field:stock.move,prodlot_id:0
#: view:stock.production.lot:0
msgid "Production Lot"
-msgstr "Productie-eenheid."
+msgstr "Productie batch"
#. module: stock
#: model:ir.ui.menu,name:stock.menu_traceability
diff --git a/addons/stock/i18n/pl.po b/addons/stock/i18n/pl.po
index 117d90e683a..aade911d099 100644
--- a/addons/stock/i18n/pl.po
+++ b/addons/stock/i18n/pl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-06-13 15:17+0000\n"
+"PO-Revision-Date: 2010-06-14 14:56+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\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-06-14 03:42+0000\n"
+"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: stock
@@ -86,7 +86,7 @@ msgstr "JM"
#. module: stock
#: model:ir.actions.wizard,name:stock.return_picking
msgid "Return packing"
-msgstr "Lista przesunięć zwrotnych"
+msgstr "Zwrot"
#. module: stock
#: field:product.category,property_stock_journal:0
@@ -103,7 +103,7 @@ msgstr "Wypełnij inwentaryzację dla podanej strefy mag."
#: view:stock.picking:0
#: field:stock.picking.move.wizard,picking_id:0
msgid "Packing list"
-msgstr "Lista przesunięć"
+msgstr "Pobranie"
#. module: stock
#: rml:lot.stock.overview:0
@@ -206,7 +206,7 @@ msgstr "Wykonaj paczkę (przesunięcie)"
#. module: stock
#: wizard_view:stock.partial_picking,end2:0
msgid "Packing result"
-msgstr "Rezultat listy przesunięć"
+msgstr "Rezultat pobrania"
#. module: stock
#: selection:stock.location,icon:0
@@ -708,7 +708,7 @@ msgstr "terp-stock"
#. module: stock
#: rml:stock.picking.list:0
msgid "Packing List:"
-msgstr "Lista przesunięć:"
+msgstr "Pobranie:"
#. module: stock
#: selection:stock.location,icon:0
@@ -748,7 +748,7 @@ msgstr "Wersja partii produkcyjnej"
#. module: stock
#: view:stock.picking:0
msgid "Packing Done"
-msgstr "Listę przesunięć wykonano"
+msgstr "Pobranie wykonane"
#. module: stock
#: selection:stock.move,state:0
@@ -762,7 +762,7 @@ msgstr "Oczekiwanie"
#: model:ir.ui.menu,name:stock.menu_action_picking_tree7
#: model:ir.ui.menu,name:stock.menu_picking_waiting
msgid "Available Packing"
-msgstr "Dostępne listy przesunięć"
+msgstr "Dostępne pobrania"
#. module: stock
#: model:ir.model,name:stock.model_stock_warehouse
@@ -815,7 +815,7 @@ msgstr ""
#: model:ir.ui.menu,name:stock.menu_action_picking_all
#: wizard_field:stock.picking.make,init,pickings:0
msgid "Packing"
-msgstr "Listy przesunięć"
+msgstr "Pobrania"
#. module: stock
#: selection:stock.location,icon:0
@@ -988,7 +988,7 @@ msgstr ""
#. module: stock
#: wizard_view:stock.partial_picking,end2:0
msgid "The packing has been successfully made !"
-msgstr "Lista przesunięć zostało poprawnie wykonana !"
+msgstr "Pobranie wykonano poprawnie !"
#. module: stock
#: field:stock.move,address_id:0
@@ -1158,13 +1158,13 @@ msgstr ""
#. module: stock
#: view:stock.picking:0
msgid "Input Packing List"
-msgstr "Lista przesunięć wchodzących"
+msgstr "Przyjęcie zewnętrzne"
#. module: stock
#: model:ir.model,name:stock.model_stock_picking
#: field:stock.move,picking_id:0
msgid "Packing List"
-msgstr "Lista przesunięć"
+msgstr "Pobranie"
#. module: stock
#: selection:stock.location,icon:0
@@ -1205,7 +1205,7 @@ msgstr ""
#. module: stock
#: selection:stock.picking,invoice_state:0
msgid "Not from Packing"
-msgstr "Nie z listy przesunięć"
+msgstr "Nie z pobrania"
#. module: stock
#: view:stock.location:0
@@ -1299,7 +1299,7 @@ msgstr "Metoda dostawy"
#. module: stock
#: model:ir.actions.wizard,name:stock.partial_picking
msgid "Partial packing"
-msgstr "Częściowa lista przesunięć"
+msgstr "Pobranie częściowe"
#. module: stock
#: selection:stock.location,icon:0
@@ -1370,7 +1370,7 @@ msgstr "Strefa magazynowa"
#. module: stock
#: field:stock.picking,invoice_state:0
msgid "Invoice Status"
-msgstr "Stan faktury"
+msgstr "Fakturowanie"
#. module: stock
#: rml:lot.location:0
@@ -1572,7 +1572,7 @@ msgstr "Ilość (JS)"
#: model:ir.actions.act_window,name:stock.action_picking_tree5
#: model:ir.ui.menu,name:stock.menu_action_picking_tree5
msgid "Packing to Process"
-msgstr "Listy przesunięć do obróbki"
+msgstr "Pobrania do wykonania"
#. module: stock
#: selection:stock.location,icon:0
@@ -1588,12 +1588,12 @@ msgstr "Ustaw jako dostępne"
#: model:ir.actions.wizard,name:stock.make_picking
#: wizard_view:stock.picking.make,init:0
msgid "Make packing"
-msgstr "Wykonaj listę przesunięć"
+msgstr "Wykonaj pobranie"
#. module: stock
#: field:stock.picking,backorder_id:0
msgid "Back Order"
-msgstr "Zamówienie zaległe"
+msgstr "Pobranie częściowe"
#. module: stock
#: selection:stock.location,icon:0
@@ -1770,7 +1770,7 @@ msgstr "Zwrot"
#. module: stock
#: field:stock.picking,auto_picking:0
msgid "Auto-Packing"
-msgstr "Auto-przesunięcie"
+msgstr "Auto-pobranie"
#. module: stock
#: field:stock.move,product_uos:0
@@ -2172,7 +2172,7 @@ msgstr ""
#: model:ir.ui.menu,name:stock.menu_action_picking_tree3
#: model:ir.ui.menu,name:stock.menu_action_picking_tree8
msgid "Confirmed Packing Waiting Availability"
-msgstr "Potwierdzone listy przesunięć oczekujące na dostępność"
+msgstr "Potwierdzone pobrania oczekujące na dostępność"
#. module: stock
#: field:stock.location,posy:0
@@ -2257,7 +2257,7 @@ msgstr "Data zamówienia"
#. module: stock
#: selection:stock.invoice_onshipping,init,type:0
msgid "Supplier Invoice"
-msgstr "Faktura dostawcy"
+msgstr "Faktura od dostawcy"
#. module: stock
#: model:ir.actions.act_window,name:stock.action_location_form
diff --git a/addons/stock/report/packing.rml b/addons/stock/report/packing.rml
new file mode 100644
index 00000000000..c2cceb26238
--- /dev/null
+++ b/addons/stock/report/packing.rml
@@ -0,0 +1,317 @@
+<?xml version="1.0"?>
+<document filename="test.pdf">
+ <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
+ <pageTemplate id="first">
+ <frame id="first" x1="0.0" y1="57.0" width="538" height="728"/>
+ </pageTemplate>
+ </template>
+ <stylesheet>
+ <blockTableStyle id="Standard_Outline">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table_Address_detail">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table_Title_String">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Header_Order_Reference_Tbl">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Content_Order_Reference_Table">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Move_Line_Header">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Move_Line_Contect_Assign_State">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Move_Line_Content_Other_State">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
+ </blockTableStyle>
+ <initialize>
+ <paraStyle name="all" alignment="justify"/>
+ </initialize>
+ <paraStyle name="Standard" fontName="Times-Roman"/>
+ <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Caption" fontName="Times-Italic" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="Index" fontName="Times-Roman"/>
+ <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="Table Contents" fontName="Times-Roman"/>
+ <paraStyle name="Footer" fontName="Times-Roman"/>
+ <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
+ <paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
+ <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_5cm_Above_Space" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_1cm_above_space" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="3.0" spaceAfter="0.0"/>
+ </stylesheet>
+ <images/>
+ <story>
+ <para style="terp_default_8">[[ repeatIn(objects,'picking') ]] </para>
+ <para style="terp_default_9">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="269.0,269.0" style="Table_Address_detail">
+ <tr>
+ <td>
+ <para style="terp_default_9">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ (picking.address_id and picking.address_id.partner_id and picking.address_id.partner_id.title) or '' ]] [[ picking.address_id and picking.address_id.partner_id and picking.address_id.partner_id.name ]]</para>
+ <para style="terp_default_9">[[ picking.address_id and picking.address_id.street or '' ]]</para>
+ <para style="terp_default_9">[[ picking.address_id and picking.address_id.zip or '' ]] [[ picking.address_id and picking.address_id.city or '']]</para>
+
+ <para style="terp_default_2">
+ <font color="white"> </font>
+ </para>
+ <para style="terp_default_2">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <para style="terp_default_9">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">[[ picking.sale_id and picking.sale_id.partner_shipping_id and 'Shipping Address :' or removeParentNode('para') ]] </para>
+ <para style="terp_default_9">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]] </para>
+ <para style="terp_default_9">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.street) or '' ]] </para>
+ <para style="terp_default_9">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.zip) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.city) or '' ]] [[ (picking.address_id and picking.address_id.state_id and picking.address_id.state_id.name) or '' ]] </para>
+ <para style="terp_default_9">[[ (picking.address_id and picking.address_id.country_id and picking.address_id.country_id.name) or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_5cm_Above_Space">
+ <font color="white"> </font>
+ </para>
+ <para style="terp_default_5cm_Above_Space">
+ <font color="white"> </font>
+ </para>
+ <para style="terp_default_5cm_Above_Space">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="538.0" style="Table_Title_String">
+ <tr>
+ <td>
+ <para style="terp_header">Packing List: [[ picking.name ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_5cm_Above_Space">
+ <font color="white"> </font>
+ </para>
+ <para style="terp_default_5cm_Above_Space">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="123.0,134.0,133.0,134.0" style="Header_Order_Reference_Tbl">
+ <tr>
+ <td>
+ <para style="terp_tblheader_General_Centre">Order(Origin)</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Centre">Recipient</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Centre">Expected Shipping Date </para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Centre"> Weight</para>
+ </td>
+ </tr>
+ </blockTable>
+ <blockTable colWidths="123.0,134.0,133.0,134.0" style="Content_Order_Reference_Table">
+ <tr>
+ <td>
+ <para style="terp_default_Centre_8">[[ picking.origin ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Centre_8">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]] </para>
+ </td>
+ <td>
+ <para style="terp_default_Centre_8">[[ formatLang(picking.min_date,date_time = True) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Centre_8">[[ 'weight' in picking._columns.keys() and picking.weight or '']] </para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_5cm_Above_Space">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="196.0,68.0,56.0,61.0,73.0,70.0" repeatRows="1" style="Move_Line_Header">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Description</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Centre">Tracking Lot</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Centre">Lot</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">State</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Centre">Quantity</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Location</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_2">
+ <font color="white"> </font>
+ </para>
+ <para style="terp_default_2">
+ <font color="white"> </font>
+ </para>
+ <section>
+ <para style="terp_default_8">[[ repeatIn([line for line in picking.move_lines if (line.state == 'assigned' )],'move_lines') ]]</para>
+ <blockTable colWidths="197.0,68.0,61.0,57,46.0,26.0,74.0" style="Move_Line_Contect_Assign_State">
+ <tr>
+ <td>
+ <para style="terp_default_9">[ [[ move_lines.product_id.default_code ]] ] [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']] </para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ move_lines.tracking_id and move_lines.tracking_id.name or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ move_lines.state ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ move_lines.product_qty ]] </para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ move_lines.product_uom.name ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ (move_lines.location_id and move_lines.location_id.name) or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_2">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <para style="terp_default_5cm_Above_Space">[[ (line.state == 'done' or line.state == 'confirmed') and removeParentNode('para') ]]</para>
+ <para style="terp_default_Bold_9">Non Assigned Products: [[ ( line.state == 'assigned' or line.state == 'done' or line.state == 'confirmed' ) and removeParentNode('para') ]]</para>
+ <para style="terp_default_1cm_above_space">[[ (line.state == 'done' or line.state == 'confirmed') and removeParentNode('para') ]]</para>
+ <section>
+ <para style="terp_default_8">[[ repeatIn([line for line in picking.move_lines if (line.state != 'assigned' )],'move_lines') ]]</para>
+ <blockTable colWidths="257.0,57.0,62.0,46.0,26.0,74.0" style="Move_Line_Content_Other_State">
+ <tr>
+ <td>
+ <para style="terp_default_9">[ [[ move_lines.product_id.default_code ]] ] [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ move_lines.state ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ move_lines.product_qty ]] </para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ move_lines.product_uom.name ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ (move_lines.location_id and move_lines.location_id.name) or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_2">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <para style="terp_default_9">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ </story>
+</document>
diff --git a/addons/stock/report/picking.py b/addons/stock/report/picking.py
index 8ab08a5016c..4dcbac4b9a0 100644
--- a/addons/stock/report/picking.py
+++ b/addons/stock/report/picking.py
@@ -32,4 +32,5 @@ class picking(report_sxw.rml_parse):
})
report_sxw.report_sxw('report.stock.picking.list','stock.picking','addons/stock/report/picking.rml',parser=picking)
+report_sxw.report_sxw('report.stock.packing.list','stock.picking','addons/stock/report/packing.rml',parser=picking)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/stock/report/report_stock_move.py b/addons/stock/report/report_stock_move.py
index 4d70466c031..4d70466c031 100755..100644
--- a/addons/stock/report/report_stock_move.py
+++ b/addons/stock/report/report_stock_move.py
diff --git a/addons/stock/report/report_stock_move_view.xml b/addons/stock/report/report_stock_move_view.xml
index 74243debbdc..e8ec9ed2983 100755..100644
--- a/addons/stock/report/report_stock_move_view.xml
+++ b/addons/stock/report/report_stock_move_view.xml
@@ -84,7 +84,6 @@
<separator orientation="vertical"/>
<field name="product_id"/>
<field name="partner_id" context="{'contact_display':'partner'}"/>
- <field name="date_planned"/>
</group>
<newline/>
<group expand="0" string="Group By...">
@@ -97,6 +96,8 @@
<filter string="Dest. Location" name="dest_location" icon="terp-gtk-jump-to-ltr" context="{'group_by':'location_dest_id'}"/>
<filter string="State" name="group_state" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
+ <filter string="Company" name="group_state" icon="terp-stock_effects-object-colorize" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
+ <separator orientation="vertical"/>
<filter string="Day" icon="terp-go-month" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'date_planned'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
@@ -105,7 +106,10 @@
<group expand="0" string="Extended options..." groups="base.group_extended">
<field name="location_id" widget = "selection"/>
<field name="location_dest_id" widget = "selection"/>
- <field name="state"/>
+ <separator orientation="vertical"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ <newline/>
+ <field name="date_planned"/>
</group>
</search>
@@ -169,7 +173,7 @@
domain="[('state','=','done')]"
help="Analysis on real stock."/>
- <filter string="Virtual"
+ <filter string="Future"
icon="terp-camera_test"
domain="[('state','in',('assigned','done','waiting','confirmed'))]"
help = "Analysis including future operations."/>
diff --git a/addons/stock/report/report_stock_picking.py b/addons/stock/report/report_stock_picking.py
new file mode 100644
index 00000000000..b6e2a3d3373
--- /dev/null
+++ b/addons/stock/report/report_stock_picking.py
@@ -0,0 +1,110 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+from osv import fields,osv
+import tools
+
+class report_stock_picking(osv.osv):
+ _name = "report.stock.picking"
+ _description = "Stock Picking Report"
+ _auto = False
+ _columns = {
+ 'year': fields.char('Year',size=64,required=False, readonly=True),
+ 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
+ ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
+ 'day': fields.char('Day', size=128, readonly=True),
+ 'nbr': fields.integer('# of Lines', readonly=True),
+ 'nbp': fields.integer('# of Picking', readonly=True),
+ 'partner_id':fields.many2one('res.partner', 'Partner', readonly=True),
+ 'product_qty': fields.float('# of Products', readonly=True),
+ 'product_uos_qty': fields.float('# of Products', readonly=True),
+ 'product_id': fields.many2one('product.product', 'Product', readonly=True),
+ 'date': fields.date('Date', readonly=True),
+ 'avg_days_to_deliver': fields.float('Avg Days to Deliver', digits=(16,2), readonly=True, group_operator="avg",
+ help="Number of Avg Days to deliver"),
+ 'state': fields.selection([('draft', 'Draft'),('auto', 'Waiting'),('confirmed', 'Confirmed'),('assigned', 'Available'),('done', 'Done'),('cancel', 'Cancelled')], 'State'),
+ 'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal'), ('delivery', 'Delivery')], 'Shipping Type', required=True),
+ 'company_id': fields.many2one('res.company', 'Company', readonly=True),
+ 'invoice_state': fields.selection([
+ ("invoiced", "Invoiced"),
+ ("2binvoiced", "To Be Invoiced"),
+ ("none", "Not from Picking")], "Invoice Status",readonly=True),
+ 'min_date': fields.date('Expected Date',help="Expected date for Picking. Default it takes current date"),
+ 'order_date': fields.date('Order Date', help="Date of Order"),
+ 'date_done': fields.date('Date Done', help="Date of completion"),
+ 'location_id': fields.many2one('stock.location', 'Source Location', help="Sets a location if you produce at a fixed location. This can be a partner location if you subcontract the manufacturing operations."),
+ 'location_dest_id': fields.many2one('stock.location', 'Dest. Location', help="Location where the system will stock the finished products."),
+ 'max_date': fields.date('Max.Expected Date'),
+ 'product_uos': fields.many2one('product.uom', 'Product UOS'),
+ 'product_uom': fields.many2one('product.uom', 'Product UOM'),
+ }
+ def init(self, cr):
+ tools.drop_view_if_exists(cr, 'report_stock_picking')
+ cr.execute("""
+ create or replace view report_stock_picking as (
+ select
+ min(sm.id) as id,
+ date_trunc('day',sp.min_date) as min_date,
+ date_trunc('day',sp.date) as order_date,
+ date_trunc('day',sp.date_done) as date_done,
+ date_trunc('day',sp.max_date) as max_date,
+ to_char(sp.create_date, 'YYYY') as year,
+ to_char(sp.create_date, 'MM') as month,
+ to_char(sp.create_date, 'YYYY-MM-DD') as day,
+ sp.address_id as partner_id,
+ to_date(to_char(sp.create_date, 'MM-dd-YYYY'),'MM-dd-YYYY') as date,
+ count(sm.id) as nbr,
+ count(distinct sp.id) as nbp,
+ sum(sm.product_qty) as product_qty,
+ sum(sm.product_uos_qty) as product_uos_qty,
+ sm.product_id as product_id,
+ sm.location_dest_id as location_dest_id,
+ sm.location_id as location_id,
+ sp.type,
+ sm.product_uos,
+ sm.product_uom,
+ sp.invoice_state,
+ sp.company_id as company_id,
+ avg(extract('epoch' from (sp.date_done-sp.create_date)))/(3600*24) as avg_days_to_deliver,
+ sp.state
+ from stock_move as sm
+ left join stock_picking as sp ON (sm.picking_id=sp.id)
+ group by sp.type,
+ sp.create_date,
+ sp.address_id,
+ sm.product_id,
+ to_char(sp.create_date, 'YYYY'),
+ sm.location_dest_id,
+ sm.location_id,
+ to_char(sp.create_date, 'MM'),
+ to_char(sp.create_date, 'YYYY-MM-DD'),
+ sm.product_uos,
+ sm.product_uom,
+ date_trunc('day',sp.min_date),
+ date_trunc('day',sp.date),
+ date_trunc('day',sp.date_done),
+ date_trunc('day',sp.max_date),
+ sp.invoice_state,
+ sp.company_id,
+ sp.state
+
+ )""")
+report_stock_picking()
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/stock/report/report_stock_picking_view.xml b/addons/stock/report/report_stock_picking_view.xml
new file mode 100644
index 00000000000..a14298ff771
--- /dev/null
+++ b/addons/stock/report/report_stock_picking_view.xml
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <!--
+ Stock Picking Report
+ -->
+
+ <record id="view_report_report_stock_picking_tree" model="ir.ui.view">
+ <field name="name">report.stock.picking.tree</field>
+ <field name="model">report.stock.picking</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Picking">
+ <field name="year" invisible="1"/>
+ <field name="month" invisible="1"/>
+ <field name="day" invisible="1"/>
+ <field name="date" invisible="1"/>
+ <field name="company_id" invisible="1"/>
+ <field name="partner_id" invisible="1"/>
+ <field name="product_id" invisible="1"/>
+ <field name="min_date" invisible="1"/>
+ <field name="order_date" invisible="1"/>
+ <field name="date_done" invisible="1"/>
+ <field name="max_date" invisible="1"/>
+ <field name="type" invisible="1"/>
+ <field name="invoice_state" invisible="1"/>
+ <field name="state" invisible="1"/>
+ <field name="product_qty" sum="# of Products" />
+ <field name="nbp" sum="# of Pickings" />
+ <field name="nbr" sum="# of Lines" />
+ <field name="avg_days_to_deliver" avg='Avg Days to Deliver'/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="view_report_report_stock_picking_graph" model="ir.ui.view">
+ <field name="name">report.stock.picking.graph</field>
+ <field name="model">report.stock.picking</field>
+ <field name="type">graph</field>
+ <field name="arch" type="xml">
+ <graph orientation="horizontal" string="Picking" type="bar">
+ <field name="partner_id"/>
+ <field name="nbr" operator="+"/>
+ <field name="product_qty" operator="+"/>
+ <field name="nbp" operator="+"/>
+ </graph>
+ </field>
+ </record>
+
+ <record id="view_report_report_stock_picking_filter" model="ir.ui.view">
+ <field name="name">report.stock.picking.select</field>
+ <field name="model">report.stock.picking</field>
+ <field name="type">search</field>
+ <field name="arch" type="xml">
+ <search string="Search">
+ <group col="16" colspan="6">
+ <filter icon="terp-go-year" string=" 365 Days "
+ domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
+ help="Picking in last 365 days"/>
+ <filter icon="terp-go-month" string=" 30 Days "
+ name="month"
+ domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
+ help="Picking in last 30 days"/>
+ <filter icon="terp-go-week"
+ string=" 7 Days "
+ separator="1"
+ domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
+ help="Picking during last 7 days"/>
+ <separator orientation="vertical"/>
+ <filter string="Todo" icon="terp-gtk-go-back-rtl" domain="[('state','in',('draft','auto','confirmed','assigned'))]"/>
+ <filter string="Done" icon="terp-dialog-close" domain="[('state','=','done')]"/>
+ <separator orientation="vertical"/>
+ <field name="partner_id"/>
+ <field name="company_id" groups="base.group_multi_company" widget="selection"/>
+ </group>
+ <newline/>
+ <group expand="0" string="Group By...">
+ <filter string="Partner" name="Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
+ <filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
+ <filter string="Shipping Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
+ <separator orientation="vertical"/>
+ <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
+ <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
+ <filter string="Invoice Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'invoice_state'}"/>
+ <separator orientation="vertical"/>
+ <filter string="Day" icon="terp-go-month" domain="[]" context="{'group_by':'day'}"/>
+ <filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'month'}"/>
+ <filter string="Year" icon="terp-go-year" domain="[]" context="{'group_by':'year'}"/>
+ </group>
+ <newline/>
+ <group expand="0" string="Extended options..." groups="base.group_extended">
+ <field name="type"/>
+ <separator orientation="vertical"/>
+ <field name="min_date"/>
+ <separator orientation="vertical"/>
+ <field name="max_date"/>
+ <newline/>
+ <field name="invoice_state"/>
+ <separator orientation="vertical"/>
+ <field name="order_date"/>
+ <separator orientation="vertical"/>
+ <field name="date_done"/>
+ </group>
+
+ </search>
+ </field>
+ </record>
+ <record id="action_report_report_stock_picking" model="ir.actions.act_window">
+ <field name="name">Picking</field>
+ <field name="res_model">report.stock.picking</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,graph</field>
+ <field name="view_id" ref="view_report_report_stock_picking_tree"/>
+ <field name="search_view_id" ref="view_report_report_stock_picking_filter"/>
+ <field name="context">{'search_default_Partner':1,'search_default_month':1,'group_by_no_leaf':1,'group_by':[]}</field>
+ </record>
+
+ <record model="ir.actions.act_window.view" id="action_report_report_stock_picking_tree">
+ <field name="sequence" eval="1"/>
+ <field name="view_mode">tree</field>
+ <field name="view_id" ref="view_report_report_stock_picking_tree"/>
+ <field name="act_window_id" ref="action_report_report_stock_picking"/>
+ </record>
+
+ <record model="ir.actions.act_window.view" id="action_report_report_stock_picking_graph">
+ <field name="sequence" eval="2"/>
+ <field name="view_mode">graph</field>
+ <field name="view_id" ref="view_report_report_stock_picking_graph"/>
+ <field name="act_window_id" ref="action_report_report_stock_picking"/>
+ </record>
+
+ <menuitem name="Picking" action="action_report_report_stock_picking" id="menu_report_report_stock_pickings_tree" parent="next_id_61"/>
+
+ </data>
+</openerp>
+
diff --git a/addons/stock/security/ir.model.access.csv b/addons/stock/security/ir.model.access.csv
index 6e84c8d0877..f7bbc7ea3b9 100644
--- a/addons/stock/security/ir.model.access.csv
+++ b/addons/stock/security/ir.model.access.csv
@@ -5,6 +5,8 @@
"access_stock_warehouse_user","stock.warehouse.user","model_stock_warehouse","base.group_user",1,0,0,0
"access_stock_location_manager","stock.location.manager","model_stock_location","stock.group_stock_manager",1,1,1,1
"access_stock_location_user","stock.location.user","model_stock_location","base.group_user",1,0,0,0
+"access_stock_journal_user","stock.journal.user","model_stock_journal","base.group_user",1,0,0,0
+"access_stock_journal_manager","stock.journal.manager","model_stock_journal","stock.group_stock_manager",1,1,1,1
"access_stock_picking_move_wizard","stock.picking.move.wizard","model_stock_picking_move_wizard","stock.group_stock_user",1,1,1,1
"access_stock_tracking","stock.tracking","model_stock_tracking","stock.group_stock_user",1,1,1,0
"access_stock_picking","stock.picking","model_stock_picking","stock.group_stock_user",1,1,1,1
@@ -14,7 +16,7 @@
"access_stock_inventory","stock.inventory","model_stock_inventory","stock.group_stock_user",1,1,1,1
"access_stock_inventory_line","stock.inventory.line","model_stock_inventory_line","stock.group_stock_user",1,1,1,1
"access_stock_report_prodlots","stock.report.prodlots","model_stock_report_prodlots","stock.group_stock_manager",1,0,0,0
-"access_stock_location_product_manager","stock.location product manager","model_stock_location","product.group_product_manager",1,0,0,0
+"access_stock_location_product_manager","stock.location product manager","model_stock_location","product.group_product_manager",1,1,1,1
"access_stock_lines_date","report.stock.lines.date all","model_report_stock_lines_date",stock.group_stock_user,1,0,0,0
"access_stock_report_tracklots","stock.report.tracklots","model_stock_report_tracklots","stock.group_stock_user",1,1,1,1
"access_report_products_to_received_planned","report.products.to.received.planned","model_report_products_to_received_planned","stock.group_stock_user",1,1,1,1
@@ -24,17 +26,28 @@
"access_stock_move_scrap","stock.move.scrap","model_stock_move_scrap","stock.group_stock_user",1,1,1,1
"access_stock_move_split","stock.move.split","model_stock_move_split","stock.group_stock_user",1,1,1,1
"access_stock_move_split_lines","stock.move.split.lines","model_stock_move_split_lines","stock.group_stock_user",1,1,1,1
+"access_stock_move_split_lines_exist","stock.move.split.lines.exist","model_stock_move_split_lines_exist","stock.group_stock_user",1,1,1,1
"access_stock_inventory_set_stock_zero","stock.inventory.set.stock.zero","model_stock_inventory_set_stock_zero","stock.group_stock_user",1,1,1,1
"access_stock_fill_inventory","stock.fill.inventory","model_stock_fill_inventory","stock.group_stock_user",1,1,1,1
"access_stock_inventory_line_split","stock.inventory.line.split","model_stock_inventory_line_split","stock.group_stock_user",1,1,1,1
"access_stock_invoice_onshipping","stock.invoice.onshipping","model_stock_invoice_onshipping","stock.group_stock_user",1,1,1,1
-"access_stock_location_product","stock.location.product","model_stock_location_product","stock.group_stock_user",1,0,0,0
-"access_stock_traceability_upstream","stock.traceability.upstream","model_stock_traceability_upstream","stock.group_stock_user",1,0,0,0
-"access_stock_traceability_downstream","stock.traceability.downstream","model_stock_traceability_downstream","stock.group_stock_user",1,0,0,0
-"access_stock_traceability_lot_upstream","stock.traceability.lot.upstream","model_stock_traceability_lot_upstream","stock.group_stock_user",1,0,0,0
-"access_stock_traceability_lot_downstream","stock.traceability.lot.downstream","model_stock_traceability_lot_downstream","stock.group_stock_user",1,0,0,0
+"access_stock_location_product","stock.location.product","model_stock_location_product","stock.group_stock_user",1,1,1,1
+"access_stock_location_product_manager","stock.location.product manager","model_stock_location_product","stock.group_stock_manager",1,1,1,1
+"access_stock_traceability_upstream","stock.traceability.upstream","model_stock_traceability_upstream","stock.group_stock_user",1,1,1,1
+"access_stock_traceability_downstream","stock.traceability.downstream","model_stock_traceability_downstream","stock.group_stock_user",1,1,1,1
+"access_stock_traceability_lot_upstream","stock.traceability.lot.upstream","model_stock_traceability_lot_upstream","stock.group_stock_user",1,1,1,1
+"access_stock_traceability_lot_downstream","stock.traceability.lot.downstream","model_stock_traceability_lot_downstream","stock.group_stock_user",1,1,1,1
"access_stock_partial_picking",stock.partial.picking","model_stock_partial_picking",,1,1,1,1
"access_stock_partial_move","stock.partial.move","model_stock_partial_move",,1,1,1,1
"access_stock_inventory_merge","stock.inventory.merge","model_stock_inventory_merge","stock.group_stock_user",1,0,0,0
"access_stock_change_standard_price","stock.change.standard.price","model_stock_change_standard_price","stock.group_stock_user",1,0,0,0
"access_action_traceability","action.traceability","model_action_traceability","stock.group_stock_user",1,0,0,0
+"access_stock_split_into","stock.split.into","model_stock_split_into","stock.group_stock_user",1,0,0,0
+"access_stock_split_into_manager","stock.split.into","model_stock_split_into","stock.group_stock_manager",1,1,1,1
+"access_report_stock_move","report.stock.move","model_report_stock_move","stock.group_stock_user",1,1,1,1
+"access_report_stock_inventory","report.stock.inventory","model_report_stock_inventory","stock.group_stock_user",1,1,1,1
+"access_stock_replacement","stock.replacement","model_stock_replacement","stock.group_stock_user",1,1,1,1
+"access_stock_replacement_result","stock.replacement.result","model_stock_replacement_result","stock.group_stock_user",1,1,1,1
+"access_stock_ups","stock.ups","model_stock_ups","stock.group_stock_user",1,1,1,1
+"access_stock_ups_final","stock.ups.final","model_stock_ups_final","stock.group_stock_user",1,1,1,1
+"access_stock_ups_upload","stock.ups.upload","model_stock_ups_upload","stock.group_stock_user",1,1,1,1 \ No newline at end of file
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index e48c381712e..05ff41a6e37 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -49,6 +49,17 @@ class stock_incoterms(osv.osv):
stock_incoterms()
+class stock_journal(osv.osv):
+ _name = "stock.journal"
+ _description = "Stock Journal"
+ _columns = {
+ 'name': fields.char('Stock Journal', size=32, required=True),
+ 'user_id': fields.many2one('res.users','Responsible'),
+ }
+ _defaults = {
+ 'user_id': lambda s,c,u,ctx: u
+ }
+stock_journal()
#----------------------------------------------------------
# Stock Location
@@ -159,7 +170,6 @@ class stock_location(osv.osv):
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the stock location without removing it."),
'usage': fields.selection([('supplier', 'Supplier Location'), ('view', 'View'), ('internal', 'Internal Location'), ('customer', 'Customer Location'), ('inventory', 'Inventory'), ('procurement', 'Procurement'), ('production', 'Production'), ('transit', 'Transit Location for Inter-Companies Transfers')], 'Location Type', required=True),
'allocation_method': fields.selection([('fifo', 'FIFO'), ('lifo', 'LIFO'), ('nearest', 'Nearest')], 'Allocation Method', required=True),
-
'complete_name': fields.function(_complete_name, method=True, type='char', size=100, string="Location Name"),
'stock_real': fields.function(_product_qty_available, method=True, type='float', string='Real Stock', multi="stock"),
@@ -169,6 +179,7 @@ class stock_location(osv.osv):
'location_id': fields.many2one('stock.location', 'Parent Location', select=True, ondelete='cascade'),
'child_ids': fields.one2many('stock.location', 'location_id', 'Contains'),
+ 'chained_journal_id': fields.many2one('stock.journal', 'Chained Journal'),
'chained_location_id': fields.many2one('stock.location', 'Chained Location If Fixed'),
'chained_location_type': fields.selection([('none', 'None'), ('customer', 'Customer'), ('fixed', 'Fixed Location')],
'Chained Location Type', required=True),
@@ -181,6 +192,8 @@ class stock_location(osv.osv):
"validated automatically. With 'Manual Operation', the stock move has to be validated "\
"by a worker. With 'Automatic No Step Added', the location is replaced in the original move."
),
+ 'chained_picking_type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal'), ('delivery', 'Delivery')], 'Shipping Type', help="Shipping type specify of the chained move, goods coming in or going out."),
+ 'chained_company_id': fields.many2one('res.company', 'Chained Company', help='Set here the belonging company of the chained move'),
'chained_delay': fields.integer('Chained lead time (days)'),
'address_id': fields.many2one('res.partner.address', 'Location Address'),
'icon': fields.selection(tools.icons, 'Icon', size=64),
@@ -225,7 +238,7 @@ class stock_location(osv.osv):
elif location.chained_location_type == 'fixed':
result = location.chained_location_id
if result:
- return result, location.chained_auto_packing, location.chained_delay
+ return result, location.chained_auto_packing, location.chained_delay, location.chained_journal_id and location.chained_journal_id.id or False, location.chained_company_id and location.chained_company_id.id or False, location.chained_picking_type
return result
def picking_type_get(self, cr, uid, from_location, to_location, context={}):
@@ -557,7 +570,7 @@ class stock_picking(osv.osv):
'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal'), ('delivery', 'Delivery')], 'Shipping Type', required=True, select=True, help="Shipping type specify, goods coming in or going out."),
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the picking without removing it."),
'note': fields.text('Notes'),
-
+ 'stock_journal_id': fields.many2one('stock.journal','Stock Journal'),
'location_id': fields.many2one('stock.location', 'Location', help="Keep empty if you produce at the location where the finished products are needed." \
"Set a location if you produce at a fixed location. This can be a partner location " \
"if you subcontract the manufacturing operations."),
@@ -589,7 +602,7 @@ class stock_picking(osv.osv):
("2binvoiced", "To Be Invoiced"),
("none", "Not from Picking")], "Invoice Status",
select=True, required=True, readonly=True, states={'draft': [('readonly', False)]}),
- 'company_id': fields.many2one('res.company', 'Company', required=True,select=1),
+ 'company_id': fields.many2one('res.company', 'Company', required=True, select=1),
}
_defaults = {
'name': lambda self, cr, uid, context: '/',
@@ -599,7 +612,7 @@ class stock_picking(osv.osv):
'type': lambda *a: 'in',
'invoice_state': lambda *a: 'none',
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
- 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock_picking', context=c)
+ 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.picking', context=c)
}
def copy(self, cr, uid, id, default=None, context={}):
@@ -1248,7 +1261,6 @@ class stock_production_lot(osv.osv):
'revisions': fields.one2many('stock.production.lot.revision', 'lot_id', 'Revisions'),
'company_id': fields.many2one('res.company','Company',select=1),
}
-
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'name': lambda x, y, z, c: x.pool.get('ir.sequence').get(y, z, 'stock.lot.serial'),
@@ -1290,6 +1302,7 @@ stock_production_lot_revision()
# location_dest_id is only used for predicting futur stocks
#
class stock_move(osv.osv):
+
def _getSSCC(self, cr, uid, context={}):
cr.execute('select id from stock_tracking where create_uid=%s order by id desc limit 1', (uid,))
res = cr.fetchone()
@@ -1367,7 +1380,7 @@ class stock_move(osv.osv):
\nThe state is \'Waiting\' if the move is waiting for another one.'),
'price_unit': fields.float('Unit Price',
digits_compute= dp.get_precision('Account')),
- 'company_id': fields.many2one('res.company', 'Company', required=True,select=1),
+ 'company_id': fields.many2one('res.company', 'Company', required=True, select=1),
'partner_id': fields.related('picking_id','address_id','partner_id',type='many2one', relation="res.partner", string="Partner"),
'backorder_id': fields.related('picking_id','backorder_id',type='many2one', relation="stock.picking", string="Back Order"),
'origin': fields.related('picking_id','origin',type='char', size=64, relation="stock.picking", string="Origin"),
@@ -1393,7 +1406,8 @@ class stock_move(osv.osv):
move_list = self.pool.get('stock.move').read(cr, uid, context['move_line'][0], ['location_dest_id'])
return move_list and move_list['location_dest_id'][0] or False
if context.get('address_out_id', False):
- return self.pool.get('res.partner.address').browse(cr, uid, context['address_out_id'], context).partner_id.property_stock_customer.id
+ property_out = self.pool.get('res.partner.address').browse(cr, uid, context['address_out_id'], context).partner_id.property_stock_customer
+ return property_out and property_out.id or False
return False
def _default_location_source(self, cr, uid, context={}):
@@ -1428,14 +1442,6 @@ class stock_move(osv.osv):
default = default.copy()
return super(stock_move, self).copy(cr, uid, id, default, context)
- def create(self, cr, user, vals, context=None):
- # Check that the stock.move is in draft state at creation to force
- # passing through button_confirm
- if vals.get('state','draft') not in ('draft','done','waiting'):
- logger = netsvc.Logger()
- logger.notifyChannel("code", netsvc.LOG_WARNING, "All new stock.move must be in state draft at the creation !")
- return super(stock_move, self).create(cr, user, vals, context)
-
def _auto_init(self, cursor, context):
res = super(stock_move, self)._auto_init(cursor, context)
cursor.execute('SELECT indexname \
@@ -1567,8 +1573,9 @@ class stock_move(osv.osv):
def create_chained_picking(self, cr, uid, moves, context):
new_moves = []
+ res_obj = self.pool.get('res.company')
for picking, todo in self._chain_compute(cr, uid, moves, context).items():
- ptype = self.pool.get('stock.location').picking_type_get(cr, uid, todo[0][0].location_dest_id, todo[0][1][0])
+ ptype = todo[0][1][5] and todo[0][1][5] or self.pool.get('stock.location').picking_type_get(cr, uid, todo[0][0].location_dest_id, todo[0][1][0])
pick_name = ''
if ptype == 'delivery':
pick_name = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.delivery')
@@ -1579,17 +1586,20 @@ class stock_move(osv.osv):
'note': picking.note,
'move_type': picking.move_type,
'auto_picking': todo[0][1][1] == 'auto',
+ 'stock_journal_id': todo[0][1][3],
+ 'company_id': todo[0][1][4] or res_obj._company_default_get(cr, uid, 'stock.company', context),
'address_id': picking.address_id.id,
+
'invoice_state': 'none'
})
- for move, (loc, auto, delay) in todo:
- # Is it smart to copy ? May be it's better to recreate ?
+ for move, (loc, auto, delay, journal, company_id, ptype) in todo:
new_id = self.pool.get('stock.move').copy(cr, uid, move.id, {
'location_id': move.location_dest_id.id,
'location_dest_id': loc.id,
'date_moved': time.strftime('%Y-%m-%d'),
'picking_id': pickid,
'state': 'waiting',
+ 'company_id': company_id or res_obj._company_default_get(cr, uid, 'stock.company', context) ,
'move_history_ids': [],
'date_planned': (datetime.strptime(move.date_planned, '%Y-%m-%d %H:%M:%S') + relativedelta(days=delay or 0)).strftime('%Y-%m-%d'),
'move_history_ids2': []}
@@ -1675,6 +1685,33 @@ class stock_move(osv.osv):
wf_service.trg_write(uid, 'stock.picking', pick_id, cr)
return count
+ def setlast_tracking(self, cr, uid, ids, context=None):
+ new_move = []
+ update_val = {}
+ ir_sequence_obj = self.pool.get('ir.sequence')
+ tracking_obj = self.pool.get('stock.tracking')
+ tracking = False
+ tracking = context.get('tracking', False)
+ # import pdb; pdb.set_trace()
+ if tracking:
+ tracking_id = tracking_obj.search(cr, uid, ['name','=', tracking])
+ if prodlot_id:
+ update_val['prodlot_id'] = prodlot_id
+ else:
+ tracking_id = tracking_obj.create(cr, uid, {'name': tracking}, {'product_id': self.browse(cr, uid, ids)[0].product_id.id})
+ update_val['tracking_id'] = tracking_id
+ else:
+ last_track = [line.tracking_id for line in self.browse(cr, uid, ids)[0].picking_id.move_lines if line.tracking_id]
+ if not last_track:
+ track_ids= tracking_obj.search(cr, uid, [])
+ last_track = [track for track in tracking_obj.browse(cr, uid, track_ids)]
+ last_track.sort(key=lambda p: p.date, reverse=True)
+ last_track_id = last_track and last_track[0].id
+ update_val['tracking_id'] = last_track_id
+ self.write(cr, uid, ids, update_val)
+ return True
+
+
#
# Cancel move => cancel others move and pickings
#
@@ -1822,10 +1859,12 @@ class stock_move(osv.osv):
for pick in picking_obj.browse(cr, uid, picking_ids):
if all(move.state == 'done' for move in pick.move_lines):
picking_obj.action_done(cr, uid, [pick.id])
-
wf_service = netsvc.LocalService("workflow")
for id in ids:
wf_service.trg_trigger(uid, 'stock.move', id, cr)
+ for pick in picking_obj.browse(cr, uid, picking_ids):
+ if len([move.state == 'done' for move in pick.move_lines]) == len(pick.move_lines):
+ wf_service.trg_validate(uid, 'stock.picking', pick.id, 'button_done', cr)
return True
def create_account_move(self, cr, uid, move,account_id,account_variation,amount, context=None):
diff --git a/addons/stock/stock_report.xml b/addons/stock/stock_report.xml
index 3084e8527a7..547ed785cd1 100644
--- a/addons/stock/stock_report.xml
+++ b/addons/stock/stock_report.xml
@@ -3,6 +3,7 @@
<data>
<report auto="False" id="report_product_history" model="product.product" name="stock.product.history" string="Future Stock Forecast"/>
<report id="report_picking_list" model="stock.picking" name="stock.picking.list" string="Picking list" rml="stock/report/picking.rml"/>
+ <report id="report_packing_list" model="stock.picking" name="stock.packing.list" string="Packing list" rml="stock/report/packing.rml"/>
<report id="report_move_labels" model="stock.move" name="stock.move.label" string="Item Labels" xml="stock/report/lot_move_label.xml" xsl="stock/report/lot_move_label.xsl"/>
<report auto="False" id="report_location_overview" model="stock.location" name="lot.stock.overview" string="Location Overview" rml="stock/report/lot_overview.rml" groups="base.group_extended"/>
<report auto="False" id="report_lot_location" model="stock.location" name="lot.location" rml="stock/report/lot_location.rml" string="Lots by location"/>
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index 55498908fba..ab33b07aacb 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -313,6 +313,7 @@
<field name="product_qty" />
<field name="product_uom" string="UOM"/>
<field name="prodlot_id" groups="base.group_extended"/>
+ <field groups="base.group_extended" name="tracking_id"/>
<field name="product_packaging" domain="[('product_id','=',product_id)]" groups="base.group_extended"/>
<field name="picking_id"/>
<field name="location_id" />
@@ -336,6 +337,7 @@
<field name="product_qty" />
<field name="product_uom" string="UOM"/>
<field name="prodlot_id" groups="base.group_extended"/>
+ <field groups="base.group_extended" name="tracking_id"/>
<field name="product_packaging" domain="[('product_id','=',product_id)]" groups="base.group_extended"/>
<field name="picking_id"/>
<field name="location_id" />
@@ -420,6 +422,9 @@
<field name="chained_location_id"/>
<field name="chained_auto_packing"/>
<field name="chained_delay"/>
+ <field name="chained_journal_id"/>
+ <field name="chained_picking_type"/>
+ <field name="chained_company_id" widget="selection"/>
</group>
<group col="2" colspan="2">
<separator string="Localization" colspan="2"/>
@@ -603,37 +608,43 @@
<field name="arch" type="xml">
<form string="Picking list">
<group colspan="4" col="6">
-
<field name="name" readonly="1"/>
-<!-- <field name="address_id" context="{'contact_display' : 'partner'}" groups="base.group_extended"/>-->
<field name="origin"/>
-
<field name="backorder_id" groups="base.group_extended" readonly="1"/>
<field name="date"/>
<field name="min_date"/>
<field name="type"/>
+ <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
<page string="General Information">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
- <tree colors="grey:state in ('cancel')" string="Stock Moves">
+ <tree colors="grey:state in ('cancel')" string="Stock Moves" editable="top">
<field name="name" string="Move Name"/>
<field name="product_id"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom" string="UOM"/>
<field name="picking_id"/>
<field name="prodlot_id" groups="base.group_extended"/>
+ <button
+ name="%(stock.track_line)d"
+ string="Split in production lots"
+ type="action" icon="terp-stock_effects-object-colorize"
+ states="draft,waiting,confirmed,assigned" />
+ <field groups="base.group_extended" name="tracking_id"/>
+ <button name="%(split_into)d" string="Split Stock Moves" type="action"
+ icon="terp-stock_effects-object-colorize"
+ states="draft,assigned,confirmed,done"/>
+ <button name="setlast_tracking" string="Set Last Tracking" type="object"
+ attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
+ icon="terp-stock_effects-object-colorize"
+ states="draft,assigned,confirmed,done"/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="date_planned"/>
<field name="date_expected" string="Date Expected"/>
<field name="state"/>
- <button
- name="%(stock.track_line)d"
- string="Split in production lots"
- type="action" icon="gtk-justify-fill"
- states="draft,waiting,confirmed,assigned" />
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
@@ -662,10 +673,13 @@
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<field groups="base.group_extended" name="tracking_id"/>
+
<newline/>
<label/>
- <button name="%(track_line)d" string="Split in production lots" type="action" icon="gtk-justify-fill"/>
+ <button name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize"/>
<button name="%(move_scrap)d" string="Scrap Move Line" type="action" icon="gtk-justify-fill"/>
+ <button name="%(split_into)d" string="Split Stock Moves" type="action"
+ icon="terp-stock_effects-object-colorize" />
<separator colspan="4" string="Move State"/>
<field name="state"/>
<group colspan="2">
@@ -715,10 +729,9 @@
<separator orientation="vertical"/>
<filter icon="terp-accessories-archiver-minus" string="Back Order" domain="[('backorder_id', '&lt;&gt;', False)]" help="Has Back Order" />
<separator orientation="vertical"/>
- <field name="location_id"/>
- <field name="location_dest_id"/>
<field name="name"/>
<field name="address_id"/>
+ <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="4" col="8">
@@ -761,19 +774,28 @@
<field name="backorder_id" groups="base.group_extended" readonly="1"/>
<field name="date" />
<field name="min_date"/>
- <field name="type" invisible="1"/>
+ <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
+ <field name="type" invisible="1"/>
</group>
<notebook colspan="4">
<page string="General Information">
- <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
- <tree colors="grey:state in ('cancel')" string="Stock Moves">
+ <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}" >
+ <tree colors="grey:state in ('cancel')" string="Stock Moves" editable="top">
<field name="name" string="Move Name"/>
<field name="product_id"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom" string="UOM"/>
<field name="picking_id" />
<field name="prodlot_id" groups="base.group_extended"/>
+ <field groups="base.group_extended" name="tracking_id"/>
+ <button name="%(split_into)d" string="Split Stock Moves" type="action"
+ icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
+ states="draft,assigned,confirmed,done"/>
+ <button name="setlast_tracking" string="Set Last Tracking" type="object"
+ attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
+ icon="terp-stock_effects-object-colorize"
+ states="draft,assigned,confirmed,done"/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="date_planned"/>
@@ -782,7 +804,7 @@
<button
name="%(stock.track_line)d"
string="Split in production lots"
- type="action" icon="gtk-justify-fill"
+ type="action" icon="terp-stock_effects-object-colorize"
groups="base.group_extended"
states="draft,waiting,confirmed,assigned" />
<button name="%(stock.move_scrap)d"
@@ -806,11 +828,19 @@
<field name="date_planned"/>
<field name="date_expected" string="Date Expected"/>
<field groups="base.group_extended" name="product_packaging" domain="[('product_id','=',product_id)]"/>
+ <newline/>
<field name="prodlot_id" groups="base.group_extended"
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<field groups="base.group_extended" name="tracking_id"/>
+
+ <label/>
+ <button name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize"/>
+ <label/>
+ <button name="%(split_into)d" string="Split Stock Moves" type="action"
+ icon="terp-stock_effects-object-colorize"
+ states="draft,assigned,confirmed,done"/>
<separator colspan="4" string="Move State"/>
<field name="state"/>
<group colspan="2">
@@ -863,6 +893,7 @@
<field name="name"/>
<field name="address_id"/>
<field name="origin"/>
+ <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="4" col="10">
@@ -922,7 +953,6 @@
<field name="invoice_state"/>
<field name="state"/>
<button name="%(action_partial_picking)d" states="assigned" string="Validate" type="action" icon="gtk-go-forward" help="Validate Picking"/>
- <button name="button_cancel" states="assigned,confirmed,draft" string="Cancel" icon="gtk-cancel" help="Cancel" confirm="This operation will cancel the picking. Do you want to continue?"/>
</tree>
</field>
</record>
@@ -940,33 +970,38 @@
<field name="backorder_id" readonly="1"/>
<field name="origin" readonly="1"/>
<field name="type" invisible="1"/>
+ <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
<page string="General Information">
- <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
- <tree colors="grey:state in ('cancel')" string="Stock Moves">
- <field name="name" string="Move Name"/>
+ <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}" >
+ <tree colors="grey:state in ('cancel')" string="Stock Moves" editable="top">
<field name="product_id"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom" string="UOM"/>
- <field name="picking_id"/>
+ <button name="%(stock.move_scrap)d"
+ string="Scrap Products" type="action"
+ icon="gtk-convert" context="{'scrap': True}"
+ states="draft,waiting,confirmed,assigned" />
<field name="prodlot_id" groups="base.group_extended"/>
+ <button name="%(track_line)d" string="Split in production lots" type="action"
+ icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
+ states="assigned,confirmed,done"
+ groups="base.group_extended"/>
+ <field name="tracking_id" groups="base.group_extended"/>
+ <button name="%(split_into)d" string="Split Stock Moves" type="action"
+ icon="terp-stock_effects-object-colorize"
+ states="draft,assigned,confirmed,done"/>
+ <button name="setlast_tracking" string="Set Last Tracking" type="object"
+ attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
+ icon="terp-stock_effects-object-colorize"
+ states="draft,assigned,confirmed,done"/>
<field name="location_id"/>
- <field name="location_dest_id"/>
<field name="date_planned"/>
- <field name="date_expected" string="Date Expected"/>
<field name="state"/>
- <button
- name="%(stock.track_line)d"
- string="Split in production lots"
- type="action" icon="gtk-justify-fill"
- states="draft,waiting,confirmed,assigned" />
- <button
- name="%(stock.move_scrap)d"
- string="Scrap Products" type="action"
- icon="gtk-convert"
- states="draft,waiting,confirmed,assigned" />
+ <button name="%(action_partial_move)d" string="Partial" type="action" states="confirmed,assigned" icon="gtk-justify-fill"/>
+ <button name="action_done" states="confirmed,assigned" string="Done" type="object" icon="gtk-jump-to"/>
</tree>
<form string="Stock Moves">
<notebook colspan="4">
@@ -984,13 +1019,19 @@
<field name="date_planned"/>
<field name="date_expected" string="Date Expected"/>
<field groups="base.group_extended" name="product_packaging" domain="[('product_id','=',product_id)]"/>
+ <newline/>
<field name="prodlot_id" groups="base.group_extended"
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<field groups="base.group_extended" name="tracking_id"/>
<label/>
- <button name="%(track_line)d" string="Split in production lots" type="action" icon="gtk-justify-fill"/>
+ <button name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize"/>
+ <label/>
+ <button name="%(split_into)d" string="Split Stock Moves" type="action"
+ icon="terp-stock_effects-object-colorize"
+ states="draft,assigned,confirmed,done"/>
+ <label/>
<separator colspan="4" string="Move State"/>
<field name="state"/>
<group colspan="2">
@@ -1043,6 +1084,7 @@
<field name="name"/>
<field name="address_id" />
<field name="origin"/>
+ <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
<newline/>
@@ -1057,13 +1099,13 @@
</record>
<record id="action_picking_tree" model="ir.actions.act_window">
- <field name="name">Outgoing Products</field>
+ <field name="name">Outgoing Packings</field>
<field name="res_model">stock.picking</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="domain">[('type','=','out')]</field>
- <field name="context">{'contact_display': 'partner'}</field>
+ <field name="context">{'contact_display': 'partner', 'search_default_available': 1}</field>
<field name="search_view_id" ref="view_picking_out_search"/>
</record>
<record id="action_picking_tree_out_view1_waiting" model="ir.actions.act_window.view">
@@ -1120,24 +1162,32 @@
<field name="type"/>
<field name="min_date" readonly="1"/>
<field name="invoice_state" string="Invoice Control"/>
+ <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
<page string="General Information">
- <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_in_id': address_id}">
- <tree colors="grey:state in ('cancel')" string="Stock Moves">
- <field name="product_id"/>
- <field name="product_qty"/>
- <field name="product_uom" string="Product Unit of Measure"/>
+ <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_in_id': address_id}" >
+ <tree colors="grey:state in ('cancel')" string="Stock Moves" editable="top">
+ <field name="product_id" readonly="1"/>
+ <field name="product_qty" readonly="1"/>
+ <field name="product_uom" string="UOM" readonly="1"/>
<field name="location_dest_id"/>
<field name="prodlot_id" groups="base.group_extended"/>
- <field name="state"/>
- <button
+ <button
name="%(stock.track_line)d"
string="Split in production lots"
- type="action" icon="gtk-justify-fill"
+ type="action" icon="terp-stock_effects-object-colorize"
states="draft,waiting,confirmed,assigned" />
- <button name="%(stock.move_scrap)d"
+ <field name="tracking_id" groups="base.group_extended"/>
+ <button name="%(split_into)d" string="Split Stock Moves" type="action"
+ icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
+ states="draft,assigned,confirmed,done"/>
+ <button name="setlast_tracking" string="Set Last Tracking" type="object"
+ icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
+ states="draft,assigned,confirmed,done"/>
+ <field name="state"/>
+ <button name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
@@ -1151,23 +1201,21 @@
<field colspan="4" context="location=location_id" name="product_id" on_change="onchange_product_id(product_id, location_id, location_dest_id, parent.address_id)"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom"/>
- <field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field groups="product.group_uos" name="product_uos_qty"/>
<field colspan="4" invisible="1" name="name" />
<field groups="base.group_extended" name="date_planned"/>
- <field name="date_expected" groups="base.group_extended" string="Date Expected"/>
- <newline/>
+ <field name="date_expected" groups="base.group_extended" string="Date Expected"/>
+ <field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<newline/>
- <field groups="base.group_extended" name="product_packaging" domain="[('product_id','=',product_id)]"/>
<newline/>
- <field name="prodlot_id" groups="base.group_extended"
- context="{'location_id':location_id, 'product_id':product_id}"
- domain="[('product_id','=?',product_id)]"
- on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
+ <field name="prodlot_id" groups="base.group_extended" context="{'location_id':location_id, 'product_id':product_id}" domain="[('product_id','=?',product_id)]" on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<field groups="base.group_extended" name="tracking_id"/>
+
<newline/>
<label/>
- <button groups="base.group_extended" name="%(track_line)d" string="Split in production lots" type="action" icon="gtk-justify-fill"/>
+ <button groups="base.group_extended" name="267" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize"/>
+ <label/>
+ <button name="275" string="Split Stock Moves" type="action" icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}" states="draft,assigned,confirmed,done"/>
<separator colspan="4" string="Move State"/>
<field name="state"/>
<group colspan="2">
@@ -1215,6 +1263,7 @@
<field name="name"/>
<field name="address_id"/>
<field name="origin"/>
+ <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
<field name="company_id" widget="selection" groups="base.group_multi_company" />
</group>
<newline/>
@@ -1272,6 +1321,7 @@
<separator orientation="vertical"/>
<field name="name"/>
<field name="origin"/>
+ <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
<field name="company_id" widget="selection"/>
</group>
<newline/>
@@ -1304,7 +1354,7 @@
<field name="type">tree</field>
<field eval="6" name="priority"/>
<field name="arch" type="xml">
- <tree colors="grey:state in ('cancel');red:(state not in ('cancel','done')) and date_planned > current_date" string="Moves">
+ <tree colors="grey:state in ('cancel');red:(state not in ('cancel','done')) and date_planned > current_date" string="Moves" editable="top">
<field name="picking_id" select="1"/>
<field name="product_id"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
@@ -1318,11 +1368,20 @@
icon="gtk-justify-fill" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
states="assigned,confirmed"
groups="base.group_extended"/>
+ <field groups="base.group_extended" name="tracking_id"/>
+ <button name="%(split_into)d" string="Split Stock Moves" type="action"
+ icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
+ states="draft,assigned,confirmed,done"/>
+ <button name="setlast_tracking" string="Set Last Tracking" type="object"
+ icon="terp-stock_effects-object-colorize"
+ attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
+ states="draft,assigned,confirmed,done"/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="date_planned"/>
<field name="date_expected"/>
<field name="state"/>
+ <button name="action_done" states="confirmed,assigned" string="Done" type="object" icon="gtk-jump-to"/>
</tree>
</field>
</record>
@@ -1372,7 +1431,15 @@
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
- <button name="%(track_line)d" string="Split in production lots" type="action" icon="gtk-justify-fill" colspan="2" />
+ <newline/>
+ <group colspan="4" col="4">
+ <label/>
+ <button name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize" colspan="2" />
+ <label/>
+ <button name="%(split_into)d" string="Split Stock Moves" type="action"
+ icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
+ states="draft,assigned,confirmed,done"/>
+ </group>
</group>
</page>
</notebook>
@@ -1455,15 +1522,24 @@
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
<field name="prodlot_id" groups="base.group_extended"/>
- <button name="%(track_line)d" string="Split" type="action"
- icon="gtk-justify-fill" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
+ <button name="%(track_line)d" string="Split in production lots" type="action"
+ icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
states="assigned,confirmed,done"
+ context="{'default_use_exist': picking_id.type=='in'}"
groups="base.group_extended"/>
+ <field name="tracking_id" groups="base.group_extended"/>
+ <button name="%(split_into)d" string="Split Stock Moves" type="action"
+ icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
+ states="draft,assigned,confirmed,done"/>
+ <button name="setlast_tracking" string="Set Last Tracking" type="object"
+ attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
+ icon="terp-stock_effects-object-colorize"
+ states="draft,assigned,confirmed,done"/>
<field name="date_planned"/>
<field name="backorder_id" groups="base.group_extended"/>
<field name="state"/>
<button name="%(action_partial_move)d" string="Partial" type="action" states="assigned" icon="gtk-justify-fill"/>
- <button name="action_done" states="assigned" string="Done" type="object" icon="gtk-jump-to"/>
+ <button name="action_done" states="confirmed,assigned" string="Done" type="object" icon="gtk-jump-to"/>
</tree>
</field>
</record>
@@ -1493,18 +1569,23 @@
<field name="priority"/>
<field name="address_id" context="{'contact_display':'partner'}"/>
<newline/>
- <field name="picking_id"/>
<newline/>
<field name="prodlot_id" groups="base.group_extended"
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
- <field name="tracking_id"/>
+ <field groups="base.group_extended" name="tracking_id"/>
+
<newline/>
+ <field name="picking_id"/>
<group col="2" colspan="2">
- <label/>
- <button name="%(track_line)d" string="Split in production lots" type="action" icon="gtk-justify-fill"/>
- </group>
+ <label/>
+ <button name="%(split_into)d" string="Split Stock Moves" type="action"
+ icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
+ states="draft,assigned,confirmed,done"/>
+ <label/>
+ <button name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize"/>
+ </group>
<separator colspan="4" string="Move State"/>
<field name="state"/>
<group col="5" colspan="2">
@@ -1549,6 +1630,10 @@
<separator orientation="vertical"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}" />
</group>
+ <newline/>
+ <group expand="0" string="Extended options..." groups="base.group_extended">
+ <field name="tracking_id" context="{'tracking': self}" domain="[]" />
+ </group>
</search>
</field>
</record>
@@ -1792,5 +1877,52 @@
<menuitem action="action_reception_picking_move" id="menu_action_pdct_in" parent="menu_stock_products_moves" sequence="1"/>
<menuitem action="action_out_picking_move" id="menu_action_pdct_out" parent="menu_stock_products_moves" sequence="2"/>
+
+
+ <record id="view_stock_journal_filter" model="ir.ui.view">
+ <field name="name">stock.journal.filter</field>
+ <field name="model">stock.journal</field>
+ <field name="type">search</field>
+ <field name="arch" type="xml">
+ <search string="Stock Journal">
+ <field name="name"/>
+ <field name="user_id"/>
+ </search>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="view_stock_journal_tree">
+ <field name="name">Stock Journals</field>
+ <field name="model">stock.journal</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Stock Journal">
+ <field name="name"/>
+ <field name="user_id"/>
+ </tree>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="view_stock_journal_form">
+ <field name="name">Stock Journals</field>
+ <field name="model">stock.journal</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Stock Journal">
+ <field name="name"/>
+ <field name="user_id"/>
+ </form>
+ </field>
+ </record>
+ <record id="action_stock_journal_form" model="ir.actions.act_window">
+ <field name="name">Stock Journals</field>
+ <field name="res_model">stock.journal</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_type">form</field>
+ </record>
+ <menuitem
+ action="action_stock_journal_form"
+ id="menu_action_stock_journal_form"
+ groups="base.group_extended"
+ parent="menu_stock_configuration" />
+
</data>
</openerp>
diff --git a/addons/stock/wizard/__init__.py b/addons/stock/wizard/__init__.py
index 82825000eaa..a211de96780 100644
--- a/addons/stock/wizard/__init__.py
+++ b/addons/stock/wizard/__init__.py
@@ -21,6 +21,7 @@
import stock_traceability
import stock_move
+import stock_splitinto
import stock_partial_picking
import stock_partial_move
import stock_replacement
diff --git a/addons/stock/wizard/stock_move.py b/addons/stock/wizard/stock_move.py
index 0e670ee3e5d..5f930361dfe 100644
--- a/addons/stock/wizard/stock_move.py
+++ b/addons/stock/wizard/stock_move.py
@@ -179,6 +179,8 @@ class split_in_production_lot(osv.osv_memory):
move = self.pool.get('stock.move').browse(cr, uid, context['active_id'], context=context)
if 'product_id' in fields:
res.update({'product_id': move.product_id.id})
+ if 'product_uom' in fields:
+ res.update({'product_uom': move.product_uom.id})
if 'qty' in fields:
res.update({'qty': move.product_qty})
return res
@@ -186,6 +188,7 @@ class split_in_production_lot(osv.osv_memory):
_columns = {
'qty': fields.integer('Quantity'),
'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
+ 'product_uom': fields.many2one('product.uom', 'Product UOM'),
'line_ids': fields.one2many('stock.move.split.lines', 'lot_id', 'Lots Number'),
'line_exist_ids': fields.one2many('stock.move.split.lines.exist', 'lot_id', 'Lots Existing Numbers'),
'use_exist' : fields.boolean('Use Exist'),
@@ -240,15 +243,10 @@ class split_in_production_lot(osv.osv_memory):
default_val = {
'product_qty': quantity,
'product_uos_qty': uos_qty,
- 'state': 'draft'
+ 'state': move.state
}
if quantity_rest > 0:
current_move = move_obj.copy(cr, uid, move.id, default_val)
- move_obj.action_confirm(cr, uid, [current_move])
- if move.state=='assigned':
- move_obj.force_assign(cr, uid, [current_move])
- elif move.state<>'confirmed':
- move_obj.write(cr, uid, [current_move], {'state': move.state})
new_move.append(current_move)
if quantity_rest == 0:
current_move = move.id
@@ -262,7 +260,7 @@ class split_in_production_lot(osv.osv_memory):
prodlot_id = prodlot_obj.create(cr, uid, {'name': line.name},
# 'prefix' : line.name},
{'product_id': move.product_id.id})
- move_obj.write(cr, uid, [current_move], {'prodlot_id': prodlot_id})
+ move_obj.write(cr, uid, [current_move], {'prodlot_id': prodlot_id, 'state':move.state})
prodlot = prodlot_obj.browse(cr, uid, prodlot_id)
# ref = '%d' % (move.id)
# if prodlot.ref:
@@ -273,6 +271,7 @@ class split_in_production_lot(osv.osv_memory):
if quantity_rest > 0:
update_val['product_qty'] = quantity_rest
update_val['product_uos_qty'] = uos_qty_rest
+ update_val['state'] = move.state
move_obj.write(cr, uid, [move.id], update_val)
return new_move
split_in_production_lot()
diff --git a/addons/stock/wizard/stock_move_view.xml b/addons/stock/wizard/stock_move_view.xml
index bba27bfe9c7..05c35d5a830 100644
--- a/addons/stock/wizard/stock_move_view.xml
+++ b/addons/stock/wizard/stock_move_view.xml
@@ -103,11 +103,21 @@
<field name="model">stock.move.split</field>
<field name="type">form</field>
<field name="arch" type="xml">
- <form string="Split in lots">
- <field name="product_id" colspan="4" readonly="1"/>
- <newline/>
- <field name="use_exist"/>
- <field name="qty" readonly="1"/>
+ <form string="Split in lots">
+ <field name="product_id" colspan="4" readonly="1"/>
+ <newline/>
+ <group colspan="4" col="4">
+ <group colspan="1" col="2">
+ <field name="use_exist"/>
+ </group>
+ <group colspan="1" col="2">
+ <field name="qty" readonly="1"/>
+ </group>
+ <group colspan="1" col="2">
+ <field name="product_uom" readonly="1"/>
+ </group>
+ </group>
+
<group colspan="4" attrs="{'invisible':[('use_exist','=',True)]}">
<field name="line_ids" colspan="4" nolabel="1">
<tree string="Lots Number" editable="top">
diff --git a/addons/stock/wizard/stock_partial_move.py b/addons/stock/wizard/stock_partial_move.py
index b8efdc4ed77..8f283ebee62 100644
--- a/addons/stock/wizard/stock_partial_move.py
+++ b/addons/stock/wizard/stock_partial_move.py
@@ -27,19 +27,22 @@ import pooler
import time
class stock_partial_move(osv.osv_memory):
- _name = "stock.partial.move"
- _description = "Partial Move"
+ _name = "stock.partial.move"
+ _description = "Partial Move"
_columns = {
'date': fields.datetime('Date', required=True),
+ 'partner_id': fields.many2one('res.partner',string="Partner"),
+ 'type': fields.char("Type", size=3),
+ 'address_id': fields.many2one('res.partner.address', 'Delivery Address', help="Address where goods are to be delivered"),
}
def view_init(self, cr, uid, fields_list, context=None):
res = super(stock_partial_move, self).view_init(cr, uid, fields_list, context=context)
- move_obj = self.pool.get('stock.move')
+ move_obj = self.pool.get('stock.move')
if not context:
context={}
moveids = []
- for m in move_obj.browse(cr, uid, context.get('active_ids', [])):
+ for m in move_obj.browse(cr, uid, context.get('active_ids', [])):
if m.state in ('done', 'cancel'):
continue
if 'move%s_product_id'%(m.id) not in self._columns:
@@ -54,53 +57,58 @@ class stock_partial_move(osv.osv_memory):
self._columns['move%s_product_price'%(m.id)] = fields.float("Price")
if 'move%s_product_currency'%(m.id) not in self._columns:
self._columns['move%s_product_currency'%(m.id)] = fields.many2one('res.currency',string="Currency")
- return res
+ return res
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False):
- result = super(stock_partial_move, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu)
+ result = super(stock_partial_move, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu)
move_obj = self.pool.get('stock.move')
- move_ids = context.get('active_ids', False)
+ move_ids = context.get('active_ids', False)
move_ids = move_obj.search(cr, uid, [('id','in',move_ids)])
_moves_arch_lst = """<form string="Deliver Products">
<separator colspan="4" string="Delivery Information"/>
<field name="date" colspan="4" />
+ <group colspan="4" attrs="{'invisible':[('type','=','in')]}">
+ <field name="partner_id" attrs="{'required':[('type','!=','in')]}" />
+ <field name="address_id" attrs="{'required':[('type','!=','in')]}"/>
+ <field name="type" invisible="1"/>
<newline/>
+ </group>
<separator colspan="4" string="Move Detail"/>
- """
+ """
_moves_fields = result['fields']
- if move_ids and view_type in ['form']:
- for m in move_obj.browse(cr, uid, move_ids, context):
+ if move_ids and view_type in ['form']:
+ for m in move_obj.browse(cr, uid, move_ids, context):
if m.state in ('done', 'cancel'):
continue
_moves_fields.update({
'move%s_product_id'%(m.id) : {
'string': _('Product'),
- 'type' : 'many2one',
- 'relation': 'product.product',
- 'required' : True,
- 'readonly' : True,
+ 'type' : 'many2one',
+ 'relation': 'product.product',
+ 'required' : True,
+ 'readonly' : True,
},
'move%s_product_qty'%(m.id) : {
'string': _('Quantity'),
'type' : 'float',
- 'required': True,
+ 'required': True,
},
'move%s_product_uom'%(m.id) : {
'string': _('Product UOM'),
- 'type' : 'many2one',
- 'relation': 'product.uom',
- 'required' : True,
- 'readonly' : True,
+ 'type' : 'many2one',
+ 'relation': 'product.uom',
+ 'required' : True,
+ 'readonly' : True,
}
- })
-
+ })
+
_moves_arch_lst += """
<group colspan="4" col="10">
<field name="move%s_product_id" nolabel="1"/>
<field name="move%s_product_qty" string="Qty" />
<field name="move%s_product_uom" nolabel="1" />
"""%(m.id, m.id, m.id)
- if (m.picking_id.type == 'in') and (m.product_id.cost_method == 'average'):
+ if (m.picking_id.type == 'in') and (m.product_id.cost_method == 'average'):
_moves_fields.update({
'move%s_product_price'%(m.id) : {
'string': _('Price'),
@@ -108,9 +116,9 @@ class stock_partial_move(osv.osv_memory):
},
'move%s_product_currency'%(m.id): {
'string': _('Currency'),
- 'type' : 'float',
- 'type' : 'many2one',
- 'relation': 'res.currency',
+ 'type' : 'float',
+ 'type' : 'many2one',
+ 'relation': 'res.currency',
}
})
_moves_arch_lst += """
@@ -131,7 +139,7 @@ class stock_partial_move(osv.osv_memory):
</group>
</form>"""
result['arch'] = _moves_arch_lst
- result['fields'] = _moves_fields
+ result['fields'] = _moves_fields
return result
def default_get(self, cr, uid, fields, context=None):
@@ -139,23 +147,40 @@ class stock_partial_move(osv.osv_memory):
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
- @param fields: List of fields for which we want default values
- @param context: A standard dictionary
- @return: A dictionary which of fields with values.
- """
+ @param fields: List of fields for which we want default values
+ @param context: A standard dictionary
+ @return: A dictionary which of fields with values.
+ """
res = super(stock_partial_move, self).default_get(cr, uid, fields, context=context)
- move_obj = self.pool.get('stock.move')
+ move_obj = self.pool.get('stock.move')
if not context:
context={}
- moveids = []
+ moveids = address_delivery = address_default = []
if 'date' in fields:
res.update({'date': time.strftime('%Y-%m-%d %H:%M:%S')})
move_ids = context.get('active_ids', [])
move_ids = move_obj.search(cr, uid, [('id','in',move_ids)])
- for m in move_obj.browse(cr, uid, context.get('active_ids', [])):
+ for m in move_obj.browse(cr, uid, context.get('active_ids', [])):
if m.state in ('done', 'cancel'):
continue
+ res['type'] = m.picking_id and m.picking_id.type or ''
+ address_ids = list(set([(pick.address_id and pick.address_id.id, pick.address_id and pick.address_id.partner_id and pick.address_id.partner_id.id) for pick in move_obj.browse(cr, uid, move_ids)]))
+ address_ids1 = list(set([(pick.address_id and pick.address_id.id, pick.address_id and pick.address_id.partner_id and pick.address_id.partner_id.id) for pick in move_obj.browse(cr, uid, move_ids) if pick.address_id]))
+ if len(address_ids1) == 1:
+ if m.picking_id and m.picking_id.type=='out':
+ res['address_id'] = address_ids[0][0] or False
+ res['partner_id'] = address_ids[0][1] or False
+ if m.picking_id and m.picking_id.type=='in':
+ res['partner_id'] = m.company_id.partner_id.id or False
+ if m.company_id.partner_id:
+ address_default = [add.id for add in m.company_id.partner_id.address if add.type=='default']
+ address_delivery = [add.id for add in m.company_id.partner_id.address if add.type=='delivery']
+ if len(address_delivery):
+ res['address_id'] = address_delivery and address_delivery[0] or False
+ else:
+ res['address_id'] = address_default and address_default[0] or False
+
if 'move%s_product_id'%(m.id) in fields:
res['move%s_product_id'%(m.id)] = m.product_id.id
if 'move%s_product_qty'%(m.id) in fields:
@@ -171,7 +196,7 @@ class stock_partial_move(osv.osv_memory):
currency = False
if hasattr(m.picking_id, 'sale_id') and m.picking_id.sale_id:
currency = m.picking_id.sale_id.pricelist_id.currency_id.id
-
+
if 'move%s_product_price'%(m.id) in fields:
res['move%s_product_price'%(m.id)] = price
if 'move%s_product_currency'%(m.id) in fields:
@@ -185,37 +210,38 @@ class stock_partial_move(osv.osv_memory):
currency = False
if hasattr(m.picking_id, 'purchase_id') and m.picking_id.purchase_id:
currency = m.picking_id.purchase_id.pricelist_id.currency_id.id
-
+
if 'move%s_product_price'%(m.id) in fields:
res['move%s_product_price'%(m.id)] = price
if 'move%s_product_currency'%(m.id) in fields:
res['move%s_product_currency'%(m.id)] = currency
- print res
- return res
+ return res
def do_partial(self, cr, uid, ids, context):
""" Makes partial moves and pickings done.
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
- @param fields: List of fields for which we want default values
- @param context: A standard dictionary
- @return: A dictionary which of fields with values.
- """
-
+ @param fields: List of fields for which we want default values
+ @param context: A standard dictionary
+ @return: A dictionary which of fields with values.
+ """
+
rec_id = context and context.get('active_id', False)
tracking_lot = context.get('tracking_lot', False)
if tracking_lot:
tracking = self.pool.get('stock.tracking')
- tracking_lot = tracking.get_create_tracking_lot(cr, uid,[rec_id], tracking_lot)
- context ['tracking_lot'] = tracking_lot
- move_obj = self.pool.get('stock.move')
+ tracking_lot = tracking.get_create_tracking_lot(cr, uid,[rec_id], tracking_lot)
+ context ['tracking_lot'] = tracking_lot
+ move_obj = self.pool.get('stock.move')
move_ids = context.get('active_ids', False)
partial = self.browse(cr, uid, ids[0], context)
partial_datas = {
- 'delivery_date' : partial.date
+ 'partner_id' : partial.partner_id and partial.partner_id.id or False,
+ 'address_id' : partial.address_id and partial.address_id.id or False,
+ 'delivery_date' : partial.date
}
- for m in move_obj.browse(cr, uid, move_ids):
+ for m in move_obj.browse(cr, uid, move_ids):
if m.state in ('done', 'cancel'):
continue
partial_datas['move%s'%(m.id)] = {
@@ -224,15 +250,15 @@ class stock_partial_move(osv.osv_memory):
'product_uom' : getattr(partial, 'move%s_product_uom'%(m.id)).id
}
- if (m.picking_id.type == 'in') and (m.product_id.cost_method == 'average'):
- partial_datas['move%s'%(m.id)].update({
+ if (m.picking_id.type == 'in') and (m.product_id.cost_method == 'average'):
+ partial_datas['move%s'%(m.id)].update({
'product_price' : getattr(partial, 'move%s_product_price'%(m.id)),
'product_currency': getattr(partial, 'move%s_product_currency'%(m.id)).id
- })
+ })
res = move_obj.do_partial(cr, uid, move_ids, partial_datas, context=context)
return {}
-
-stock_partial_move()
+
+stock_partial_move()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py
index 595215c2a49..c81e8bbf2eb 100644
--- a/addons/stock/wizard/stock_partial_picking.py
+++ b/addons/stock/wizard/stock_partial_picking.py
@@ -34,11 +34,11 @@ class stock_partial_picking(osv.osv_memory):
def view_init(self, cr, uid, fields_list, context=None):
res = super(stock_partial_picking, self).view_init(cr, uid, fields_list, context=context)
- pick_obj = self.pool.get('stock.picking')
+ pick_obj = self.pool.get('stock.picking')
if not context:
context={}
moveids = []
- for pick in pick_obj.browse(cr, uid, context.get('active_ids', [])):
+ for pick in pick_obj.browse(cr, uid, context.get('active_ids', [])):
for m in pick.move_lines:
if m.state in ('done', 'cancel'):
continue
@@ -54,18 +54,17 @@ class stock_partial_picking(osv.osv_memory):
self._columns['move%s_product_price'%(m.id)] = fields.float("Price")
if 'move%s_product_currency'%(m.id) not in self._columns:
self._columns['move%s_product_currency'%(m.id)] = fields.many2one('res.currency',string="Currency")
- return res
+ return res
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False):
- result = super(stock_partial_picking, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu)
+ result = super(stock_partial_picking, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu)
pick_obj = self.pool.get('stock.picking')
- picking_ids = context.get('active_ids', False)
- _moves_arch_lst = """<form string="Process Packing">
- <separator colspan="4" string="Product Information"/>
- <field name="date" colspan="4" />
- <newline/>
+ picking_ids = context.get('active_ids', False)
+ _moves_arch_lst = """<form string="Deliver Products">
+ <separator colspan="4" string="Delivery Information"/>
+ <field name="date" colspan="4" />
<separator colspan="4" string="Move Detail"/>
- """
+ """
_moves_fields = result['fields']
if picking_ids and view_type in ['form']:
for pick in pick_obj.browse(cr, uid, picking_ids, context):
@@ -75,32 +74,32 @@ class stock_partial_picking(osv.osv_memory):
_moves_fields.update({
'move%s_product_id'%(m.id) : {
'string': _('Product'),
- 'type' : 'many2one',
- 'relation': 'product.product',
- 'required' : True,
- 'readonly' : True,
+ 'type' : 'many2one',
+ 'relation': 'product.product',
+ 'required' : True,
+ 'readonly' : True,
},
'move%s_product_qty'%(m.id) : {
'string': _('Quantity'),
'type' : 'float',
- 'required': True,
+ 'required': True,
},
'move%s_product_uom'%(m.id) : {
'string': _('Product UOM'),
- 'type' : 'many2one',
- 'relation': 'product.uom',
- 'required' : True,
- 'readonly' : True,
+ 'type' : 'many2one',
+ 'relation': 'product.uom',
+ 'required' : True,
+ 'readonly' : True,
}
- })
-
+ })
+
_moves_arch_lst += """
<group colspan="4" col="10">
<field name="move%s_product_id" nolabel="1"/>
<field name="move%s_product_qty" string="Qty" />
<field name="move%s_product_uom" nolabel="1" />
"""%(m.id, m.id, m.id)
- if (m.product_id.cost_method == 'average'):
+ if (m.product_id.cost_method == 'average'):
_moves_fields.update({
'move%s_product_price'%(m.id) : {
'string': _('Price'),
@@ -108,9 +107,9 @@ class stock_partial_picking(osv.osv_memory):
},
'move%s_product_currency'%(m.id): {
'string': _('Currency'),
- 'type' : 'float',
- 'type' : 'many2one',
- 'relation': 'res.currency',
+ 'type' : 'float',
+ 'type' : 'many2one',
+ 'relation': 'res.currency',
}
})
_moves_arch_lst += """
@@ -124,14 +123,14 @@ class stock_partial_picking(osv.osv_memory):
<separator string="" colspan="4" />
<label string="" colspan="2"/>
<group col="2" colspan="2">
- <button icon='gtk-cancel' special="cancel"
- string="_Cancel" />
- <button name="do_partial" string="_Process"
- colspan="1" type="object" icon="gtk-apply" />
- </group>
+ <button icon='gtk-cancel' special="cancel"
+ string="_Cancel" />
+ <button name="do_partial" string="_Deliver"
+ colspan="1" type="object" icon="gtk-apply" />
+ </group>
</form>"""
result['arch'] = _moves_arch_lst
- result['fields'] = _moves_fields
+ result['fields'] = _moves_fields
return result
def default_get(self, cr, uid, fields, context=None):
@@ -139,13 +138,13 @@ class stock_partial_picking(osv.osv_memory):
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
- @param fields: List of fields for which we want default values
- @param context: A standard dictionary
- @return: A dictionary which of fields with values.
- """
+ @param fields: List of fields for which we want default values
+ @param context: A standard dictionary
+ @return: A dictionary which of fields with values.
+ """
res = super(stock_partial_picking, self).default_get(cr, uid, fields, context=context)
- pick_obj = self.pool.get('stock.picking')
+ pick_obj = self.pool.get('stock.picking')
if not context:
context={}
moveids = []
@@ -179,22 +178,22 @@ class stock_partial_picking(osv.osv_memory):
res['move%s_product_price'%(m.id)] = price
if 'move%s_product_currency'%(m.id) in fields:
res['move%s_product_currency'%(m.id)] = currency
- return res
+ return res
- def do_partial(self, cr, uid, ids, context):
+ def do_partial(self, cr, uid, ids, context):
""" Makes partial moves and pickings done.
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
- @param fields: List of fields for which we want default values
- @param context: A standard dictionary
- @return: A dictionary which of fields with values.
- """
- pick_obj = self.pool.get('stock.picking')
+ @param fields: List of fields for which we want default values
+ @param context: A standard dictionary
+ @return: A dictionary which of fields with values.
+ """
+ pick_obj = self.pool.get('stock.picking')
picking_ids = context.get('active_ids', False)
partial = self.browse(cr, uid, ids[0], context)
partial_datas = {
- 'delivery_date' : partial.date
+ 'delivery_date' : partial.date
}
for pick in pick_obj.browse(cr, uid, picking_ids):
for m in pick.move_lines:
@@ -206,13 +205,26 @@ class stock_partial_picking(osv.osv_memory):
'product_uom' : getattr(partial, 'move%s_product_uom'%(m.id)).id
}
- if (m.product_id.cost_method == 'average'):
- partial_datas['move%s'%(m.id)].update({
+ if (m.product_id.cost_method == 'average'):
+ partial_datas['move%s'%(m.id)].update({
'product_price' : getattr(partial, 'move%s_product_price'%(m.id)),
'product_currency': getattr(partial, 'move%s_product_currency'%(m.id)).id
- })
+ })
res = pick_obj.do_partial(cr, uid, picking_ids, partial_datas, context=context)
return {}
+
+stock_partial_picking()
+
+
+
+#_moves_arch_end = '''<?xml version="1.0"?>
+#<form string="Picking result">
+# <label string="The picking has been successfully made !" colspan="4"/>
+# <field name="back_order_notification" colspan="4" nolabel="1"/>
+#</form>'''
-stock_partial_picking()
+#_moves_fields_end = {
+# 'back_order_notification': {'string':'Back Order' ,'type':'text', 'readonly':True}
+# }
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/stock/wizard/stock_splitinto.py b/addons/stock/wizard/stock_splitinto.py
new file mode 100644
index 00000000000..dcc97d6379d
--- /dev/null
+++ b/addons/stock/wizard/stock_splitinto.py
@@ -0,0 +1,84 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import fields, osv
+from tools.translate import _
+
+
+class stock_split_into(osv.osv_memory):
+ _name = "stock.split.into"
+ _description = "Split into"
+
+ def default_get(self, cr, uid, fields, context=None):
+ """ Get default values
+ @param self: The object pointer.
+ @param cr: A database cursor
+ @param uid: ID of the user currently logged in
+ @param fields: List of fields for default value
+ @param context: A standard dictionary
+ @return: Default values of fields
+ """
+ res = super(stock_split_into, self).default_get(cr, uid, fields, context=context)
+ move = self.pool.get('stock.move').browse(cr, uid, context['active_id'], context=context)
+ if 'quantity' in fields:
+ res.update({'quantity': move.product_qty})
+ return res
+
+ _columns = {
+ 'quantity': fields.integer('Quantity'),
+ }
+ _defaults = {
+ 'quantity': lambda *x: 1,
+ }
+
+ def split(self, cr, uid, data, context=None):
+ rec_id = context and context.get('active_ids', False)
+ move_obj = self.pool.get('stock.move')
+ new_move = []
+ update_val = {}
+ value_to_split = self.browse(cr, uid, data[0], context)
+ quantity = value_to_split.quantity or 0.0
+ ir_sequence_obj = self.pool.get('ir.sequence')
+ prodlot_obj = self.pool.get('stock.production.lot')
+ for move in move_obj.browse(cr, uid, rec_id):
+ move_qty = move.product_qty
+ uos_qty_rest = move.product_uos_qty
+ quantity_rest = move_qty - quantity
+ if quantity_rest == 0:
+ continue
+ sequence = ir_sequence_obj.get(cr, uid, 'stock.lot.serial')
+ prodlot_id = prodlot_obj.create(cr, uid, {'name': sequence}, {'product_id': move.product_id.id})
+ uos_qty = quantity / move_qty * move.product_uos_qty
+ uos_qty_rest = quantity_rest / move_qty * move.product_uos_qty
+ default_val = {
+ 'product_qty': quantity,
+ 'product_uos_qty': uos_qty,
+ 'state': move.state
+ }
+ current_move = move_obj.copy(cr, uid, move.id, default_val)
+ new_move.append(current_move)
+ update_val['product_qty'] = quantity_rest
+ update_val['prodlot_id'] = prodlot_id
+ update_val['product_uos_qty'] = uos_qty_rest
+ move_obj.write(cr, uid, [move.id], update_val)
+ return {}
+stock_split_into()
+
diff --git a/addons/stock/wizard/stock_splitinto_view.xml b/addons/stock/wizard/stock_splitinto_view.xml
new file mode 100644
index 00000000000..50555eea926
--- /dev/null
+++ b/addons/stock/wizard/stock_splitinto_view.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record id="view_stock_move_split_wizard" model="ir.ui.view">
+ <field name="name">Split move</field>
+ <field name="model">stock.split.into</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Split Move">
+ <separator string="Set quantity to split your palets" colspan="4"/>
+ <field name="quantity"/>
+ <button icon='gtk-cancel' special="cancel"
+ string="Cancel" />
+ <button name="split" string="Ok"
+ type="object" icon="gtk-ok" />
+ </form>
+ </field>
+ </record>
+
+ <record id="split_into" model="ir.actions.act_window">
+ <field name="name">Split into</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">stock.split.into</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">form</field>
+ <field name="target">new</field>
+ </record>
+
+ </data>
+</openerp>
diff --git a/addons/stock_avg_consommation/__init__.py b/addons/stock_avg_consommation/__init__.py
new file mode 100644
index 00000000000..c4d17a90d9a
--- /dev/null
+++ b/addons/stock_avg_consommation/__init__.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import stock_avg_consommation
+import wizard
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/stock_avg_consommation/__openerp__.py b/addons/stock_avg_consommation/__openerp__.py
new file mode 100644
index 00000000000..37008770cae
--- /dev/null
+++ b/addons/stock_avg_consommation/__openerp__.py
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+
+{
+ 'name': 'Stock Average consommation',
+ 'version': '1.0',
+ 'category': 'Generic Modules/Inventory Control',
+ 'author': 'Tiny',
+ 'depends': ['stock'],
+ 'init_xml': [],
+ 'update_xml': ['stock_avg_consommation_view.xml'],
+ 'demo_xml': [],
+ 'installable': True,
+ 'active': False,
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/stock_avg_consommation/stock_avg_consommation.py b/addons/stock_avg_consommation/stock_avg_consommation.py
new file mode 100644
index 00000000000..b9dab63d18b
--- /dev/null
+++ b/addons/stock_avg_consommation/stock_avg_consommation.py
@@ -0,0 +1,100 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import fields,osv
+import tools
+import ir
+import pooler
+from mx import DateTime
+from datetime import datetime
+import time
+from dateutil.relativedelta import relativedelta
+
+class stock_avg_consommation(osv.osv):
+ _name = "stock.avg.consommation"
+ _inherit="product.product"
+
+ def _compute_avg_consommation(self, cr, uid, ids, fields, args, context={}):
+ print ids, fields, args, context
+ date_str=False
+ from_date=context.get('from_date',False)
+ to_date=context.get('to_date',False)
+
+ if from_date and to_date:
+ date_str="date_planned>='%s' and date_planned<='%s'"%(from_date,to_date)
+ elif from_date:
+ date_str="date_planned>='%s'"%(from_date)
+ elif to_date:
+ date_str="date_planned<='%s'"%(to_date)
+
+ date_object_to = to_date and datetime.strptime(to_date, '%Y-%m-%d %H:%M:%S') or datetime.now()
+ date_object_from = from_date and datetime.strptime(from_date, '%Y-%m-%d %H:%M:%S') or (datetime.now() + relativedelta(days=-30))
+ dd = date_object_to - date_object_from
+ total_days=dd.days+1
+ if not from_date and not to_date:
+ date_str="date_planned>='%s' and date_planned<='%s'"%(date_object_from.strftime('%Y-%m-%d 00:00:00'), date_object_to.strftime('%Y-%m-%d 23:59:59'))
+ elif not from_date:
+ date_str="date_planned>='%s'"%(date_object_from.strftime('%Y-%m-%d 00:00:00'))
+ elif not to_date:
+ date_str="date_planned<='%s'"%(date_object_to.strftime('%Y-%m-%d 23:59:59'))
+ res={}
+ for line_id in ids:
+ res[line_id] = False
+ location_ids = []
+
+ if context.get('location', False):
+ if type(context['location']) == type(1):
+ location_ids = [context['location']]
+ elif type(context['location']) in (type(''), type(u'')):
+ location_ids = self.pool.get('stock.location').search(cr, uid, [('name','ilike',context['location'])], context=context)
+ else:
+ location_ids = context['location']
+ else:
+ location_ids = []
+ wids = self.pool.get('stock.warehouse').search(cr, uid, [], context=context)
+ for w in self.pool.get('stock.warehouse').browse(cr, uid, wids, context=context):
+ location_ids.append(w.lot_stock_id.id)
+
+ # build the list of ids of children of the location given by id
+ if context.get('compute_child',True):
+ child_location_ids = self.pool.get('stock.location').search(cr, uid, [('location_id', 'child_of', location_ids)])
+ location_ids = child_location_ids or location_ids
+ else:
+ location_ids = location_ids
+
+
+
+ #sql = """select product_id,sum(product_qty) from stock_move sm,stock_picking sp where sm.picking_id=sp.id and sp.type in ('out','delivery') and %s and location_id <> ANY(%s) and location_dest_id =ANY(%s) group by product_id""" % (date_str, location_ids, location_ids)
+ sql = """select product_id,sum(product_qty) from stock_move sm,stock_picking sp where sm.picking_id=sp.id and sp.type in ('out','delivery') and """+date_str+""" and sm.location_id not in %s and sm.location_dest_id in %s group by product_id"""
+ cr.execute(sql, [tuple(location_ids), tuple(location_ids)])
+ product_ids = []
+ res_sum = cr.fetchall()
+ for line_id, avg in res_sum:
+ res[line_id] = avg/total_days
+ product_ids.append(avg)
+ return res
+
+ _columns = {
+ 'avg_consommation':fields.function(_compute_avg_consommation,method=True, type='float', string="Average Consommation"),
+ }
+stock_avg_consommation()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/stock_avg_consommation/stock_avg_consommation_view.xml b/addons/stock_avg_consommation/stock_avg_consommation_view.xml
new file mode 100644
index 00000000000..d9afed69af3
--- /dev/null
+++ b/addons/stock_avg_consommation/stock_avg_consommation_view.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<openerp>
+ <data>
+ <record id="stock_avg_consommation_tree" model="ir.ui.view">
+ <field name="name">stock.avg.consommation.tree</field>
+ <field name="model">stock.avg.consommation</field>
+ <field name="type">tree</field>
+ <field name="inherit_id" ref="product.product_product_tree_view"/>
+ <field name="arch" type="xml">
+ <field name="state" position="after">
+ <field name="avg_consommation" />
+ </field>
+ </field>
+ </record>
+ </data>
+</openerp>
+
+
diff --git a/addons/stock_avg_consommation/wizard/__init__.py b/addons/stock_avg_consommation/wizard/__init__.py
new file mode 100644
index 00000000000..a7d7cfed3dc
--- /dev/null
+++ b/addons/stock_avg_consommation/wizard/__init__.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import stock_avg_consommation_wizard
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/stock_avg_consommation/wizard/stock_avg_consommation_wizard.py b/addons/stock_avg_consommation/wizard/stock_avg_consommation_wizard.py
new file mode 100644
index 00000000000..7d5d8657aa2
--- /dev/null
+++ b/addons/stock_avg_consommation/wizard/stock_avg_consommation_wizard.py
@@ -0,0 +1,57 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import fields, osv
+
+class stock_location_product(osv.osv_memory):
+ _inherit = "stock.location.product"
+
+ def action_open_window(self, cr, uid, ids, context):
+ """ To open location wise product information specific to given duration
+ @param self: The object pointer.
+ @param cr: A database cursor
+ @param uid: ID of the user currently logged in
+ @param ids: An ID or list of IDs if we want more than one
+ @param context: A standard dictionary
+ @return: Invoice type
+ """
+
+ mod_obj = self.pool.get('ir.model.data')
+ view = mod_obj._get_id(cr, uid, 'stock_avg_consommation', 'stock_avg_consommation_tree')
+ id = mod_obj.read(cr, uid, view, ['res_id'])
+
+ for location_obj in self.read(cr, uid, ids, ['from_date', 'to_date']):
+ return {
+ 'name': False,
+ 'view_id':[id['res_id']],
+ 'view_type': 'form',
+ 'view_mode': 'tree,form',
+ 'res_model': 'stock.avg.consommation',
+ 'type': 'ir.actions.act_window',
+ 'context': {'location': context['active_id'],
+ 'from_date': location_obj['from_date'],
+ 'to_date': location_obj['to_date']},
+ 'domain': [('type', '<>', 'service')],
+ }
+
+stock_location_product()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file
diff --git a/addons/stock_location/mrp_pull.py b/addons/stock_location/mrp_pull.py
index e20f75f07f5..a8a5026bf4c 100644
--- a/addons/stock_location/mrp_pull.py
+++ b/addons/stock_location/mrp_pull.py
@@ -70,6 +70,7 @@ class procurement_order(osv.osv):
'origin': origin,
'company_id': line.company_id and line.company_id.id or False,
'type': line.picking_type,
+ 'stock_journal_id': line.journal_id and line.journal_id.id or False,
'move_type': 'one',
'address_id': line.partner_address_id.id,
'note': line.name, # TODO: note on procurement ?
@@ -124,8 +125,5 @@ class procurement_order(osv.osv):
{'location_id':proc.location_id.id})
self.write(cr, uid, [proc.id], {'state':'running','message':_('Moved from other location')})
-
return False
-
-
procurement_order()
diff --git a/addons/stock_location/stock.py b/addons/stock_location/stock.py
index 4aa4a1999ed..561cdbbecda 100644
--- a/addons/stock_location/stock.py
+++ b/addons/stock_location/stock.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,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 <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -30,6 +30,7 @@ class stock_location_path(osv.osv):
'name': fields.char('Operation', size=64),
'company_id': fields.many2one('res.company', 'Company'),
'product_id' : fields.many2one('product.product', 'Products', ondelete='cascade', select=1),
+ 'journal_id': fields.many2one('stock.journal','Journal'),
'location_from_id' : fields.many2one('stock.location', 'Source Location', ondelete='cascade', select=1),
'location_dest_id' : fields.many2one('stock.location', 'Destination Location', ondelete='cascade', select=1),
'delay': fields.integer('Delay (days)', help="Number of days to do this transition"),
@@ -53,6 +54,7 @@ class stock_location_path(osv.osv):
'auto': lambda *arg: 'auto',
'delay': lambda *arg: 1,
'invoice_state': lambda *args: 'none',
+ 'picking_type':lambda *args:'out',
}
stock_location_path()
@@ -64,6 +66,7 @@ class product_pulled_flow(osv.osv):
'cancel_cascade': fields.boolean('Cancel Cascade', help="Allow you to cancel moves related to the product pull flow"),
'location_id': fields.many2one('stock.location','Location', required=True, help="Is the destination location that needs supplying"),
'location_src_id': fields.many2one('stock.location','Location Source', help="Location used by Destination Location to supply"),
+ 'journal_id': fields.many2one('stock.journal','Journal'),
'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Procure Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until re-supplying. 'Make to Order': When needed, purchase or produce for the procurement request."),
'type_proc': fields.selection([('produce','Produce'),('buy','Buy'),('move','Move')], 'Type of Procurement', required=True),
'company_id': fields.many2one('res.company', 'Company', help="Is used to know to which company belong packings and moves"),
@@ -115,7 +118,7 @@ class stock_location(osv.osv):
if product:
for path in product.path_ids:
if path.location_from_id.id == location.id:
- return path.location_dest_id, path.auto, path.delay
+ return path.location_dest_id, path.auto, path.delay, path.journal_id and path.journal_id.id or False, path.company_id and path.company_id.id or False, path.picking_type
return super(stock_location, self).chained_location_get(cr, uid, location, partner, product, context)
stock_location()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: