[IMP]rename project_mrp to sale_service
This commit is contained in:
parent
50245476d1
commit
b0a5e9286d
|
@ -27,11 +27,11 @@ class project_configuration(osv.osv_memory):
|
|||
_inherit = 'res.config.settings'
|
||||
|
||||
_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. '
|
||||
'More precisely, tasks are created for procurement lines with product of type \'Service\', '
|
||||
'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",
|
||||
help='Lets the company customize which Pad installation should be used to link to new pads '
|
||||
'(for example: http://ietherpad.com/).\n'
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
<label for="module_project_timesheet"/>
|
||||
</div>
|
||||
<div>
|
||||
<field name="module_project_mrp" class="oe_inline"/>
|
||||
<label for="module_project_mrp"/>
|
||||
<field name="module_sale_service" class="oe_inline"/>
|
||||
<label for="module_sale_service"/>
|
||||
</div>
|
||||
<div>
|
||||
<field name="module_pad" class="oe_inline"/>
|
||||
|
|
|
@ -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):
|
||||
return {'value': {
|
||||
'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):
|
||||
|
|
|
@ -686,7 +686,7 @@ class sale_order(osv.osv):
|
|||
|
||||
def procurement_needed(self, cr, uid, ids, context=None):
|
||||
#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')
|
||||
res = []
|
||||
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):
|
||||
#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
|
||||
|
||||
def _amount_line(self, cr, uid, ids, field_name, arg, context=None):
|
||||
|
|
|
@ -19,6 +19,6 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import project_mrp
|
||||
import models
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -50,8 +50,8 @@ completed.
|
|||
'website': 'http://www.openerp.com',
|
||||
'images': ['images/product.jpeg', 'images/task_from_SO.jpeg'],
|
||||
'depends': ['project', 'procurement', 'sale', 'procurement_jit'],
|
||||
'data': ['project_mrp_view.xml'], #'process/project_mrp_process.xml'
|
||||
'demo': ['project_mrp_demo.xml'],
|
||||
'data': ['views/sale_service_view.xml'],
|
||||
'demo': ['demo/sale_service_demo.xml'],
|
||||
'test': ['test/project_task_procurement.yml'],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
|
@ -0,0 +1 @@
|
|||
import sale_service
|
|
@ -151,7 +151,7 @@ class sale_order_line(osv.osv):
|
|||
_inherit = 'sale.order.line'
|
||||
|
||||
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.
|
||||
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:
|
|
@ -34,8 +34,8 @@
|
|||
</field>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_project_mrp_inherit_form2" model="ir.ui.view">
|
||||
<field name="name">project.mrp.form.view.inherit</field>
|
||||
<record id="view_sale_service_inherit_form2" model="ir.ui.view">
|
||||
<field name="name">sale.service.form.view.inherit</field>
|
||||
<field name="model">project.task</field>
|
||||
<field name="inherit_id" ref="project.view_task_form2"/>
|
||||
<field name="arch" type="xml">
|
|
@ -35,7 +35,7 @@ class sale_configuration(osv.osv_memory):
|
|||
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 '
|
||||
'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(
|
||||
[('manual', 'Invoice based on sales orders'), ('picking', 'Invoice based on deliveries')],
|
||||
'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',
|
||||
help="Allows you to tag sales order lines with properties."),
|
||||
'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',
|
||||
implied_group='sale_stock.group_route_so_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):
|
||||
res = super(sale_configuration, self).default_get(cr, uid, fields, context)
|
||||
# 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
|
||||
|
||||
def get_default_sale_config(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
</xpath>
|
||||
<group name='default_options' position="after">
|
||||
<field name="module_project_timesheet" invisible="1"/>
|
||||
<field name="module_project_mrp" invisible="1"/>
|
||||
<field name="module_sale_service" invisible="1"/>
|
||||
</group>
|
||||
<div name='warehouse_features' position='inside'>
|
||||
<div name='default_picking_policy' attrs="{'invisible':[('group_invoice_deli_orders','=',False)]}">
|
||||
|
|
|
@ -78,7 +78,7 @@ class procurement_rule(osv.osv):
|
|||
class procurement_order(osv.osv):
|
||||
_inherit = "procurement.order"
|
||||
_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"),
|
||||
'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"),
|
||||
|
|
|
@ -221,10 +221,10 @@ class res_config_installer(osv.osv_memory, res_config_module_installation_mixin)
|
|||
|
||||
_install_if = {
|
||||
('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.
|
||||
|
||||
Hook methods
|
||||
|
|
Loading…
Reference in New Issue