[IMP]rename project_mrp to sale_service

This commit is contained in:
Amit Vora 2014-05-21 15:57:24 +05:30 committed by Thibault Delavallée
parent 50245476d1
commit b0a5e9286d
63 changed files with 21 additions and 20 deletions

View File

@ -27,11 +27,11 @@ class project_configuration(osv.osv_memory):
_inherit = 'res.config.settings' _inherit = 'res.config.settings'
_columns = { _columns = {
'module_project_mrp': fields.boolean('Generate tasks from sale orders', 'module_sale_service': fields.boolean('Generate tasks from sale orders',
help='This feature automatically creates project tasks from service products in sale orders. ' help='This feature automatically creates project tasks from service products in sale orders. '
'More precisely, tasks are created for procurement lines with product of type \'Service\', ' 'More precisely, tasks are created for procurement lines with product of type \'Service\', '
'procurement method \'Make to Order\', and supply method \'Manufacture\'.\n' 'procurement method \'Make to Order\', and supply method \'Manufacture\'.\n'
'-This installs the module project_mrp.'), '-This installs the module sale_service.'),
'module_pad': fields.boolean("Use integrated collaborative note pads on task", 'module_pad': fields.boolean("Use integrated collaborative note pads on task",
help='Lets the company customize which Pad installation should be used to link to new pads ' help='Lets the company customize which Pad installation should be used to link to new pads '
'(for example: http://ietherpad.com/).\n' '(for example: http://ietherpad.com/).\n'

View File

@ -33,8 +33,8 @@
<label for="module_project_timesheet"/> <label for="module_project_timesheet"/>
</div> </div>
<div> <div>
<field name="module_project_mrp" class="oe_inline"/> <field name="module_sale_service" class="oe_inline"/>
<label for="module_project_mrp"/> <label for="module_sale_service"/>
</div> </div>
<div> <div>
<field name="module_pad" class="oe_inline"/> <field name="module_pad" class="oe_inline"/>

View File

@ -122,7 +122,7 @@ Example: 10% for retailers, promotion of 5 EUR on this product, etc."""),
def onchange_task_work(self, cr, uid, ids, task_work, context=None): def onchange_task_work(self, cr, uid, ids, task_work, context=None):
return {'value': { return {'value': {
'module_project_timesheet': task_work, 'module_project_timesheet': task_work,
'module_project_mrp': task_work, 'module_sale_service': task_work,
}} }}
def onchange_timesheet(self, cr, uid, ids, timesheet, context=None): def onchange_timesheet(self, cr, uid, ids, timesheet, context=None):

View File

@ -686,7 +686,7 @@ class sale_order(osv.osv):
def procurement_needed(self, cr, uid, ids, context=None): def procurement_needed(self, cr, uid, ids, context=None):
#when sale is installed only, there is no need to create procurements, that's only #when sale is installed only, there is no need to create procurements, that's only
#further installed modules (project_mrp, sale_stock) that will change this. #further installed modules (sale_service, sale_stock) that will change this.
sale_line_obj = self.pool.get('sale.order.line') sale_line_obj = self.pool.get('sale.order.line')
res = [] res = []
for order in self.browse(cr, uid, ids, context=context): for order in self.browse(cr, uid, ids, context=context):
@ -839,7 +839,7 @@ class sale_order_line(osv.osv):
def need_procurement(self, cr, uid, ids, context=None): def need_procurement(self, cr, uid, ids, context=None):
#when sale is installed only, there is no need to create procurements, that's only #when sale is installed only, there is no need to create procurements, that's only
#further installed modules (project_mrp, sale_stock) that will change this. #further installed modules (sale_service, sale_stock) that will change this.
return False return False
def _amount_line(self, cr, uid, ids, field_name, arg, context=None): def _amount_line(self, cr, uid, ids, field_name, arg, context=None):

View File

@ -19,6 +19,6 @@
# #
############################################################################## ##############################################################################
import project_mrp import models
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -50,8 +50,8 @@ completed.
'website': 'http://www.openerp.com', 'website': 'http://www.openerp.com',
'images': ['images/product.jpeg', 'images/task_from_SO.jpeg'], 'images': ['images/product.jpeg', 'images/task_from_SO.jpeg'],
'depends': ['project', 'procurement', 'sale', 'procurement_jit'], 'depends': ['project', 'procurement', 'sale', 'procurement_jit'],
'data': ['project_mrp_view.xml'], #'process/project_mrp_process.xml' 'data': ['views/sale_service_view.xml'],
'demo': ['project_mrp_demo.xml'], 'demo': ['demo/sale_service_demo.xml'],
'test': ['test/project_task_procurement.yml'], 'test': ['test/project_task_procurement.yml'],
'installable': True, 'installable': True,
'auto_install': False, 'auto_install': False,

View File

@ -0,0 +1 @@
import sale_service

View File

@ -151,7 +151,7 @@ class sale_order_line(osv.osv):
_inherit = 'sale.order.line' _inherit = 'sale.order.line'
def need_procurement(self, cr, uid, ids, context=None): def need_procurement(self, cr, uid, ids, context=None):
#when sale is installed alone, there is no need to create procurements, but with project_mrp #when sale is installed alone, there is no need to create procurements, but with sale_service
#we must create a procurement for each service that has the auto_create_task boolean set to True. #we must create a procurement for each service that has the auto_create_task boolean set to True.
for line in self.browse(cr, uid, ids, context=context): for line in self.browse(cr, uid, ids, context=context):
if line.product_id and line.product_id.type == 'service' and line.product_id.auto_create_task: if line.product_id and line.product_id.type == 'service' and line.product_id.auto_create_task:

View File

@ -34,8 +34,8 @@
</field> </field>
</field> </field>
</record> </record>
<record id="view_project_mrp_inherit_form2" model="ir.ui.view"> <record id="view_sale_service_inherit_form2" model="ir.ui.view">
<field name="name">project.mrp.form.view.inherit</field> <field name="name">sale.service.form.view.inherit</field>
<field name="model">project.task</field> <field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_form2"/> <field name="inherit_id" ref="project.view_task_form2"/>
<field name="arch" type="xml"> <field name="arch" type="xml">

View File

@ -35,7 +35,7 @@ class sale_configuration(osv.osv_memory):
help='Lets you transfer the entries under tasks defined for Project Management to ' help='Lets you transfer the entries under tasks defined for Project Management to '
'the Timesheet line entries for particular date and particular user with the effect of creating, editing and deleting either ways ' 'the Timesheet line entries for particular date and particular user with the effect of creating, editing and deleting either ways '
'and to automatically creates project tasks from procurement lines.\n' 'and to automatically creates project tasks from procurement lines.\n'
'-This installs the modules project_timesheet and project_mrp.'), '-This installs the modules project_timesheet and sale_service.'),
'default_order_policy': fields.selection( 'default_order_policy': fields.selection(
[('manual', 'Invoice based on sales orders'), ('picking', 'Invoice based on deliveries')], [('manual', 'Invoice based on sales orders'), ('picking', 'Invoice based on deliveries')],
'The default invoicing method is', default_model='sale.order', 'The default invoicing method is', default_model='sale.order',
@ -50,7 +50,7 @@ class sale_configuration(osv.osv_memory):
implied_group='sale.group_mrp_properties', implied_group='sale.group_mrp_properties',
help="Allows you to tag sales order lines with properties."), help="Allows you to tag sales order lines with properties."),
'module_project_timesheet': fields.boolean("Project Timesheet"), 'module_project_timesheet': fields.boolean("Project Timesheet"),
'module_project_mrp': fields.boolean("Project MRP"), 'module_sale_service': fields.boolean("Sale Service"),
'group_route_so_lines': fields.boolean('Choose MTO, drop shipping,... on sales order lines', 'group_route_so_lines': fields.boolean('Choose MTO, drop shipping,... on sales order lines',
implied_group='sale_stock.group_route_so_lines', implied_group='sale_stock.group_route_so_lines',
help="Allows you to choose a delivery route on sales order lines"), help="Allows you to choose a delivery route on sales order lines"),
@ -63,7 +63,7 @@ class sale_configuration(osv.osv_memory):
def default_get(self, cr, uid, fields, context=None): def default_get(self, cr, uid, fields, context=None):
res = super(sale_configuration, self).default_get(cr, uid, fields, context) res = super(sale_configuration, self).default_get(cr, uid, fields, context)
# task_work, time_unit depend on other fields # task_work, time_unit depend on other fields
res['task_work'] = res.get('module_project_mrp') and res.get('module_project_timesheet') res['task_work'] = res.get('module_sale_service') and res.get('module_project_timesheet')
return res return res
def get_default_sale_config(self, cr, uid, ids, context=None): def get_default_sale_config(self, cr, uid, ids, context=None):

View File

@ -38,7 +38,7 @@
</xpath> </xpath>
<group name='default_options' position="after"> <group name='default_options' position="after">
<field name="module_project_timesheet" invisible="1"/> <field name="module_project_timesheet" invisible="1"/>
<field name="module_project_mrp" invisible="1"/> <field name="module_sale_service" invisible="1"/>
</group> </group>
<div name='warehouse_features' position='inside'> <div name='warehouse_features' position='inside'>
<div name='default_picking_policy' attrs="{'invisible':[('group_invoice_deli_orders','=',False)]}"> <div name='default_picking_policy' attrs="{'invisible':[('group_invoice_deli_orders','=',False)]}">

View File

@ -78,7 +78,7 @@ class procurement_rule(osv.osv):
class procurement_order(osv.osv): class procurement_order(osv.osv):
_inherit = "procurement.order" _inherit = "procurement.order"
_columns = { _columns = {
'location_id': fields.many2one('stock.location', 'Procurement Location'), # not required because task may create procurements that aren't linked to a location with project_mrp 'location_id': fields.many2one('stock.location', 'Procurement Location'), # not required because task may create procurements that aren't linked to a location with sale_service
'partner_dest_id': fields.many2one('res.partner', 'Customer Address', help="In case of dropshipping, we need to know the destination address more precisely"), 'partner_dest_id': fields.many2one('res.partner', 'Customer Address', help="In case of dropshipping, we need to know the destination address more precisely"),
'move_ids': fields.one2many('stock.move', 'procurement_id', 'Moves', help="Moves created by the procurement"), 'move_ids': fields.one2many('stock.move', 'procurement_id', 'Moves', help="Moves created by the procurement"),
'move_dest_id': fields.many2one('stock.move', 'Destination Move', help="Move which caused (created) the procurement"), 'move_dest_id': fields.many2one('stock.move', 'Destination Move', help="Move which caused (created) the procurement"),

View File

@ -221,10 +221,10 @@ class res_config_installer(osv.osv_memory, res_config_module_installation_mixin)
_install_if = { _install_if = {
('sale','crm'): ['sale_crm'], ('sale','crm'): ['sale_crm'],
('sale','project'): ['project_mrp'], ('sale','project'): ['sale_service'],
} }
will install both ``sale_crm`` and ``project_mrp`` if all of will install both ``sale_crm`` and ``sale_service`` if all of
``sale``, ``crm`` and ``project`` are selected for installation. ``sale``, ``crm`` and ``project`` are selected for installation.
Hook methods Hook methods