@@ -818,7 +818,7 @@
|
||||
<field groups="base.group_extended" name="price_include"/>
|
||||
<field name="type_tax_use"/>
|
||||
<newline/>
|
||||
<field colspan="4" groups="base.group_extended" name="child_ids"/>
|
||||
<field colspan="4" groups="base.group_extended" name="child_ids" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Tax Declaration">
|
||||
<separator colspan="4" string="Invoices"/>
|
||||
|
||||
@@ -1171,7 +1171,7 @@ class account_invoice(osv.osv):
|
||||
((move_id, invoice.move_id.id),))
|
||||
lines = line.browse(cr, uid, map(lambda x: x[0], cr.fetchall()) )
|
||||
for l in lines+invoice.payment_ids:
|
||||
if l.account_id.id==src_account_id:
|
||||
if l.account_id.id == src_account_id:
|
||||
line_ids.append(l.id)
|
||||
total += (l.debit or 0.0) - (l.credit or 0.0)
|
||||
|
||||
|
||||
@@ -32,6 +32,12 @@
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_customer0}:
|
||||
- state == 'proforma2'
|
||||
-
|
||||
I check that there is no move attached to the invoice
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
acc_id=self.browse(cr, uid, ref("account_invoice_customer0"))
|
||||
assert acc_id.move_id, "Move not created"
|
||||
-
|
||||
I create invoice by clicking on Create button
|
||||
-
|
||||
@@ -41,6 +47,13 @@
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_customer0}:
|
||||
- state == 'open'
|
||||
|
||||
-
|
||||
I check that now there is a move attached to the invoice
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
acc_id=self.browse(cr, uid, ref("account_invoice_customer0"))
|
||||
assert acc_id.move_id, "Move created"
|
||||
-
|
||||
I create a record for partial payment of 1000 EUR.
|
||||
-
|
||||
|
||||
@@ -59,33 +59,33 @@
|
||||
"tz": False, "active_id": ref("account.menu_action_move_journal_line_form"),
|
||||
})
|
||||
|
||||
-
|
||||
In order to test Cancel Opening Entries I cancelled the opening entries created for "Fiscal Year 2011"
|
||||
-
|
||||
!record {model: account.open.closed.fiscalyear, id: account_open_closed_fiscalyear_1}:
|
||||
fyear_id: account.data_fiscalyear
|
||||
-
|
||||
I clicked on Open button
|
||||
-
|
||||
!python {model: account.open.closed.fiscalyear}: |
|
||||
self.remove_entries(cr, uid, [ref("account_open_closed_fiscalyear_1")], {"lang":
|
||||
'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_open_closed_fy")],
|
||||
"tz": False, "active_id": ref("account.menu_wizard_open_closed_fy"), })
|
||||
-
|
||||
I check the opening entries By using "Entries by Line wizard"
|
||||
-
|
||||
!record {model: account.move.journal, id: account_move_journal_2}:
|
||||
journal_id: account.sales_journal
|
||||
period_id: account_period_jan11
|
||||
|
||||
-
|
||||
I checked the Opening entries are cancelled successfully
|
||||
-
|
||||
!python {model: account.move.journal}: |
|
||||
self.action_open_window(cr, uid, [ref("account_move_journal_2")], {"lang": 'en_US',
|
||||
"active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_move_journal_line_form")],
|
||||
"tz": False, "active_id": ref("account.menu_action_move_journal_line_form"),
|
||||
})
|
||||
#-
|
||||
# In order to test Cancel Opening Entries I cancelled the opening entries created for "Fiscal Year 2011"
|
||||
#-
|
||||
# !record {model: account.open.closed.fiscalyear, id: account_open_closed_fiscalyear_1}:
|
||||
# fyear_id: account.data_fiscalyear
|
||||
#-
|
||||
# I clicked on Open button
|
||||
#-
|
||||
# !python {model: account.open.closed.fiscalyear}: |
|
||||
# self.remove_entries(cr, uid, [ref("account_open_closed_fiscalyear_1")], {"lang":
|
||||
# 'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_open_closed_fy")],
|
||||
# "tz": False, "active_id": ref("account.menu_wizard_open_closed_fy"), })
|
||||
#-
|
||||
# I check the opening entries By using "Entries by Line wizard"
|
||||
#-
|
||||
# !record {model: account.move.journal, id: account_move_journal_2}:
|
||||
# journal_id: account.sales_journal
|
||||
# period_id: account_period_jan11
|
||||
#
|
||||
#-
|
||||
# I checked the Opening entries are cancelled successfully
|
||||
#-
|
||||
# !python {model: account.move.journal}: |
|
||||
# self.action_open_window(cr, uid, [ref("account_move_journal_2")], {"lang": 'en_US',
|
||||
# "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_move_journal_line_form")],
|
||||
# "tz": False, "active_id": ref("account.menu_action_move_journal_line_form"),
|
||||
# })
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<menuitem id="menu_base_action_rule" name="Action Rule"
|
||||
<menuitem id="base.menu_base_action_rule" name="Automated Actions"
|
||||
groups="base.group_extended"
|
||||
parent="base.menu_base_config" sequence="500" />
|
||||
parent="base.menu_base_config" sequence="3" />
|
||||
|
||||
<!--
|
||||
Action Rule Form View
|
||||
@@ -105,7 +105,7 @@
|
||||
<!-- Action Rule Action -->
|
||||
|
||||
<record id="base_action_rule_act" model="ir.actions.act_window">
|
||||
<field name="name">Action Rules</field>
|
||||
<field name="name">Automated Actions</field>
|
||||
<field name="res_model">base.action.rule</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
@@ -113,7 +113,7 @@
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_base_action_rule_form"
|
||||
parent="menu_base_action_rule" action="base_action_rule_act" />
|
||||
parent="base.menu_base_action_rule" action="base_action_rule_act" sequence="1"/>
|
||||
|
||||
|
||||
</data>
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
|
||||
<!-- Calenadar's menu -->
|
||||
<menuitem id="base.menu_calendar_configuration" name="Calendar"
|
||||
parent="base.menu_base_config" sequence="15" />
|
||||
parent="base.menu_base_config" sequence="6" />
|
||||
|
||||
<!-- Invitation menu -->
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_res_alarm_view" model="ir.actions.act_window">
|
||||
<field name="name">Available Alarms</field>
|
||||
<field name="name">Alarms</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">res.alarm</field>
|
||||
<field name="view_type">form</field>
|
||||
|
||||
@@ -86,6 +86,7 @@ Create dashboard for CRM that includes:
|
||||
'wizard/crm_send_email_view.xml',
|
||||
'wizard/crm_forward_to_partner_view.xml',
|
||||
'wizard/crm_custom_create_menu_view.xml',
|
||||
'wizard/crm_merge_opportunities_view.xml',
|
||||
|
||||
'crm_view.xml',
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<menuitem action="crm_lead_stage_act" id="menu_crm_lead_stage_act" name="Stages"
|
||||
groups="base.group_extended" sequence="0"
|
||||
parent="menu_crm_config_lead" />
|
||||
parent="base.menu_crm_config_lead" />
|
||||
|
||||
|
||||
<!-- Resource Type Form View -->
|
||||
@@ -31,7 +31,7 @@
|
||||
<menuitem action="crm_lead_resource_act"
|
||||
id="menu_crm_lead_resource_act" name="Lead Sources"
|
||||
groups="base.group_extended" sequence="2"
|
||||
parent="menu_crm_config_lead" />
|
||||
parent="base.menu_crm_config_lead" />
|
||||
|
||||
<!-- CRM Lead Form View -->
|
||||
<record model="ir.ui.view" id="crm_case_form_view_leads">
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<field name="context">{'object_id':'crm.meeting'}</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="crm_meeting_categ_action" name="Categories"
|
||||
id="menu_crm_case_meeting-act" parent="menu_crm_config_meeting" />
|
||||
<menuitem action="crm_meeting_categ_action" name="Categories of Meeting"
|
||||
id="menu_crm_case_meeting-act" parent="base.menu_calendar_configuration" sequence="1"/>
|
||||
|
||||
<!-- CRM Meetings Form View -->
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
<field name="date_action"/>
|
||||
<field name="title_action"/>
|
||||
<field name="priority" string="Priority"/>
|
||||
<button string="Merge with Other Opportunity"
|
||||
name="%(merge_opportunity_act)d" icon="gtk-add" type="action" />
|
||||
<newline/>
|
||||
<field name="type" invisible="1"/>
|
||||
</group>
|
||||
|
||||
+11
-11
@@ -2,14 +2,14 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<menuitem id="base.menu_crm_config_sales" name="Sales"
|
||||
parent="base.menu_base_config" sequence="1"/>
|
||||
<!--menuitem id="base.menu_crm_config_sales" name="Sales"
|
||||
parent="base.menu_base_config" sequence="1"/-->
|
||||
|
||||
<menuitem id="menu_crm_config_lead" name="Leads & Opportunities"
|
||||
parent="base.menu_crm_config_sales" sequence="0" groups="base.group_extended"/>
|
||||
<menuitem id="base.menu_crm_config_lead" name="Leads & Opportunities"
|
||||
parent="base.menu_base_config" sequence="2" groups="base.group_extended"/>
|
||||
|
||||
<menuitem id="menu_crm_config_meeting" name="Meeting"
|
||||
parent="base.menu_base_config" sequence="4"/>
|
||||
<!--menuitem id="menu_crm_config_meeting" name="Meeting"
|
||||
parent="base.menu_base_config" sequence="4"/-->
|
||||
|
||||
<menuitem id="menu_crm_config_phonecall" name="Phone Call"
|
||||
parent="base.menu_base_config" sequence="5" groups="base.group_extended"/>
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
<menuitem action="crm_case_section_act"
|
||||
id="menu_crm_case_section_act" sequence="4"
|
||||
parent="menu_crm_config_lead" />
|
||||
parent="base.menu_crm_config_lead" />
|
||||
|
||||
|
||||
<!-- CRM Stage Tree View -->
|
||||
@@ -180,7 +180,7 @@
|
||||
|
||||
<menuitem action="crm_case_categ-act"
|
||||
id="menu_crm_case_categ-act" name="Categories"
|
||||
parent="menu_crm_config_lead" sequence="1"/>
|
||||
parent="base.menu_crm_config_lead" sequence="1"/>
|
||||
|
||||
<!-- Resource Type of case Tree View -->
|
||||
|
||||
@@ -334,7 +334,7 @@
|
||||
</record>
|
||||
|
||||
<record id="crm_segmentation_tree-act" model="ir.actions.act_window">
|
||||
<field name="name">Segmentation</field>
|
||||
<field name="name">Partners Segmentation</field>
|
||||
<field name="res_model">crm.segmentation</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
@@ -342,8 +342,8 @@
|
||||
|
||||
<menuitem action="crm_segmentation_tree-act"
|
||||
id="menu_crm_segmentation-act"
|
||||
groups="base.group_extended" sequence="6"
|
||||
parent="base.menu_config_address_book" />
|
||||
groups="base.group_extended" sequence="2"
|
||||
parent="base.menu_base_action_rule" />
|
||||
|
||||
<record model="ir.ui.view" id="view_users_form_simple_modif_inherited1">
|
||||
<field name="name">view.users.form.crm.modif.inherited1</field>
|
||||
|
||||
@@ -31,6 +31,8 @@ import crm_phonecall_to_opportunity
|
||||
import crm_partner_to_opportunity
|
||||
|
||||
import crm_custom_create_menu
|
||||
import crm_merge_opportunities
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
# -*- 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 _
|
||||
|
||||
class crm_merge_opportunity(osv.osv_memory):
|
||||
"""Merge two Opportunities"""
|
||||
|
||||
_name = 'crm.merge.opportunity'
|
||||
_description = 'Merge two Opportunities'
|
||||
|
||||
def view_init(self, cr, uid, fields, context=None):
|
||||
"""
|
||||
This function checks for precondition before wizard executes
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param fields: List of fields for default value
|
||||
@param context: A standard dictionary for contextual values
|
||||
|
||||
"""
|
||||
record_id = context and context.get('active_id', False) or False
|
||||
if record_id:
|
||||
opp_obj = self.pool.get('crm.lead')
|
||||
opp = opp_obj.browse(cr, uid, record_id, context=context)
|
||||
if opp.type != 'opportunity':
|
||||
raise osv.except_osv(_('Warning!'), _('Can only perform this Operation for "Opportunities".'))
|
||||
if not opp.partner_id:
|
||||
raise osv.except_osv(_('Warning!'), _('Opportunity must have Partner assigned before merging with other Opportunity.'))
|
||||
#Search for Opportunity for the same partner
|
||||
opp_ids = opp_obj.search(cr, uid, [('partner_id', '=', opp.partner_id.id), ('type', '=', 'opportunity')])
|
||||
if not len(opp_ids) > 1:
|
||||
raise osv.except_osv(_('Warning!'), _("There are no other Opportunities for the partner '%s'.") % (opp.partner_id.name))
|
||||
pass
|
||||
|
||||
|
||||
def action_merge(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
This function merges two opportunities
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of Phonecall to Opportunity IDs
|
||||
@param context: A standard dictionary for contextual values
|
||||
|
||||
@return : Dictionary value for created Opportunity form
|
||||
"""
|
||||
record_id = context and context.get('active_id', False) or False
|
||||
if record_id:
|
||||
opp_obj = self.pool.get('crm.lead')
|
||||
message_obj = self.pool.get('mailgate.message')
|
||||
current_opp = opp_obj.browse(cr, uid, record_id, context=context)
|
||||
|
||||
for this in self.browse(cr, uid, ids, context=context):
|
||||
for opp in this.opportunity_ids:
|
||||
opp_obj.write(cr, uid, opp.id, {
|
||||
'stage_id': opp.stage_id.id or current_opp.stage_id.id or False,
|
||||
'priority': opp.priority or current_opp.priority,
|
||||
'email_from': opp.email_from or current_opp.email_from,
|
||||
'phone': opp.phone or current_opp.phone,
|
||||
'section_id': opp.section_id.id or current_opp.section_id.id or False,
|
||||
'categ_id': opp.categ_id.id or current_opp.categ_id.id or False,
|
||||
'description': (opp.description or '') + '\n' + (current_opp.description or ''),
|
||||
'partner_name': opp.partner_name or current_opp.partner_name,
|
||||
'title': opp.title.id or current_opp.title.id or False,
|
||||
'function': opp.function or current_opp.function,
|
||||
'street': opp.street or current_opp.street,
|
||||
'street2': opp.street2 or current_opp.street2,
|
||||
'zip': opp.zip or current_opp.zip,
|
||||
'city': opp.city or current_opp.city,
|
||||
'country_id': opp.country_id.id or current_opp.country_id.id or False,
|
||||
'state_id': opp.state_id.id or current_opp.state_id.id or False,
|
||||
'fax': opp.fax or current_opp.fax,
|
||||
'mobile': opp.mobile or current_opp.mobile,
|
||||
'email_cc': ','.join(filter(lambda x: x, [opp.email_cc, current_opp.email_cc]))
|
||||
})
|
||||
for history in current_opp.message_ids:
|
||||
if history.history:
|
||||
new_history = message_obj.copy(cr, uid, history.id, default={'res_id': opp.id})
|
||||
opp_obj._history(cr, uid, [current_opp], _('Merged into Opportunity: %s') % (opp.id))
|
||||
opp_obj.case_cancel(cr, uid, [record_id])
|
||||
|
||||
return {}
|
||||
|
||||
_columns = {
|
||||
'opportunity_ids' : fields.many2many('crm.lead', 'merge_opportunity_rel', 'merge_id', 'opportunity_id', 'Opportunities', domain=[('type', '=', 'opportunity')]),
|
||||
}
|
||||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
"""
|
||||
This function gets default values
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param fields: List of fields for default value
|
||||
@param context: A standard dictionary for contextual values
|
||||
|
||||
@return : default values of fields.
|
||||
"""
|
||||
record_id = context and context.get('active_id', False) or False
|
||||
res = super(crm_merge_opportunity, self).default_get(cr, uid, fields, context=context)
|
||||
|
||||
if record_id:
|
||||
opp_obj = self.pool.get('crm.lead')
|
||||
opp = opp_obj.browse(cr, uid, record_id, context=context)
|
||||
opp_ids = opp_obj.search(cr, uid, [('partner_id', '=', opp.partner_id.id), ('type', '=', 'opportunity')])
|
||||
# Removing current opportunity
|
||||
opp_ids.remove(record_id)
|
||||
|
||||
if 'opportunity_ids' in fields:
|
||||
res.update({'opportunity_ids': opp_ids})
|
||||
return res
|
||||
|
||||
crm_merge_opportunity()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Merge Opportunities -->
|
||||
|
||||
<record model="ir.ui.view" id="merge_opportunity_form">
|
||||
<field name="name">crm.merge.opportunity.form</field>
|
||||
<field name="model">crm.merge.opportunity</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Merge Opportunities">
|
||||
<separator string="Select Opportunities" colspan="4"/>
|
||||
<field name="opportunity_ids" nolabel="1" colspan="4" width="550" height="300"/>
|
||||
<separator colspan="4"/>
|
||||
<group col="4" colspan="4">
|
||||
<label string="" colspan="2"/>
|
||||
<button string="_Cancel" icon="gtk-cancel" special="cancel" />
|
||||
<button name="action_merge" type="object"
|
||||
string="_Merge" icon="gtk-ok" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Merge Opportunities action -->
|
||||
|
||||
<record model="ir.actions.act_window" id="merge_opportunity_act">
|
||||
<field name="name">Merge Opportunities</field>
|
||||
<field name="res_model">crm.merge.opportunity</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="merge_opportunity_form"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<!-- This will also come in Leads Form as Lead and Opportunity are same object-->
|
||||
<!-- <record id="merge_opportunity_act_value" model="ir.values">
|
||||
<field name="model_id" ref="model_crm_lead" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Merge Opportunities</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('merge_opportunity_act'))"/>
|
||||
<field name="key">action</field>
|
||||
<field name="model">crm.lead</field>
|
||||
</record> -->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -52,12 +52,6 @@ class crm_claim(osv.osv, crm.crm_case):
|
||||
"canall which is this opportunity source."),
|
||||
'planned_revenue': fields.float('Planned Revenue'),
|
||||
'planned_cost': fields.float('Planned Costs'),
|
||||
'som': fields.many2one('res.partner.som', 'State of Mind', \
|
||||
help="The minds states allow to define a value scale "\
|
||||
"which represents the partner mentality in "\
|
||||
"relation to our services.The scale has to be "\
|
||||
"created with a factor for each level from 0 "\
|
||||
"(Very dissatisfied) to 10 (Extremely satisfied)"),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.claim')]"),
|
||||
|
||||
@@ -107,7 +107,7 @@ class crm_claim_report(osv.osv):
|
||||
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), \
|
||||
c.state, c.user_id,c.section_id, c.stage_id,\
|
||||
c.categ_id,c.partner_id,c.company_id,c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
|
||||
,c.priority,c.type_id,c.som
|
||||
,c.priority,c.type_id
|
||||
)""")
|
||||
|
||||
crm_claim_report()
|
||||
|
||||
@@ -75,11 +75,6 @@ class crm_fundraising(osv.osv, crm.crm_case):
|
||||
"modes available with the customer." \
|
||||
" With each commercial opportunity, you can indicate\
|
||||
the canall which is this opportunity source."),
|
||||
'som': fields.many2one('res.partner.som', 'State of Mind', \
|
||||
help="The minds states allow to define a value scale which represents" \
|
||||
"the partner mentality in relation to our services.The scale has" \
|
||||
"to be created with a factor for each level from 0 \
|
||||
(Very dissatisfied) to 10 (Extremely satisfied)."),
|
||||
'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
|
||||
help='The state is set to \'Draft\', when a case is created.\
|
||||
\nIf the case is in progress the state is set to \'Open\'.\
|
||||
|
||||
@@ -61,11 +61,6 @@ class crm_helpdesk(osv.osv, crm.crm_case):
|
||||
'planned_cost': fields.float('Planned Costs'),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'probability': fields.float('Probability (%)'),
|
||||
'som': fields.many2one('res.partner.som', 'State of Mind', \
|
||||
help="The minds states allow to define a value scale which represents" \
|
||||
"the partner mentality in relation to our services.The scale has" \
|
||||
"to be created with a factor for each level from 0" \
|
||||
"(Very dissatisfied) to 10 (Extremely satisfied)."),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.helpdesk')]"),
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<data noupdate="1">
|
||||
<record id="crm_helpdesk_wheretodownloadopenerp0" model="crm.helpdesk">
|
||||
<field model="res.partner.canal" name="canal_id" search="[('name', '=', u'E-mail')]"/>
|
||||
<field name="som" ref="base.som_normal"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
@@ -17,7 +16,6 @@
|
||||
|
||||
<record id="crm_helpdesk_cannotabletoconnecttoserver0" model="crm.helpdesk">
|
||||
<field model="res.partner.canal" name="canal_id" search="[('name', '=', u'website')]"/>
|
||||
<field name="som" ref="base.som_fury"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
@@ -31,7 +29,6 @@
|
||||
|
||||
<record id="crm_helpdesk_documentationforcrm0" model="crm.helpdesk">
|
||||
<field model="res.partner.canal" name="canal_id" search="[('name', '=', u'phone')]"/>
|
||||
<field name="som" ref="base.som_happy"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
@@ -46,7 +43,6 @@
|
||||
<record id="crm_helpdesk_howtocreateanewmodule0" model="crm.helpdesk">
|
||||
<field model="res.partner.canal" name="canal_id" search="[('name', '=', u'E-mail')]"/>
|
||||
<field name="partner_address_id" ref="base.res_partner_address_9"/>
|
||||
<field name="som" ref="base.som_normal"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="partner_id" ref="base.res_partner_2"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem parent="base.menu_crm_config_sales" id="menu_segm_questionnaire"
|
||||
<menuitem parent="base.menu_crm_config_lead" id="menu_segm_questionnaire"
|
||||
action="open_questionnaires" />
|
||||
|
||||
<record model="ir.actions.act_window" id="open_questions">
|
||||
@@ -26,7 +26,7 @@
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem parent="base.menu_crm_config_sales" id="menu_segm_answer"
|
||||
<menuitem parent="base.menu_crm_config_lead" id="menu_segm_answer"
|
||||
action="open_questions" />
|
||||
|
||||
<!-- Profiling Questionnaire Tree view -->
|
||||
|
||||
@@ -8,24 +8,32 @@
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<form position="attributes">
|
||||
<attribute name="string">Account Journal</attribute>
|
||||
<attribute name="string">Account Journal Configuration</attribute>
|
||||
</form>
|
||||
<separator string="title" position="attributes">
|
||||
<attribute name="string">Configure Your Account Journal System</attribute>
|
||||
</separator>
|
||||
<xpath expr="//label[@string='description']"
|
||||
position="attributes">
|
||||
<attribute name="string">Set accounts on financial journals defined by CamptoCamp l10n_ch module</attribute>
|
||||
<attribute name="width">150</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='rowspan'>15</attribute>
|
||||
<attribute name='string'></attribute>
|
||||
</xpath>
|
||||
<group string="res_config_contents" position="replace">
|
||||
<label colspan="4" align="0.0"
|
||||
string="Set accounts on financial journals defined by CamptoCamp l10n_ch module"/>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<field name="name" select="1"/>
|
||||
</group>
|
||||
<separator colspan="4" string="
|
||||
The accounts linked to the account journals"/>
|
||||
<field name="default_credit_account_id" select="1"
|
||||
on_change="on_change_credit(name, default_credit_account_id)"/>
|
||||
<field name="default_debit_account_id" select="1"
|
||||
on_change="on_change_debit(name, default_debit_account_id)"/>
|
||||
<group colspan="4">
|
||||
<separator colspan="4" string="The accounts linked to the account journals"/>
|
||||
<field name="default_credit_account_id" select="1"
|
||||
on_change="on_change_credit(name, default_credit_account_id)"/>
|
||||
<field name="default_debit_account_id" select="1"
|
||||
on_change="on_change_debit(name, default_debit_account_id)"/>
|
||||
</group>
|
||||
</group>
|
||||
<xpath expr="//button[@name='action_next']" position="attributes">
|
||||
<attribute name="string">Next</attribute>
|
||||
<attribute name="string">Next</attribute>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
<field name="act_window_id" ref="action_view_mailgate_thread"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="base.menu_base_config_mail" name="Mail" parent="base.menu_base_config" sequence="10"/>
|
||||
<menuitem id="base.menu_base_config_mail" name="Mail" parent="base.menu_base_config" sequence="4"/>
|
||||
<menuitem id="menu_mailgate_message" name="Emails" action="action_view_mailgate_message"
|
||||
parent="base.menu_base_config_mail" sequence="5"/>
|
||||
|
||||
|
||||
+24
-13
@@ -533,35 +533,46 @@ class mrp_production(osv.osv):
|
||||
return {'value': {'location_dest_id': src}}
|
||||
return {}
|
||||
|
||||
def product_id_change(self, cr, uid, ids, product, context=None):
|
||||
def product_id_change(self, cr, uid, ids, product_id, context=None):
|
||||
""" Finds UoM of changed product.
|
||||
@param product: Id of changed product.
|
||||
@param product_id: Id of changed product.
|
||||
@return: Dictionary of values.
|
||||
"""
|
||||
if not product:
|
||||
if not product_id:
|
||||
return {'value': {
|
||||
'product_uom': False,
|
||||
'bom_id': False,
|
||||
'routing_id': False
|
||||
}}
|
||||
res = self.pool.get('product.product').browse(cr, uid, product, context=context)
|
||||
bom_obj = self.pool.get('mrp.bom')
|
||||
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
|
||||
bom_id = bom_obj._bom_find(cr, uid, product.id, product.uom_id and product.uom_id.id, [])
|
||||
routing_id = False
|
||||
if bom_id:
|
||||
bom_point = bom_obj.browse(cr, uid, bom_id, context=context)
|
||||
routing_id = bom_point.routing_id.id or False
|
||||
result = {
|
||||
'product_uom': res.uom_id and res.uom_id.id or False,
|
||||
'bom_id': res.bom_ids and res.bom_ids[0].id or False,
|
||||
'routing_id': res.bom_ids and res.bom_ids[0].routing_id.id or False
|
||||
'product_uom': product.uom_id and product.uom_id.id or False,
|
||||
'bom_id': bom_id,
|
||||
'routing_id': routing_id
|
||||
}
|
||||
return {'value': result}
|
||||
|
||||
def bom_id_change(self, cr, uid, ids, product):
|
||||
def bom_id_change(self, cr, uid, ids, bom_id, context=None):
|
||||
""" Finds routing for changed BoM.
|
||||
@param product: Id of product.
|
||||
@return: Dictionary of values.
|
||||
"""
|
||||
if not product:
|
||||
return {}
|
||||
res = self.pool.get('mrp.bom').read(cr, uid, [product], ['routing_id'])[0]
|
||||
routing_id = res['routing_id'] and res['routing_id'][0]
|
||||
result = {'routing_id': routing_id}
|
||||
if not bom_id:
|
||||
return {'value': {
|
||||
'routing_id': False
|
||||
}}
|
||||
bom_pool = self.pool.get('mrp.bom')
|
||||
bom_point = bom_pool.browse(cr, uid, bom_id, context=context)
|
||||
routing_id = bom_point.routing_id.id or False
|
||||
result = {
|
||||
'routing_id': routing_id
|
||||
}
|
||||
return {'value': result}
|
||||
|
||||
def action_picking_except(self, cr, uid, ids):
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
""",
|
||||
'author': 'OpenERP SA',
|
||||
'website': 'http://www.openerp.com',
|
||||
'depends': ['stock', 'hr', 'purchase', 'product', 'mrp'],
|
||||
'depends': ['mrp'],
|
||||
'init_xml': [],
|
||||
'update_xml': [
|
||||
'security/ir.model.access.csv',
|
||||
|
||||
@@ -32,9 +32,13 @@
|
||||
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/notebook/page/field[@name='workcenter_lines']/tree/field[@name='hour']" position="after">
|
||||
<field name="state"/>
|
||||
<button name="button_start_working" string="Start working" states="draft,pause" icon="gtk-go-forward"/>
|
||||
<button name="button_done" string="Finished" states="startworking" icon="gtk-jump-to"/>
|
||||
<button name="button_done" string="Finished" states="startworking" icon="gtk-ok"/>
|
||||
<button name="button_pause" string="Pause" states="startworking" icon="gtk-media-pause"/>
|
||||
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-cancel"/>
|
||||
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause"/>
|
||||
<button name="button_start_working" string="Start" states="draft" icon="gtk-go-forward"/>
|
||||
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert"/>
|
||||
<field name="state"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@@ -56,8 +60,12 @@
|
||||
<field name="cycle"/>
|
||||
<field name="hour"/>
|
||||
<field name="state" />
|
||||
<button name="button_start_working" string="Start working" states="draft,pause" icon="gtk-go-forward"/>
|
||||
<button name="button_done" string="Finished" states="startworking" icon="gtk-jump-to"/>
|
||||
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert"/>
|
||||
<button name="button_start_working" string="Start" states="draft" icon="gtk-go-forward"/>
|
||||
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause"/>
|
||||
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-cancel"/>
|
||||
<button name="button_pause" string="Pause" states="startworking" icon="gtk-media-pause"/>
|
||||
<button name="button_done" string="Finished" states="startworking" icon="gtk-ok"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -76,14 +76,14 @@
|
||||
<field name="model">olap.parameters.config.wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Parameters Configure wizard">
|
||||
<form string="Business Intelligence Server Configuration">
|
||||
<group colspan="4" col="8">
|
||||
<group colspan="3" width="220" height="250">
|
||||
<field name="config_logo" widget="image" width="220" height="130" nolabel="1" colspan="1"/>
|
||||
<newline/>
|
||||
<label align="0.0" string="This wizard will automatically configure the web client for Business Intelligence." width="200" colspan="2"/>
|
||||
</group>
|
||||
<separator string="" orientation="vertical" colspan="1" rowspan="12"/>
|
||||
<!--separator string="" orientation="vertical" colspan="1" rowspan="12"/-->
|
||||
<group colspan="4">
|
||||
<separator string=" Business Intelligence Web Client" colspan="4"/>
|
||||
<field name="host_name" colspan="4"/>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"version" : "1.0",
|
||||
"author" : "OpenERP SA",
|
||||
"category" : "Enterprise Specific Modules/Food Industries",
|
||||
"depends" : ["base", "account", "product", "stock"],
|
||||
"depends" : ["stock"],
|
||||
"init_xml" : [],
|
||||
"demo_xml" : ["product_expiry_demo.xml"],
|
||||
"description": '''Track different dates on products and production lots:
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
- delay: 1
|
||||
name: base.res_partner_asus
|
||||
qty: 5.0
|
||||
min_qty:1.0
|
||||
-
|
||||
I create procurement order.
|
||||
-
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
# 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
|
||||
|
||||
@@ -163,12 +163,14 @@
|
||||
<separator colspan="5" string="States"/>
|
||||
<field name="state"/>
|
||||
<field name="invoiced"/>
|
||||
<group attrs="{'invisible':[('invoiced','=',True)]}">
|
||||
<button colspan="1"
|
||||
name="create_sale_order_line_invoice"
|
||||
states="confirmed"
|
||||
string="Create Invoice"
|
||||
type="object"
|
||||
icon="terp-document-new" />
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page groups="base.group_extended" string="Extra Info">
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
seller_ids:
|
||||
- delay: 1
|
||||
name: stock.res_partner_shawtrust0
|
||||
qty: 5.0
|
||||
min_qty: 5.0
|
||||
supply_method: buy
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
@@ -213,7 +213,7 @@
|
||||
seller_ids:
|
||||
- delay: 1
|
||||
name: res_partner_shawtrust0
|
||||
qty: 5.0
|
||||
min_qty: 5.0
|
||||
supply_method: buy
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
|
||||
@@ -29,7 +29,7 @@ class change_standard_price(osv.osv_memory):
|
||||
'new_price': fields.float('Price', required=True,
|
||||
help="If cost price is increased, stock variation account will be debited "
|
||||
"and stock output account will be credited with the value = (difference of amount * quantity available).\n"
|
||||
"If cost price is decreased, it will do vice-versa."),
|
||||
"If cost price is decreased, stock variation account will be creadited and stock input account will be debited."),
|
||||
'stock_account_input':fields.many2one('account.account', 'Stock Input Account'),
|
||||
'stock_account_output':fields.many2one('account.account', 'Stock Output Account'),
|
||||
'stock_journal':fields.many2one('account.journal', 'Stock journal', required=True),
|
||||
|
||||
@@ -68,8 +68,7 @@ class stock_partial_move(osv.osv_memory):
|
||||
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" />
|
||||
<separator colspan="4"/>
|
||||
<field name="date" colspan="2"/>
|
||||
<group colspan="4" attrs="{'invisible':[('type','=','in')]}">
|
||||
<field name="partner_id" attrs="{'required':[('type','!=','in')]}" />
|
||||
<field name="address_id" attrs="{'required':[('type','!=','in')]}"/>
|
||||
|
||||
@@ -64,8 +64,9 @@ class stock_partial_picking(osv.osv_memory):
|
||||
picking_ids = context.get('active_ids', False)
|
||||
_moves_arch_lst = """<form string="Deliver Products">
|
||||
<separator colspan="4" string="Delivery Information"/>
|
||||
<field name="date" />
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="4">
|
||||
<field name="date"/>
|
||||
</group>
|
||||
<separator colspan="4" string="Move Detail"/>
|
||||
"""
|
||||
_moves_fields = result['fields']
|
||||
|
||||
@@ -9,21 +9,19 @@
|
||||
<field name="model">stock.planning.createlines</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stock Planning">
|
||||
<form string="Create Stock Planning Lines">
|
||||
<separator colspan ="4" string="Creates planning lines for selected period and warehouse."/>
|
||||
<field name="period_id" widget="selection"/>
|
||||
<field name="warehouse_id" domain = "[('company_id','=',company_id)] "/>
|
||||
<field name="forecasted_products"/>
|
||||
<field name="product_categ_id" attrs="{'required':[('forecasted_products','=',0)]}" widget="selection"/>
|
||||
<field name="company_id" widget= "selection" on_change="onchange_company(company_id)" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="period_id" widget="selection"/>
|
||||
<newline/>
|
||||
<field name="warehouse_id" domain = "[('company_id','=',company_id)] "/>
|
||||
<newline/>
|
||||
<field name="forecasted_products"/>
|
||||
<newline/>
|
||||
<field name="product_categ_id" attrs="{'required':[('forecasted_products','=',0)]}" widget="selection"/>
|
||||
<separator colspan ="4" string="Stock planning lines creation"/>
|
||||
<label colspan ="4" string="Creates planning lines for selected period and warehouse. Doesn't duplicate existing lines created by you."/>
|
||||
<label colspan ="4" string="Note: Doesn't duplicate existing lines created by you."/>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-ok" name="create_planning" string="Create Stock Planning" type="object"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Close"/>
|
||||
<button icon="gtk-ok" name="create_planning" string="Create" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -9,21 +9,19 @@
|
||||
<field name="model">stock.sale.forecast.createlines</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stock and Sales Forecasts">
|
||||
<form string="Create Forecasts Lines">
|
||||
<separator colspan ="4" string="Creates forecast lines for selected warehouse and period."/>
|
||||
<field name="period_id"/>
|
||||
<field name="warehouse_id" domain = "[('company_id','=',company_id)] "/>
|
||||
<field name="copy_forecast"/>
|
||||
<field name="product_categ_id" widget="selection"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
<newline/>
|
||||
<field name="period_id"/>
|
||||
<newline/>
|
||||
<field name="warehouse_id" domain = "[('company_id','=',company_id)] "/>
|
||||
<newline/>
|
||||
<field name="product_categ_id" widget="selection"/>
|
||||
<newline/>
|
||||
<field name="copy_forecast"/>
|
||||
<separator colspan ="4" string="Forecast lines creation"/>
|
||||
<label colspan ="4" string="Creates forecast lines for selected warehouse and period. Doesn't duplicate existing lines created by you."/>
|
||||
<label colspan ="4" string="Note: Doesn't duplicate existing lines created by you."/>
|
||||
<separator colspan ="4" />
|
||||
<group colspan="4">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-execute" name="create_forecast" string="Create Forecasts" type="object" />
|
||||
<button icon="gtk-cancel" special="cancel" string="Close"/>
|
||||
<button icon="gtk-execute" name="create_forecast" string="Create" type="object" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
@@ -44,4 +42,4 @@
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user