[Merge]with :lp:~openerp-dev/openobject-addons/trunk-settings-wizards-improvements-jap

bzr revid: dbr@tinyerp.com-20120504051326-oqvpc74t3devixlr
This commit is contained in:
DBR (OpenERP)
2012-05-04 10:43:26 +05:30
34 changed files with 249 additions and 119 deletions
+3
View File
@@ -136,6 +136,9 @@ module named account_voucher.
'demo/account_invoice_demo.xml',
# 'account_unit_test.xml',
],
'data_xml':['data/configurable_account_chart.xml'
],
'test': [
'test/account_customer_invoice.yml',
'test/account_supplier_invoice.yml',
-5
View File
@@ -123,11 +123,6 @@ class account_installer(osv.osv_memory):
context = {}
fy_obj = self.pool.get('account.fiscalyear')
for res in self.read(cr, uid, ids, context=context):
if 'charts' in res and res['charts'] == 'configurable':
#load generic chart of account
fp = tools.file_open(opj('account', 'configurable_account_chart.xml'))
tools.convert_xml_import(cr, 'account', fp, {}, 'init', True, None)
fp.close()
if 'date_start' in res and 'date_stop' in res:
f_ids = fy_obj.search(cr, uid, [('date_start', '<=', res['date_start']), ('date_stop', '>=', res['date_stop']), ('company_id', '=', res['company_id'][0])], context=context)
if not f_ids:
+19 -8
View File
@@ -36,9 +36,10 @@ class account_config_settings(osv.osv_memory):
_columns = {
'company_id': fields.many2one('res.company', 'Company', required=True),
'has_default_company': fields.boolean('Has default company', readonly=True),
'decimal_precision_account': fields.integer('Decimal Precision on Account'),
'expects_chart_of_accounts': fields.related('company_id', 'expects_chart_of_accounts', type='boolean',
string='Chart of Accounts for this Company'),
string='Chart of Accounts for this Company',
help=""" Check this box if this company is a legal entity."""),
'currency_id': fields.related('company_id', 'currency_id', type='many2one', relation='res.currency', required=True,
string='Default Company Currency', help="Default Company Currency of the company."),
'paypal_account': fields.related('company_id', 'paypal_account', type='char', size=128,
@@ -78,8 +79,7 @@ class account_config_settings(osv.osv_memory):
help="""This allows you to check writing and printing.
This installs the module account_check_writing."""),
'module_account_accountant': fields.boolean('Accountant Features',
help="""This allows you to access all the accounting features, like the journal items and the chart of accounts.
This installs the module account_accountant."""),
help="""If you do not check this box, you will be able to do Invoicing & Payments, but not accounting (Journal Items, Chart of Accounts, ...)."""),
'module_account_asset': fields.boolean('Assets Management',
help="""This allows you to manage the assets owned by a company or a person.
It keeps track of the depreciation occurred on those assets, and creates account move for those depreciation lines.
@@ -101,9 +101,6 @@ class account_config_settings(osv.osv_memory):
'module_account_followup': fields.boolean('Manage Customer Payment Follow-Ups',
help="""This allows to automate letters for unpaid invoices, with multi-level recalls.
This installs the module account_followup."""),
'module_account_analytic_plans': fields.boolean('Support Multiple Analytic Plans',
help="""This allows to use several analytic plans, according to the general journal.
This installs the module account_analytic_plans."""),
'module_account_invoice_layout': fields.boolean('Allow notes and subtotals',
help="""This provides some features to improve the layout of invoices.
It gives you the possibility to:
@@ -115,7 +112,6 @@ class account_config_settings(osv.osv_memory):
'group_proforma_invoices': fields.boolean('Allow Pro-forma Invoices',
implied_group='account.group_proforma_invoices',
help="Allows you to put invoices in pro-forma state."),
'default_sale_tax': fields.many2one('account.tax', 'Default Sale Tax'),
'default_purchase_tax': fields.many2one('account.tax', 'Default Purchase Tax'),
}
@@ -137,6 +133,21 @@ class account_config_settings(osv.osv_memory):
'period': 'month',
}
def get_default_dp(self, cr, uid, fields, context=None):
acc_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'product','decimal_account')[1]
dec_id =self.pool.get('decimal.precision').browse(cr, uid, acc_id,context=context)
return {
'decimal_precision_account': dec_id.digits,
}
def set_default_dp(self, cr, uid, ids, context=None):
config = self.browse(cr, uid, ids[0], context)
acc_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'product', 'decimal_account')[1]
dec_id =self.pool.get('decimal.precision').browse(cr, uid, acc_id,context=context)
dec_id.write({
'digits': config.decimal_precision_account,
})
def create(self, cr, uid, values, context=None):
id = super(account_config_settings, self).create(cr, uid, values, context)
# Hack: to avoid some nasty bug, related fields are not written upon record creation.
+7 -7
View File
@@ -22,11 +22,11 @@
</div>
<sheet layout="auto">
<field name="has_default_company" invisible="1" />
<field name="has_chart_of_accounts" invisible="1"/>
<field name="company_id" widget="selection" on_change="onchange_company_id(company_id)"
attrs="{'invisible': [('has_default_company', '=', True)]}"/>
<field name="expects_chart_of_accounts"/>
<field name="has_chart_of_accounts" invisible="1"/>
<group string="No Chart of Accounts exists for this Company" colspan="4" attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_chart_of_accounts','=',True)]}">
<label string="Please select a chart template to install a chart of accounts." colspan="4"/>
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
@@ -57,14 +57,15 @@
<field name ="complete_tax_set" invisible="1"/>
<newline/>
<group colspan="2" col="2">
<field name="default_sale_tax" domain="[('type_tax_use','=','sale'), ('company_id','=',company_id)]"/>
<field name="default_sale_tax" domain="[('type_tax_use','=','sale'), ('company_id','=',company_id)]" attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',True), ('has_fiscal_year','=',False)]}"/>
<field name="module_account_accountant"/>
<field name="module_account_asset"/>
</group>
<group colspan="2" col="2">
<field name="default_purchase_tax" domain="[('type_tax_use','=','purchase'), ('company_id','=',company_id)]"/>
<field name="default_purchase_tax" domain="[('type_tax_use','=','purchase'), ('company_id','=',company_id)]" attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',True), ('has_fiscal_year','=',False)]}"/>
<field name="currency_id" widget="selection"/>
<field name="module_account_budget"/>
<field name="decimal_precision_account"/>
</group>
</group>
<group colspan="2" col="2">
@@ -97,10 +98,9 @@
<field name="company_footer"/>
<field name="module_account_check_writing"/>
</group>
<group colspan="2" col="2">
<separator string="Analytic Accounting" colspan="2"/>
<group name="analytic_accounting" colspan="2"/>
<field name="module_account_analytic_plans"/>
<group colspan="4" col="4">
<separator string="Analytic Accounting" colspan="4"/>
<group name="analytic_accounting" colspan="4"/>
</group>
</sheet>
</form>
+1
View File
@@ -25,6 +25,7 @@ import wizard
import report
import sale
import stock
import res_config
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+2 -1
View File
@@ -41,7 +41,8 @@ When creating invoices from picking, OpenERP is able to add and compute the ship
'wizard/delivery_sale_order_view.xml',
'delivery_report.xml',
'delivery_view.xml',
'partner_view.xml'
'partner_view.xml',
'res_config_view.xml'
],
'demo_xml': ['delivery_demo.xml'],
'test': [
+45
View File
@@ -0,0 +1,45 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# 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 delivery_configuration(osv.osv_memory):
_inherit = 'stock.config.settings'
_columns = {
'decimal_precision_stock': fields.integer('Decimal Precision on Stock Weight'),
}
def get_default_dp(self, cr, uid, fields, context=None):
stock_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'product', 'decimal_stock_weight')[1]
dec_id =self.pool.get('decimal.precision').browse(cr, uid, stock_id, context=context)
return {
'decimal_precision_stock': dec_id.digits,
}
def set_default_dp(self, cr, uid, ids, context=None):
config = self.browse(cr, uid, ids[0], context)
stock_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'product', 'decimal_stock_weight')[1]
dec_id =self.pool.get('decimal.precision').browse(cr, uid, stock_id, context=context)
dec_id.write({
'digits': config.decimal_precision_stock,
})
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+18
View File
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_stock_config_inherit" model="ir.ui.view">
<field name="name">delivery settings</field>
<field name="model">stock.config.settings</field>
<field name="type">form</field>
<field name="inherit_id" ref="stock.view_stock_config_settings"/>
<field name="arch" type="xml">
<field name="module_stock_invoice_directly" position="after">
<field name="decimal_precision_stock"/>
</field>
</field>
</record>
</data>
</openerp>
+11 -6
View File
@@ -26,18 +26,23 @@ class hr_config_settings(osv.osv_memory):
_inherit = 'res.config.settings'
_columns = {
'module_hr_timesheet_sheet': fields.boolean('Manage Timesheets and Attendances',
'module_hr_timesheet_sheet': fields.boolean('Timesheet Validation by Manager',
help ="""This installs the module hr_timesheet_sheet."""),
'module_hr_holidays': fields.boolean('Manage Holidays',
'module_hr_attendance': fields.boolean('Track Attendances',
help ="""This installs the module hr_attendance."""),
'module_hr_timesheet': fields.boolean('Manage Timesheets',
help ="""This installs the module hr_timesheet."""),
'module_hr_holidays': fields.boolean('Leaves & Holidays',
help ="""This installs the module hr_holidays."""),
'module_hr_expense': fields.boolean('Manage Employees Expenses',
'module_hr_expense': fields.boolean('Expenses',
help ="""This installs the module hr_expense."""),
'module_hr_recruitment': fields.boolean('Manage Recruitment Process',
'module_hr_recruitment': fields.boolean('Recruitment',
help ="""This installs the module hr_recruitment."""),
'module_hr_contract': fields.boolean('Manage Employees Contracts',
'module_hr_contract': fields.boolean('Employees Contracts',
help ="""This installs the module hr_contract."""),
'module_hr_evaluation': fields.boolean('Manage Appraisals Process',
'module_hr_evaluation': fields.boolean('Periodic Appraisals',
help ="""This installs the module hr_evaluation."""),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+7 -12
View File
@@ -19,23 +19,18 @@
<button string="Cancel" special="cancel"/>
</div>
<sheet layout="auto">
<separator string="Human Resources" colspan="4"/>
<field name="module_hr_timesheet_sheet"/>
<newline/>
<field name="module_hr_holidays"/>
<separator string="Additional Features" colspan="4"/>
<field name="module_hr_expense"/>
<newline/>
<field name="module_hr_recruitment"/>
<newline/>
<field name="module_hr_evaluation"/>
<newline/>
<field name="module_hr_contract"/>
<group name="config_timesheets" colspan="4"/>
<group name="config_payroll" colspan="4"/>
<group name="config_recruitment" colspan="4"/>
<field name="module_hr_holidays"/>
<group name="config_timesheets" colspan="2"/>
<separator string="Timesheets" colspan="4"/>
<field name="module_hr_attendance"/>
<field name="module_hr_timesheet"/>
<field name="module_hr_timesheet_sheet"/>
<group name="config_recruitment" colspan="2"/>
</sheet>
</form>
</field>
+1 -1
View File
@@ -4,7 +4,7 @@
<!-- Casual leave -->
<record model="hr.holidays.status" id="holiday_status_cl">
<field name="name">Legal Leaves</field>
<field eval="'Legal Leaves '+time.strftime('%Y')" name="name"/>
<field name="color_name">black</field>
</record>
+2 -3
View File
@@ -7,10 +7,9 @@
<field name="type">form</field>
<field name="inherit_id" ref="hr.view_human_resources_configuration"/>
<field name="arch" type="xml">
<group name="config_payroll" position="after">
<separator string="Account Payroll" colspan="4"/>
<field name="module_hr_holidays" position="after">
<field name="module_hr_payroll_account"/>
</group>
</field>
</field>
</record>
</data>
+1 -1
View File
@@ -26,7 +26,7 @@ class hr_applicant_settings(osv.osv_memory):
_inherit = ['hr.config.settings', 'fetchmail.config.settings']
_columns = {
'module_document_ftp': fields.boolean('Index & Track Documents',
'module_document_ftp': fields.boolean('Automatic Indexation of Resumes',
help="""Manage your CV's and motivation letter related to all applicants.
This installs the module document_ftp."""),
'fetchmail_applicants': fields.boolean('Create Applicants from Incoming Mails', readonly=True,
+1 -1
View File
@@ -26,7 +26,7 @@ class hr_timesheet_settings(osv.osv_memory):
_columns = {
'timesheet_range': fields.selection([('day','Day'),('week','Week'),('month','Month')],
'Timesheet Range', help="Periodicity on which you validate your timesheets."),
'Validate Timesheets Every', help="Periodicity on which you validate your timesheets."),
'timesheet_max_difference': fields.float('Timesheet Allowed Difference (Hours)',
help="""Allowed difference in hours between the sign in/out and the timesheet
computation for one sheet. Set this to 0 if you do not want any control."""),
@@ -7,11 +7,11 @@
<field name="type">form</field>
<field name="inherit_id" ref="hr.view_human_resources_configuration"/>
<field name="arch" type="xml">
<group name="config_timesheets" position="after">
<separator string="Timesheets" colspan="4"/>
<field name="timesheet_range"/>
<field name="timesheet_max_difference"/>
</group>
<field name="module_hr_timesheet_sheet" position="after">
<newline/>
<field name="timesheet_range" attrs="{'invisible':[('module_hr_timesheet_sheet','=',False)],'required': [('module_hr_timesheet_sheet','=',True)]}"/>
<field name="timesheet_max_difference" attrs="{'invisible':[('module_hr_timesheet_sheet','=',False)],'required': [('module_hr_timesheet_sheet','=',True)]}"/>
</field>
</field>
</record>
</data>
+12 -6
View File
@@ -28,7 +28,7 @@ class mrp_config_settings(osv.osv_memory):
_inherit = 'res.config.settings'
_columns = {
'module_stock_planning': fields.boolean('Master Production Schedule',
'module_stock_planning': fields.boolean('Master Manufacturing Order Schedule',
help ="""This allows to create a manual procurement plan apart of the normal MRP scheduling,
which works automatically based on minimum stock rules.
This installs the module stock_planning."""),
@@ -41,27 +41,33 @@ class mrp_config_settings(osv.osv_memory):
* Repair quotation report
* Notes for the technician and for the final customer.
This installs the module mrp_repair."""),
'module_mrp_operations': fields.boolean("Track Dates in Work Order Operations",
'module_mrp_operations': fields.boolean("Detailed Planning of Work Orders",
help="""This allows to add state, date_start,date_stop in production order operation lines (in the "Work Centers" tab).
This installs the module mrp_operations."""),
'module_mrp_subproduct': fields.boolean("Produce Different Products from one Production",
'module_mrp_subproduct': fields.boolean("Produce Several Product from One Manufacturing Order",
help="""You can configure sub-products in the bill of material.
Without this module: A + B + C -> D.
With this module: A + B + C -> D + E.
This installs the module mrp_subproduct."""),
'module_mrp_jit': fields.boolean("Just in Time Scheduling",
'module_mrp_jit': fields.boolean("Real-Time Scheduling",
help="""This allows Just In Time computation of procurement orders.
All procurement orders will be processed immediately, which could in some
cases entail a small performance impact.
This installs the module mrp_jit."""),
'module_stock_no_autopicking': fields.boolean("Manual Picking to Fulfill Manufacturing Orders",
help="""This module allows an intermediate picking process to provide raw materials to production orders.
For example to manage production made by your suppliers (sub-contracting).
To achieve this, set the assembled product which is sub-contracted to "No Auto-Picking"
and put the location of the supplier in the routing of the assembly operation.
This installs the module stock_no_autopicking."""),
'group_mrp_routings': fields.boolean("Manage Routings and Work Orders",
implied_group='mrp.group_mrp_routings',
help="""Routings allow you to create and manage the manufacturing operations that should be followed
within your work centers in order to produce a product. They are attached to bills of materials
that will define the required raw materials."""),
'group_mrp_properties': fields.boolean("Manage Properties",
'group_mrp_properties': fields.boolean("Allow Several BoMs per Product",
implied_group='product.group_mrp_properties',
help="""Allows to define specific property that can be assigned to your bill of materials."""),
help="""The selection of the right Bill of Material to use will depend on the properties specified on the sale order and the Bill of Material."""),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1 -2
View File
@@ -17,10 +17,9 @@
<field name="module_stock_planning"/>
<field name="module_mrp_subproduct"/>
<field name="module_mrp_repair"/>
<separator string="Logistics" colspan="4"/>
<field name="module_mrp_jit"/>
<field name="module_stock_no_autopicking"/>
<separator string="Bill Of Material" colspan="4"/>
<field name="group_mrp_routings"/>
<field name="group_mrp_properties"/>
+3 -3
View File
@@ -165,7 +165,7 @@
<tree string="Minimum Stock Rules">
<field name="name"/>
<field name="warehouse_id"/>
<field name="location_id"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="product_id"/>
<field name="product_uom"/>
<field name="product_min_qty"/>
@@ -183,7 +183,7 @@
<group>
<field name="name"/>
<field name="warehouse_id" widget="selection"/>
<field name="location_id"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="product_id"/>
</group>
@@ -211,7 +211,7 @@
<group col="2" colspan="2">
<separator string="Locations" colspan="2" />
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
<field name="location_id"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<group col="2" colspan="2">
+1 -1
View File
@@ -165,7 +165,7 @@ class project(osv.osv):
'members': fields.many2many('res.users', 'project_user_rel', 'project_id', 'uid', 'Project Members',
help="Project's members are users who can have an access to the tasks related to this project.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'tasks': fields.one2many('project.task', 'project_id', "Project tasks"),
'tasks': fields.one2many('project.task', 'project_id', "Task Activities"),
'planned_hours': fields.function(_progress_rate, multi="progress", string='Planned Time', help="Sum of planned hours of all tasks related to this project and its child projects.",
store = {
'project.project': (_get_project_and_parents, ['tasks', 'parent_id', 'child_ids'], 10),
+9 -8
View File
@@ -239,10 +239,10 @@
<group colspan="6" col="6">
<field name="name" select="1"/>
<field name="project_id" select="1" on_change="onchange_project(project_id)"/>
<field name="total_hours" widget="float_time"/>
<field name="total_hours" widget="float_time" groups="project.group_tasks_work_on_tasks"/>
<field name="date_deadline" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
<field name="user_id" select="1" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
<field name="progress" widget="progressbar"/>
<field name="progress" widget="progressbar" groups="project.group_tasks_work_on_tasks"/>
</group>
<notebook colspan="4">
<page string="Information">
@@ -251,18 +251,19 @@
name="planned_hours"
widget="float_time"
attrs="{'readonly':[('state','!=','draft')]}"
groups="project.group_time_work_estimation_tasks"
on_change="onchange_planned(planned_hours, effective_hours)"/>
<field
name="effective_hours"
widget="float_time" invisible="1"/>
widget="float_time" invisible="1" groups="project.group_tasks_work_on_tasks"/>
</group>
<group col="3" colspan="2">
<field name="remaining_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}" colspan="2"/>
<field name="remaining_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}" colspan="2" groups="project.group_time_work_estimation_tasks"/>
<button name="%(action_project_task_reevaluate)d" string="Reevaluate" type="action" colspan="1" target="new" states="open,pending" icon="gtk-edit"/>
</group>
<field colspan="4" name="description" nolabel="1" attrs="{'readonly':[('state','=','done')]}"/>
<field colspan="4" name="work_ids" nolabel="1" attrs="{'readonly':[('state','in',['done','draft'])]}">
<field colspan="4" name="work_ids" nolabel="1" attrs="{'readonly':[('state','in',['done','draft'])]}" groups="project.group_tasks_work_on_tasks">
<tree string="Task Work" editable="top">
<field name="name" />
<field name="hours" widget="float_time" sum="Spent Hours"/>
@@ -332,7 +333,7 @@
<field name="sequence"/>
<field name="state"/>
<field name="kanban_state"/>
<field name="remaining_hours" sum="Remaining Time"/>
<field name="remaining_hours" sum="Remaining Time" groups="project.group_time_work_estimation_tasks"/>
<field name="date_deadline"/>
<templates>
<t t-name="task_details">
@@ -422,9 +423,9 @@
<field name="user_id" invisible="context.get('user_invisible', False)"/>
<field name="delegated_user_id" invisible="context.get('show_delegated', True)"/>
<field name="total_hours" invisible="1"/>
<field name="planned_hours" invisible="context.get('set_visible',False)"/>
<field name="planned_hours" invisible="context.get('set_visible',False)" groups="project.group_time_work_estimation_tasks"/>
<field name="effective_hours" widget="float_time" sum="Spent Hours" invisible="1"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" on_change="onchange_remaining(remaining_hours,planned_hours)" invisible="context.get('set_visible',False)"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" on_change="onchange_remaining(remaining_hours,planned_hours)" invisible="context.get('set_visible',False)" groups="project.group_time_work_estimation_tasks"/>
<field name="date_deadline" invisible="context.get('deadline_visible',True)"/>
<field name="type_id" invisible="context.get('set_visible',False)"/>
<button name="next_type" invisible="context.get('set_visible',False)"
+7 -1
View File
@@ -35,7 +35,7 @@ class project_configuration(osv.osv_memory):
help="""Lets the company customize which Pad installation should be used to link to new pads
(by default, http://ietherpad.com/).
This installs the module pad."""),
'module_project_timesheet': fields.boolean("Timesheets and Invoices",
'module_project_timesheet': fields.boolean("Timesheets per Task",
help="""This allows you to transfer the entries under tasks defined for Project Management to
the timesheet line entries for particular date and user, with the effect of creating,
editing and deleting either ways.
@@ -49,6 +49,12 @@ class project_configuration(osv.osv_memory):
'module_project_issue_sheet': fields.boolean("Track and invoice issues working time",
help="""Provides timesheet support for the issues/bugs management in project.
This installs the module project_issue_sheet."""),
'group_tasks_work_on_tasks': fields.boolean("Task's Work on Tasks",
implied_group='project.group_tasks_work_on_tasks',
help="Allows you to compute work on tasks."),
'group_time_work_estimation_tasks': fields.boolean("Time Estimation on Tasks",
implied_group='project.group_time_work_estimation_tasks',
help="Allows you to compute Time Estimation on tasks."),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+2
View File
@@ -17,6 +17,8 @@
<field name="module_project_mrp"/>
<field name="module_project_timesheet"/>
<field name="module_pad"/>
<field name="group_tasks_work_on_tasks"/>
<field name="group_time_work_estimation_tasks"/>
<separator string="Planning" colspan="4"/>
<field name="module_project_long_term"/>
@@ -18,6 +18,17 @@
<field name="groups_id" eval="[(6,0,[ref('group_project_manager')])]"/>
</record>
<record id="group_tasks_work_on_tasks" model="res.groups">
<field name="name">Task's Work on Tasks</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="group_time_work_estimation_tasks" model="res.groups">
<field name="name">Time Estimation on Tasks</field>
<field name="implied_ids" eval="[(4, ref('group_tasks_work_on_tasks'))]"/>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record model="ir.rule" id="project_comp_rule">
<field name="name">Project multi-company</field>
<field name="model_id" ref="model_project_project"/>
+17
View File
@@ -28,6 +28,7 @@ class purchase_config_settings(osv.osv_memory):
_inherit = 'res.config.settings'
_columns = {
'decimal_precision_purchase': fields.integer('Decimal Precision on Purchase Price'),
'default_invoice_method': fields.selection(
[('manual', 'Based on Purchase Order Lines'),
('picking', 'Based on Receptions'),
@@ -69,10 +70,26 @@ class purchase_config_settings(osv.osv_memory):
}
def get_default_dp(self, cr, uid, fields, context=None):
purchase_id = self.pool.get('ir.model.data').get_object_reference(cr,uid, 'product','decimal_purchase')[1]
dec_id =self.pool.get('decimal.precision').browse(cr,uid, purchase_id,context=context)
return {
'decimal_precision_purchase': dec_id.digits,
}
def set_default_dp(self, cr, uid, ids, context=None):
config = self.browse(cr, uid, ids[0], context)
purchase_id = self.pool.get('ir.model.data').get_object_reference(cr,uid, 'product','decimal_purchase')[1]
dec_id =self.pool.get('decimal.precision').browse(cr,uid, purchase_id,context=context)
dec_id.write({
'digits': config.decimal_precision_purchase,
})
class account_config_settings(osv.osv_memory):
_inherit = 'account.config.settings'
_columns = {
'module_purchase_analytic_plans': fields.boolean('Several Analytic Accounts on Purchases',
help="""This allows install module purchase_analytic_plans."""),
'group_analytic_account_for_purchases': fields.boolean('Analytic Accounting for Purchases',
implied_group='purchase.group_analytic_accounting',
help="Allows you to specify an analytic account on purchase orders."),
+2 -1
View File
@@ -14,7 +14,7 @@
<sheet layout="auto">
<separator string="Invoicing" colspan="4"/>
<field name="default_invoice_method" />
<field name="decimal_precision_purchase" />
<separator string="Purchase Order" colspan="4"/>
<field name="group_purchase_pricelist"/>
<field name="group_uom"/>
@@ -49,6 +49,7 @@
<field name="arch" type="xml">
<group name="analytic_accounting" position="after">
<field name="group_analytic_account_for_purchases"/>
<field name="module_purchase_analytic_plans"/>
</group>
</field>
</record>
@@ -7,8 +7,8 @@
<field name="type">form</field>
<field name="inherit_id" ref="purchase.view_purchase_configuration"/>
<field name="arch" type="xml">
<field name="module_purchase_double_validation" position="replace">
<field name="limit_amount"/>
<field name="module_purchase_double_validation" position="after">
<field name="limit_amount" attrs="{'required': [('module_purchase_double_validation','=',True)]}"/>
</field>
</field>
</record>
+18
View File
@@ -27,6 +27,7 @@ class sale_configuration(osv.osv_memory):
_inherit = 'sale.config.settings'
_columns = {
'decimal_precision_sale': fields.integer('Decimal Precision on Sales Price'),
'group_invoice_so_lines': fields.boolean('Based on Sales Orders',
implied_group='sale.group_invoice_so_lines',
help="To allow your salesman to make invoices for sale order lines using the menu 'Lines to Invoice'."),
@@ -132,6 +133,21 @@ class sale_configuration(osv.osv_memory):
'time_unit': _get_default_time_unit,
}
def get_default_dp(self, cr, uid, fields, context=None):
sale_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'product','decimal_sale')[1]
dec_id =self.pool.get('decimal.precision').browse(cr, uid, sale_id,context=context)
return {
'decimal_precision_sale': dec_id.digits,
}
def set_default_dp(self, cr, uid, ids, context=None):
config = self.browse(cr, uid, ids[0], context)
sale_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'product', 'decimal_sale')[1]
dec_id =self.pool.get('decimal.precision').browse(cr, uid, sale_id,context=context)
dec_id.write({
'digits': config.decimal_precision_sale,
})
def set_sale_defaults(self, cr, uid, ids, context=None):
ir_values = self.pool.get('ir.values')
ir_model_data = self.pool.get('ir.model.data')
@@ -174,6 +190,8 @@ class sale_configuration(osv.osv_memory):
class account_config_settings(osv.osv_memory):
_inherit = 'account.config.settings'
_columns = {
'module_sale_analytic_plans': fields.boolean('Several Analytic Accounts on Sales',
help="""This allows install module sale_analytic_plans."""),
'group_analytic_account_for_sales': fields.boolean('Analytic Accounting for Sales',
implied_group='sale.group_analytic_accounting',
help="Allows you to specify an analytic account on sale orders."),
+2
View File
@@ -33,6 +33,7 @@
<field name="module_warning"/>
<field name="module_sale_journal"/>
<field name="group_multiple_shops"/>
<field name="decimal_precision_sale"/>
<field name="default_picking_policy" attrs="{'invisible':[('group_invoice_deli_orders','=',False)]}"/>
<separator string="Contracts" colspan="4"/>
<field name="module_account_analytic_analysis" on_change="onchange_timesheet(module_account_analytic_analysis)"/>
@@ -53,6 +54,7 @@
<field name="arch" type="xml">
<group name="analytic_accounting" position="after">
<field name="group_analytic_account_for_sales"/>
<field name="module_sale_analytic_plans"/>
</group>
</field>
</record>
+2 -2
View File
@@ -82,13 +82,13 @@ stock_report_prodlots()
class stock_report_tracklots(osv.osv):
_name = "stock.report.tracklots"
_description = "Stock report by tracking lots"
_description = "Stock report by Logistic Serial Number"
_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),
'tracking_id': fields.many2one('stock.tracking', 'Tracking lot', readonly=True, select=True),
'tracking_id': fields.many2one('stock.tracking', 'Logistic Serial Number', readonly=True, select=True),
}
def init(self, cr):
+3 -8
View File
@@ -26,13 +26,8 @@ class stock_config_settings(osv.osv_memory):
_inherit = 'res.config.settings'
_columns = {
'module_stock_no_autopicking': fields.boolean("Force Picking before Manufactoring Orders",
help="""This module allows an intermediate picking process to provide raw materials to production orders.
For example to manage production made by your suppliers (sub-contracting).
To achieve this, set the assembled product which is sub-contracted to "No Auto-Picking"
and put the location of the supplier in the routing of the assembly operation.
This installs the module stock_no_autopicking."""),
'module_claim_from_delivery': fields.boolean("Track Claims from Delivery",
'module_claim_from_delivery': fields.boolean("Allows Claims on Delivery Orders",
help="""Adds a Claim link to the delivery order.
This installs the module claim_from_delivery."""),
'module_stock_invoice_directly': fields.boolean("Invoice Directly from the Picking",
@@ -80,5 +75,5 @@ class stock_config_settings(osv.osv_memory):
implied_group='product.group_product_variant',
help="""This allows to configure and use Product Variant."""),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1 -2
View File
@@ -22,10 +22,9 @@
<separator string="Logistics" colspan="4"/>
<field name="group_stock_multiple_locations"/>
<field name="module_stock_no_autopicking"/>
<field name="module_stock_location"/>
<field name="module_stock_invoice_directly"/>
<separator string="Products" colspan="4"/>
<field name="group_stock_packaging"/>
<field name="group_stock_inventory_valuation"/>
+1 -1
View File
@@ -19,7 +19,7 @@
</record>
<record id="group_tracking_lot" model="res.groups">
<field name="name">Manage Tracking lots</field>
<field name="name">Manage Logistic Serial Number</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
+32 -32
View File
@@ -47,7 +47,7 @@
<button name="%(stock.action_view_stock_inventory_line_split)d"
string="Split inventory lines" groups="stock.group_inventory_valuation"
type="action" icon="gtk-justify-fill"/>
<field name="location_id"/>
<field name="location_id" groups="stock.group_locations"/>
</tree>
</field>
</record>
@@ -116,7 +116,7 @@
<page string="General Informations">
<field colspan="4" name="inventory_line_id" nolabel="1" widget="one2many_list">
<tree string="Products" editable="bottom">
<field domain="[('usage','=','internal')]" name="location_id"/>
<field domain="[('usage','=','internal')]" name="location_id" />
<field context="{'location':location_id, 'uom':product_uom, 'to_date':parent.date}" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom,parent.date)" domain="[('type','&lt;&gt;','service')]"/>
<field name="product_qty"/>
<field name="product_uom" groups="product.group_uom"/>
@@ -159,8 +159,8 @@
icon="terp-stock_effects-object-colorize"
context="{'inventory_id':parent.id}"
states="draft,done,cancel"/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="location_dest_id" groups="stock.group_locations"/>
<field name="date" string="Date"/>
<field name="state" invisible="True"/>
</tree>
@@ -349,8 +349,8 @@
<field name="tracking_id" groups="stock.group_tracking_lot"/>
<field name="date"/>
<field name="prodlot_id"/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="location_dest_id" groups="stock.group_locations"/>
<field name="state"/>
</tree>
</field>
@@ -429,8 +429,8 @@
<field name="tracking_id" groups="stock.group_tracking_lot"/>
<field name="product_packaging" domain="[('product_id','=',product_id)]" groups="product.group_stock_packaging"/>
<field name="picking_id"/>
<field name="location_id" />
<field name="location_dest_id" />
<field name="location_id" groups="stock.group_locations"/>
<field name="location_dest_id" groups="stock.group_locations"/>
<field name="create_date" groups="base.group_no_one"/>
<field name="date" string="Date" groups="base.group_no_one"/>
<field name="date_expected" string="Date Expected"/>
@@ -453,8 +453,8 @@
<field name="tracking_id" groups="stock.group_tracking_lot"/>
<field name="product_packaging" domain="[('product_id','=',product_id)]" groups="product.group_stock_packaging"/>
<field name="picking_id"/>
<field name="location_id" />
<field name="location_dest_id" />
<field name="location_id" groups="stock.group_locations"/>
<field name="location_dest_id" groups="stock.group_locations"/>
<field name="create_date" groups="base.group_no_one"/>
<field name="date" string="Date" groups="base.group_no_one"/>
<field name="date_expected" string="Date Expected"/>
@@ -505,7 +505,7 @@
<separator string="Location" colspan="2"/>
<field name="name"/>
<field name="usage"/>
<field name="location_id"/>
<field name="location_id" groups="stock.group_locations"/>
</group>
<group col="4" colspan="2">
<separator string="Additional Information" colspan="4"/>
@@ -755,20 +755,20 @@
<field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="4"/>
<field name="product_packaging" groups="product.group_stock_packaging" domain="[('product_id','=',product_id)]" colspan="4"/>
</group>
<group colspan="2" col="2">
<separator string="Locations" colspan="2" />
<field name="location_id" domain="[('usage','&lt;&gt;','view')]" />
<field name="location_dest_id" domain="[('usage','=','internal')]" />
<field name="location_id" domain="[('usage','&lt;&gt;','view')]"/>
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
</group>
<group colspan="2" col="2">
<separator string="Dates" colspan="2" />
<field name="create_date" invisible="1"/>
<field name="date"/>
<field name="date_expected" on_change="onchange_date(date,date_expected)"/>
</group>
<group colspan="2" col="4" groups="stock.group_tracking_lot">
<separator string="Traceability" colspan="4" groups="stock.group_tracking_lot"/>
<field name="tracking_id" groups="stock.group_tracking_lot" colspan="3"/>
@@ -924,7 +924,7 @@
icon="terp-stock_effects-object-colorize"
groups="product.group_stock_packaging"
states="draft,assigned,confirmed"/>
<field name="location_id"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="date"/>
<field name="state"/>
<button name="%(action_partial_move_server)d" string="Process" type="action" states="confirmed,assigned" icon="gtk-go-forward"/>
@@ -947,17 +947,17 @@
<group colspan="2" col="2">
<separator string="Locations" colspan="2" />
<field name="location_id" domain="[('usage','=','internal')]" />
<field name="location_dest_id" domain="[('usage','&lt;&gt;','view')]" />
<field name="location_id" domain="[('usage','=','internal')]"/>
<field name="location_dest_id" domain="[('usage','&lt;&gt;','view')]"/>
</group>
<group colspan="2" col="2">
<separator string="Dates" colspan="2" />
<field name="create_date" invisible="1"/>
<field name="date"/>
<field name="date_expected" on_change="onchange_date(date,date_expected)"/>
</group>
<group colspan="2" col="4">
<separator string="Traceability" colspan="4" groups="stock.group_tracking_lot"/>
<field name="tracking_id" groups="stock.group_tracking_lot" colspan="3" />
@@ -1143,7 +1143,7 @@
groups="product.group_stock_packaging"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed"/>
<field name="location_dest_id"/>
<field name="location_dest_id" groups="stock.group_locations"/>
<field name="state"/>
</tree>
<form string="Stock Moves">
@@ -1164,17 +1164,17 @@
<group colspan="2" col="2">
<separator string="Locations" colspan="2" />
<field name="location_id" domain="[('usage','&lt;&gt;','view')]" />
<field name="location_dest_id" domain="[('usage','=','internal')]" />
<field name="location_id" domain="[('usage','&lt;&gt;','view')]"/>
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
</group>
<group colspan="2" col="2">
<separator string="Dates" colspan="2" />
<field name="create_date" invisible="1"/>
<field name="date"/>
<field name="date_expected" on_change="onchange_date(date,date_expected)"/>
</group>
<group colspan="2" col="4">
<separator string="Traceability" colspan="4" groups="stock.group_tracking_lot"/>
<field name="tracking_id" groups="stock.group_tracking_lot" colspan="3" />
@@ -1383,8 +1383,8 @@
groups="product.group_stock_packaging"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="location_dest_id" groups="stock.group_locations"/>
<field name="date" groups="base.group_no_one"/>
<field name="date_expected"/>
<field name="state"/>
@@ -1411,8 +1411,8 @@
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" colspan="1"/>
<newline/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="location_dest_id" groups="stock.group_locations"/>
<field name="partner_id" context="{'contact_display':'partner'}"/>
</group>
@@ -1597,8 +1597,8 @@
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" colspan="1"/>
<newline/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="location_dest_id" groups="stock.group_locations"/>
<field name="partner_id"/>
</group>