From 5c07939320a2d5096d99038728fdba7bf77512e6 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Fri, 2 Jul 2010 15:45:52 +0530 Subject: [PATCH 01/85] [Add]: Task-897 [audaxis] tax linked to country warning if address diff bzr revid: sbh@tinyerp.com-20100702101552-u45m5hven8mcu1mn --- addons/account_tax_country/__init__.py | 25 +++++++++ addons/account_tax_country/__openerp__.py | 42 ++++++++++++++ .../account_tax_country.py | 56 +++++++++++++++++++ .../account_tax_country.xml | 22 ++++++++ 4 files changed, 145 insertions(+) create mode 100644 addons/account_tax_country/__init__.py create mode 100644 addons/account_tax_country/__openerp__.py create mode 100644 addons/account_tax_country/account_tax_country.py create mode 100644 addons/account_tax_country/account_tax_country.xml diff --git a/addons/account_tax_country/__init__.py b/addons/account_tax_country/__init__.py new file mode 100644 index 00000000000..5b71912151a --- /dev/null +++ b/addons/account_tax_country/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import account_tax_country + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + diff --git a/addons/account_tax_country/__openerp__.py b/addons/account_tax_country/__openerp__.py new file mode 100644 index 00000000000..e7e127127e7 --- /dev/null +++ b/addons/account_tax_country/__openerp__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + + +{ + "name" : "Accounting and Financial Management", + "version" : "1.1", + "depends" : ["account"], + "author" : "Tiny", + "category": 'Generic Modules/Accounting', + "description": """Taxes to countries + """, + 'website': 'http://www.openerp.com', + 'init_xml': [], + 'update_xml': [ + "account_tax_country.xml" + ], + 'demo_xml': [ + + ], + 'installable': True, + 'active': False, +} +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/account_tax_country/account_tax_country.py b/addons/account_tax_country/account_tax_country.py new file mode 100644 index 00000000000..6d1f7b1d753 --- /dev/null +++ b/addons/account_tax_country/account_tax_country.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import time +import netsvc +from osv import fields, osv + +from tools.misc import currency +from tools.translate import _ +class account_tax(osv.osv): + _inherit='account.tax' + _columns = { + 'country_id':fields.many2many('res.country','country_invoice_line_tax','invoice_line_id','tax_id',string='Country'), + } +account_tax() +class account_invoice(osv.osv): + _inherit='account.invoice' + + def _checkreset_taxes(self, cr, uid, ids, context=None): + + for invoice in self.browse(cr,uid,ids): + flag=False + country_id = invoice.address_invoice_id.country_id.id + for i in invoice.invoice_line: + tax_ids=i.invoice_line_tax_id + for tax in tax_ids: + for country in tax.country_id: + if country_id!=country.id: + flag=True + if flag: + raise osv.except_osv(_('Error!'), _('Find a valid Tax of country !')) + return True + _constraints = [ + (_checkreset_taxes, 'Unable to find a valid country in Tax', ['invoice_line']) + ] + + +account_invoice() diff --git a/addons/account_tax_country/account_tax_country.xml b/addons/account_tax_country/account_tax_country.xml new file mode 100644 index 00000000000..341e8db0239 --- /dev/null +++ b/addons/account_tax_country/account_tax_country.xml @@ -0,0 +1,22 @@ + + + + + + + account.tax.country.form + account.tax + form + + + + + + + + + + + + + \ No newline at end of file From 110799550501d58720a27ad29407bc27870e0ba9 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Thu, 8 Jul 2010 16:46:44 +0530 Subject: [PATCH 02/85] [IMP] procument,project_mrp: Add the comment in process file and add the task_id in procument bzr revid: sbh@tinyerp.com-20100708111644-iqxoddxs54xk5gtg --- addons/procurement/process/procurement_process.xml | 7 +------ addons/product/product_view.xml | 6 +++--- addons/project_mrp/__openerp__.py | 1 + addons/project_mrp/mrp.py | 5 ++++- addons/stock/product_view.xml | 6 +++--- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/addons/procurement/process/procurement_process.xml b/addons/procurement/process/procurement_process.xml index e5b94bb225d..e12c97b2070 100644 --- a/addons/procurement/process/procurement_process.xml +++ b/addons/procurement/process/procurement_process.xml @@ -3,7 +3,7 @@ @@ -11,11 +11,6 @@ - - - diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index b5f48efd90a..e58987cf2c8 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -127,9 +127,9 @@ - - - + + + diff --git a/addons/project_mrp/__openerp__.py b/addons/project_mrp/__openerp__.py index a51a95c5d16..2ac983e67e4 100644 --- a/addons/project_mrp/__openerp__.py +++ b/addons/project_mrp/__openerp__.py @@ -51,6 +51,7 @@ automatically created via sale orders. 'init_xml': [], 'update_xml': ['project_mrp_workflow.xml', #'process/project_mrp_process.xml', + 'project_mrp_view.xml' ], 'demo_xml': [], 'test': ['test/project_task_procurement.yml'], diff --git a/addons/project_mrp/mrp.py b/addons/project_mrp/mrp.py index dc5d52e241d..a45601e6245 100644 --- a/addons/project_mrp/mrp.py +++ b/addons/project_mrp/mrp.py @@ -26,6 +26,9 @@ import tools class procurement_order(osv.osv): _name = "procurement.order" _inherit = "procurement.order" + _columns = { + 'task_id': fields.many2one('project.task', 'Task') + } def action_produce_assign_service(self, cr, uid, ids, context=None): if context is None: @@ -93,7 +96,7 @@ class procurement_order(osv.osv): 'company_id': procurement.company_id.id, 'project_id': project_id, },context=context) - + self.write(cr,uid,ids,{'task_id':task_id}) return task_id procurement_order() diff --git a/addons/stock/product_view.xml b/addons/stock/product_view.xml index 1d8db4f0228..01214bad6a4 100644 --- a/addons/stock/product_view.xml +++ b/addons/stock/product_view.xml @@ -116,9 +116,9 @@ - - - + + + From e1f0e06084ae19a3b3df01efaa33560d9ccb08e3 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Thu, 8 Jul 2010 17:16:52 +0530 Subject: [PATCH 03/85] [ADD] proejct_mrp: Add user_id and project_id in product bzr revid: sbh@tinyerp.com-20100708114652-h1d2o8h4oiu9gvlu --- addons/project_mrp/project_mrp.py | 8 +++++++ addons/project_mrp/project_mrp_view.xml | 30 +++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 addons/project_mrp/project_mrp_view.xml diff --git a/addons/project_mrp/project_mrp.py b/addons/project_mrp/project_mrp.py index 09820d44c71..d946e2c2fd6 100644 --- a/addons/project_mrp/project_mrp.py +++ b/addons/project_mrp/project_mrp.py @@ -48,5 +48,13 @@ class project_task(osv.osv): return True project_task() +class product_product(osv.osv): + _inherit = "product.product" + _columns = { + 'user_id': fields.many2one('res.users', 'Responsible', ondelete='set null',help='Project Manager'), + 'project_id': fields.many2one('project.project', 'Project', ondelete='set null',) + } +product_product() + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_mrp/project_mrp_view.xml b/addons/project_mrp/project_mrp_view.xml new file mode 100644 index 00000000000..dce408f793b --- /dev/null +++ b/addons/project_mrp/project_mrp_view.xml @@ -0,0 +1,30 @@ + + + + + procurement.procurement.form.view.inherit + procurement.order + form + + + + + + + + + + product.form.view.inherit + product.product + form + + + + + + + + + + + \ No newline at end of file From e1becc32a7a5e86ff4918151692559b179970be2 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Thu, 8 Jul 2010 17:44:25 +0530 Subject: [PATCH 04/85] [IMP] project_mpr: create task from procurement, it takes that info + the time planned as sum of customer lead and manufcatoring time bzr revid: sbh@tinyerp.com-20100708121425-34l75ebg1j93cqli --- addons/project_mrp/mrp.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/project_mrp/mrp.py b/addons/project_mrp/mrp.py index a45601e6245..eca7b283948 100644 --- a/addons/project_mrp/mrp.py +++ b/addons/project_mrp/mrp.py @@ -72,6 +72,7 @@ class procurement_order(osv.osv): self.write(cr, uid, [procurement.id], {'state': 'running'}) name_task = ('','') + planned_hours=0.0 if procurement.product_id.type == 'service': proc_name = procurement.name if procurement.origin == proc_name: @@ -80,12 +81,12 @@ class procurement_order(osv.osv): name_task = (procurement.origin, proc_name or '') else: name_task = (procurement.product_id.name or procurement.origin, procurement.name or '') - + planned_hours= procurement.product_id.sale_delay +procurement.product_id. produce_delay task_id = self.pool.get('project.task').create(cr, uid, { 'name': '%s:%s' % name_task, 'date_deadline': procurement.date_planned, - 'planned_hours': procurement.product_qty, - 'remaining_hours': procurement.product_qty, + 'planned_hours': planned_hours, + 'remaining_hours': planned_hours, 'user_id': procurement.product_id.product_manager.id, 'notes': "b"+(l and l.order_id.note or ''), 'procurement_id': procurement.id, From f42e7f1eebc22cc98cebe72142528306eb14e8c0 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Wed, 25 Aug 2010 11:18:25 +0530 Subject: [PATCH 05/85] [FIX]: marketing_campaign_mailchimp: Fixed access right for mailchimp.account object bzr revid: rpa@tinyerp.com-20100825054825-94fa9rsen5n3psws --- addons/marketing_campaign_mailchimp/security/ir.model.access.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/marketing_campaign_mailchimp/security/ir.model.access.csv b/addons/marketing_campaign_mailchimp/security/ir.model.access.csv index d54743b7ed8..8842a79db18 100644 --- a/addons/marketing_campaign_mailchimp/security/ir.model.access.csv +++ b/addons/marketing_campaign_mailchimp/security/ir.model.access.csv @@ -3,3 +3,4 @@ "access_mailchimp_account_system","mailchimp.account.user","marketing_campaign_mailchimp.model_mailchimp_account","base.groups_system",1,0,0,0 "access_email_template_account_system","email_template_account_user","marketing_campaign_mailchimp.model_email_template_account","base.res_groups_email_template_admin",1,1,1,1 "access_email_template_campaign","email_template_campaign","model_email_template","base.res_groups_email_template_admin",1,1,1,1 +"access_mailchimp_account_user","mailchimp_account_user","model_mailchimp_account","base.res_groups_email_template_admin",1,1,1,1 From 477bfdbe813c716c8854a85c49198634ba6324d0 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Wed, 25 Aug 2010 11:20:49 +0530 Subject: [PATCH 06/85] [IMP]: marketing: Improvement in label for crm_profiling in config wizard bzr revid: rpa@tinyerp.com-20100825055049-311ws2leh6unzrr2 --- addons/marketing/marketing_wizard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/marketing/marketing_wizard.py b/addons/marketing/marketing_wizard.py index 78b4e78ff6c..8d1a6fa50ed 100644 --- a/addons/marketing/marketing_wizard.py +++ b/addons/marketing/marketing_wizard.py @@ -32,7 +32,7 @@ class marketing_installer(osv.osv_memory): 'marketing_campaign_mailchimp':fields.boolean('Mailchimp Integration', help="This modules integrate mailchimp.com's service with OpenERP to automate mass mailings."), 'crm_profiling':fields.boolean('Profiling Tools', - help="Helps you to perform segmentation within partners and design questionaires.") + help="Helps you to perform segmentation within partners and design segmentation questionnaires") } marketing_installer() From ba320d4c2e5c99d51598422001f2ff0d7971de39 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Wed, 25 Aug 2010 11:31:18 +0530 Subject: [PATCH 07/85] [IMP]purchase_requisition: Remove the requisition_id from purchase order list,purchase order form set Purchase Requisition field after the Received checkbox, confirm a purchase requisition without purchase_order bzr revid: sbh@tinyerp.com-20100825060118-wyk1xyijlq2vfnsh --- .../purchase_requisition/purchase_requisition.py | 3 --- .../purchase_requisition_view.xml | 16 ++++------------ 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/addons/purchase_requisition/purchase_requisition.py b/addons/purchase_requisition/purchase_requisition.py index 4e7ebb19a64..7e15e06922f 100644 --- a/addons/purchase_requisition/purchase_requisition.py +++ b/addons/purchase_requisition/purchase_requisition.py @@ -64,9 +64,6 @@ class purchase_requisition(osv.osv): return True def tender_in_progress(self, cr, uid, ids, context=None): - for quotations in self.browse(cr, uid, ids): - if not quotations.purchase_ids: - raise osv.except_osv(_('Purchase order required'),('You should have atleast one purchase order line defined for this tender')) self.write(cr, uid, ids, {'state':'in_progress'} ,context=context) for (id,name) in self.name_get(cr, uid, ids): message = _('Tender') + " '" + name + "' "+ _(" is In Progress") diff --git a/addons/purchase_requisition/purchase_requisition_view.xml b/addons/purchase_requisition/purchase_requisition_view.xml index 8a9c4375e52..1a64e94c5f6 100644 --- a/addons/purchase_requisition/purchase_requisition_view.xml +++ b/addons/purchase_requisition/purchase_requisition_view.xml @@ -2,17 +2,6 @@ - - purchase.order.tree.inherit - tree - purchase.order - - - - - - - purchase.order.form.inherit @@ -20,7 +9,7 @@ purchase.order - + @@ -77,6 +66,9 @@ +