bzr revid: fp@tinyerp.com-20080827205310-io05rfavmpyxk6uc
This commit is contained in:
Fabien Pinckaers 2008-08-27 22:53:10 +02:00
parent abeddaa388
commit 70c2df4cfa
9 changed files with 159 additions and 124 deletions

View File

@ -1656,7 +1656,7 @@ class account_account_template(osv.osv):
'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Force all moves for this account to have this secondary currency."),
'code': fields.char('Code', size=64),
'type': fields.selection(_code_get, 'Account Type', required=True),
'reconcile': fields.boolean('Reconcile', help="Check this option if the user can make a reconciliation of the entries in this account."),
'reconcile': fields.boolean('Allow Reconciliation', help="Check this option if the user can make a reconciliation of the entries in this account."),
'shortcut': fields.char('Shortcut', size=12),
'note': fields.text('Note'),
}

View File

@ -111,22 +111,23 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account">
<notebook>
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="type" select="1"/>
<field name="company_id" select="2"/>
<field name="parent_id"/>
<field name="active"/>
</group>
<notebook colspan="4">
<page string="General Information">
<field colspan="4" name="name" select="1"/>
<field name="company_id" select="2"/>
<field name="active"/>
<newline/>
<field name="type" select="1"/>
<field name="code" select="1"/>
<field name="shortcut"/>
<field name="sign"/>
<field name="currency_id" select="2"/>
<field name="close_method"/>
<field name="reconcile"/>
<newline/>
<field name="parent_id"/>
<newline/>
<field name="child_consol_ids" colspan="4"/>
<field colspan="4" name="tax_ids"/>

View File

@ -44,15 +44,14 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Analytic account">
<notebook>
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="parent_id" on_change="on_change_parent(parent_id)"/>
<field name="company_id" select="2"/>
<field name="type" select="2"/>
<field name="partner_id" select="1"/>
<notebook colspan="4">
<page string="Account Data">
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="parent_id" on_change="on_change_parent(parent_id)"/>
<field name="company_id" select="2"/>
<field name="type" select="2"/>
<field name="partner_id" select="1"/>
<newline/>
<field name="date_start"/>
<field name="date" select="2"/>
<field name="active" select="2"/>
@ -75,7 +74,7 @@
<field name="view_id" ref="view_account_analytic_account_tree"/>
</record>
<menuitem id="next_id_39" name="Analytic Accounts" parent="account.menu_finance_configuration"/>
<menuitem action="action_account_analytic_account_form" id="account_analytic_def_account" parent="next_id_39"/>
<menuitem action="action_account_analytic_account_form" id="account_analytic_def_account" parent="next_id_39"/>
<record id="action_account_analytic_account_tree2" model="ir.actions.act_window">
<field name="name">Analytic Chart of Accounts</field>
@ -86,9 +85,9 @@
<field name="view_id" ref="view_account_analytic_account_tree"/>
</record>
<menuitem
action="action_account_analytic_account_tree2"
id="account_analytic_def_chart"
parent="account.next_id_39"/>
action="action_account_analytic_account_tree2"
id="account_analytic_def_chart"
parent="account.next_id_39"/>
<menuitem action="action_account_analytic_account_tree2" id="account_analytic_chart" parent="account.menu_finance_charts"/>
<menuitem id="next_id_40" name="Analytic" parent="account.menu_finance_reporting"/><menuitem action="action_account_analytic_account_tree2" id="account_analytic_chart_balance" parent="next_id_40"/>

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<terp>
<data noupdate="1">
<!--
Case Sections
-->
<record id="section_support" model="crm.case.section">
<field name="name">Helpdesk and Support</field>
<field name="code">support</field>
@ -18,11 +18,11 @@
<field name="name">Supplier complaints</field>
<field name="code">purchase</field>
</record>
<!--
Case Categories
-->
<record id="categ1" model="crm.case.categ">
<field name="name">Computer Crashed</field>
<field name="section_id" ref="section_support"/>
@ -47,9 +47,9 @@
<field name="name">Furnitures</field>
<field name="section_id" ref="section_purchase"/>
</record>
<!-- Specific menus -->
<!--
<record model="ir.actions.act_window" id="crm_case_categ2-act">
<field name="name">crm.case.form</field>
@ -60,11 +60,9 @@
</record>
<menuitem name="CRM &amp; SRM/Helpdesk/Helpdesk Cases" id="menu_crm_case_categ2-act" action="crm_case_categ2-act"/>
-->
<function eval="([section_support], 'Helpdesk', ref('menu_crm'))" model="crm.case.section" name="menu_create"/>
<!-- Demo Cases -->
<record model="crm.case">
<field name="name">Think about Tiny ERP</field>
<field name="priority">3</field>
@ -81,7 +79,7 @@
<field eval="time.strftime('%Y-%m-24')" name="date_deadline"/>
<field model="res.partner.canal" name="canal_id" search="[]"/>
</record>
<record id="case1" model="crm.case">
<field name="name">Need a new eCommerce Website</field>
<field name="priority">4</field>
@ -105,7 +103,7 @@
<function model="crm.case" name="case_log">
<value eval="[ref('case1')]" model="crm.case"/>
</function>
<record id="case2" model="crm.case">
<field name="name">Hdd Crashed unexpectedly</field>
<field name="priority">3</field>
@ -121,7 +119,7 @@
<field eval="time.strftime('%Y-%m-10')" name="date_deadline"/>
<field model="res.partner.canal" name="canal_id" search="[]"/>
</record>
<record id="case3" model="crm.case">
<field name="name">Need a new eCommerce Website</field>
<field name="priority">3</field>
@ -145,7 +143,7 @@
<function model="crm.case" name="case_log">
<value eval="[ref('case3')]" model="crm.case"/>
</function>
<record id="case4" model="crm.case">
<field name="name">Need a new eCommerce Website</field>
<field name="priority">3</field>
@ -169,7 +167,7 @@
<function model="crm.case" name="case_log">
<value eval="[ref('case4')]" model="crm.case"/>
</function>
<record id="case5" model="crm.case">
<field name="name">Bug in program</field>
<field name="priority">3</field>
@ -188,7 +186,7 @@
<function model="crm.case" name="case_open">
<value eval="[ref('case5')]" model="crm.case"/>
</function>
<record id="case6" model="crm.case">
<field name="name">Server is down</field>
<field name="priority">3</field>
@ -216,7 +214,7 @@
<function model="crm.case" name="case_pending">
<value eval="[ref('case6')]" model="crm.case"/>
</function>
<record id="case7" model="crm.case">
<field name="name">Disk failure</field>
<field name="priority">2</field>
@ -238,7 +236,7 @@
<function model="crm.case" name="case_log">
<value eval="[ref('case7')]" model="crm.case"/>
</function>
<record id="case8" model="crm.case">
<field name="name">Missing hardware</field>
<field name="priority">3</field>
@ -260,7 +258,7 @@
<function model="crm.case" name="case_log">
<value eval="[ref('case8')]" model="crm.case"/>
</function>
<record id="case9" model="crm.case">
<field name="name">Need a new eCommerce Website</field>
<field name="priority">4</field>
@ -284,7 +282,7 @@
<function model="crm.case" name="case_log">
<value eval="[ref('case9')]" model="crm.case"/>
</function>
<record id="case10" model="crm.case">
<field name="name">Need a new module</field>
<field name="priority">3</field>
@ -313,7 +311,7 @@
<function model="crm.case" name="case_close">
<value eval="[ref('case10')]" model="crm.case"/>
</function>
<record id="case11" model="crm.case">
<field name="name">Need support on module</field>
<field name="priority">1</field>
@ -335,7 +333,7 @@
<function model="crm.case" name="case_log">
<value eval="[ref('case11')]" model="crm.case"/>
</function>
<record id="case12" model="crm.case">
<field name="name">Bad packing</field>
<field name="priority">2</field>
@ -356,7 +354,7 @@
<function model="crm.case" name="case_log">
<value eval="[ref('case12')]" model="crm.case"/>
</function>
<record id="case13" model="crm.case">
<field name="name">Need quotation</field>
<field name="priority">3</field>
@ -383,7 +381,7 @@
<function model="crm.case" name="case_close">
<value eval="[ref('case13')]" model="crm.case"/>
</function>
<record id="case14" model="crm.case">
<field name="name">New server</field>
<field name="priority">1</field>
@ -404,7 +402,7 @@
<function model="crm.case" name="case_log">
<value eval="[ref('case14')]" model="crm.case"/>
</function>
<record id="case15" model="crm.case">
<field name="name">Formation</field>
<field name="priority">4</field>
@ -431,7 +429,7 @@
<function model="crm.case" name="case_log">
<value eval="[ref('case15')]" model="crm.case"/>
</function>
<record id="case16" model="crm.case">
<field name="name">Need new specific reports</field>
<field name="priority">3</field>
@ -453,15 +451,15 @@
<function model="crm.case" name="case_log">
<value eval="[ref('case16')]" model="crm.case"/>
</function>
<record id="case17" model="crm.case">
<field name="name">Server down</field>
<field name="priority">3</field>
<field name="description">Server is down, doesn't answser to pingz
Should check if still running, and if network still up (need to be in front of the server)
Very very very high priority, as I cannot svn up/ci/st without the server
(btw : this is only demo data. no stress dear sysadmin :))
</field>
<field name="section_id" ref="section_support"/>
@ -481,6 +479,6 @@
<function model="crm.case" name="case_log">
<value eval="[ref('case17')]" model="crm.case"/>
</function>
</data>
</terp>
</terp>

View File

@ -121,18 +121,27 @@ class hr_employee(osv.osv):
'name' : fields.char("Employee", size=128, required=True),
'active' : fields.boolean('Active'),
'company_id': fields.many2one('res.company', 'Company'),
'user_id' : fields.many2one('res.users', 'Related User'),
'country_id' : fields.many2one('res.country', 'Nationality'),
'birthday' : fields.date("Started on"),
'ssnid': fields.char('SSN No', size=32),
'sinid': fields.char('SIN No', size=32),
'otherid': fields.char('Other ID', size=32),
'gender': fields.selection([('',''),('male','Male'),('female','Female')], 'Gender'),
'marital': fields.selection([('maried','Maried'),('unmaried','Unmaried'),('divorced','Divorced'),('other','Other')],'Marital Status', size=32),
'address_id': fields.many2one('res.partner.address', 'Contact address'),
'state': fields.function(_state, method=True, type='selection', selection=[('absent', 'Absent'), ('present', 'Present')], string='Attendance'),
'started' : fields.date("Started on"),
'work_phone': fields.char('Work Phone', size=32),
'work_email': fields.char('Work Email', size=128),
'work_location': fields.char('Office Location', size=32),
'notes': fields.text('Notes'),
'attendances' : fields.one2many('hr.attendance', 'employee_id', "Employee's attendances"),
'holidays' : fields.one2many('hr.holidays', 'employee_id', "Employee's holidays"),
'workgroups' : fields.many2many('hr.timesheet.group', 'hr_timesheet_employee_rel', 'emp_id', 'tgroup_id', "Employee's work team"),
'user_id' : fields.many2one('res.users', 'Tiny ERP User'),
'state': fields.function(_state, method=True, type='selection', selection=[('absent', 'Absent'), ('present', 'Present')], string='Attendance'),
'parent_id': fields.many2one('hr.employee', 'Manager', select=True),
'category_id' : fields.many2one('hr.employee.category', 'Category'),
'regime' : fields.float('Workhours by week'),
'holiday_max' : fields.integer("Number of holidays"),
'parent_id': fields.many2one('hr.employee', 'Boss', select=True),
'child_ids': fields.one2many('hr.employee', 'parent_id','Subordinates'),
}
_defaults = {

View File

@ -55,9 +55,7 @@
<record id="employee1" model="hr.employee">
<field name="name">Fabien Pinckaers</field>
<field name="regime">45</field>
<field model="res.users" name="user_id" search="[('login','=','admin')]"/>
<field name="holiday_max">25</field>
</record>
<record model="hr.timesheet">

View File

@ -6,45 +6,63 @@
<menuitem groups="base.group_admin" id="menu_hr_configuration" name="Configuration" parent="hr.menu_hr_root"/>
<!--
==========
Employee
==========
-->
==========
Employee
==========
-->
<record id="view_employee_form" model="ir.ui.view">
<field name="name">hr.employee.form</field>
<field name="model">hr.employee</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Employee">
<notebook>
<page string="Information">
<separator colspan="4" string="General Information"/>
<field name="name" select="1"/>
<field name="company_id"/>
<field name="user_id"/>
<field name="address_id"/>
<field colspan="4" name="notes"/>
<separator colspan="4" string="Working Data"/>
<field name="regime"/>
<field name="active" select="1"/>
<field name="holiday_max"/>
<field name="started" select="1"/>
<field name="parent_id" select="1"/>
<field name="category_id"/>
<field colspan="4" name="workgroups"/>
<field name="state"/>
<group colspan="4" col="4">
<field name="name" select="1"/>
<field name="active" select="1"/>
<field name="company_id"/>
<field name="user_id"/>
</group>
<notebook colspan="4">
<page string="Personal Information">
<group col="2" colspan="2">
<button name="sign_in" states="absent" string="Sign in !" type="object"/>
<button name="sign_out" states="present" string="Sign out !" type="object"/>
<separator colspan="2" string="Social IDs"/>
<field name="ssnid"/>
<field name="sinid"/>
<field name="otherid"/>
</group>
<group col="2" colspan="2">
<separator string="Status" colspan="2"/>
<field name="gender"/>
<field name="marital"/>
<field name="country_id"/>
<field name="birthday"/>
</group>
<group col="2" colspan="2">
<separator string="Contact Information" colspan="2"/>
<field name="address_id" colspan="2"/>
<field name="work_phone"/>
<field name="work_email"/>
<field name="work_location"/>
</group>
<group col="4" colspan="2">
<separator string="Job Information" colspan="4"/>
<field name="parent_id" select="1" colspan="4"/>
<field name="state"/>
<button name="sign_in" states="absent" string="Sign In" type="object"/>
<button name="sign_out" states="present" string="Sign Out" type="object"/>
<field name="category_id" colspan="4"/>
</group>
</page>
<page string="Holidays">
<field colspan="4" name="holidays" nolabel="1" widget="one2many_list"/>
<page string="Notes">
<field colspan="4" nolabel="1" name="notes"/>
</page>
</notebook>
</form>
</field>
</record>
<record id="view_employee_tree" model="ir.ui.view">
<field name="name">hr.employee.tree</field>
<field name="model">hr.employee</field>
@ -53,8 +71,10 @@
<field name="arch" type="xml">
<tree string="Employees">
<field name="name"/>
<field name="user_id"/>
<field name="work_phone"/>
<field name="work_email"/>
<field name="address_id"/>
<field name="parent_id"/>
<field name="state"/>
</tree>
</field>
@ -67,45 +87,53 @@
<field name="view_id" ref="view_employee_tree"/>
<field name="domain">[('parent_id','=',False)]</field>
</record>
<menuitem action="open_view_employee_tree" groups="base.group_admin" id="menu_open_view_employee_tree" parent="hr.menu_hr_root"/>
<record id="view_employee_list" model="ir.ui.view">
<field name="name">hr.employee.tree</field>
<field name="model">hr.employee</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Employees">
<field name="name"/>
<field name="user_id"/>
<field name="address_id"/>
<field name="state"/>
<field name="parent_id"/>
</tree>
</field>
</record>
<record id="open_view_employee_list" model="ir.actions.act_window">
<field name="name">Employees</field>
<field name="res_model">hr.employee</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_employee_list"/>
</record>
<menuitem action="open_view_employee_list" groups="base.group_admin" id="menu_open_view_employee_list" parent="hr.menu_open_view_employee_tree"/>
<menuitem
action="open_view_employee_list"
groups="base.group_admin"
id="menu_open_view_employee_list"
parent="hr.menu_hr_root"/>
<menuitem
action="open_view_employee_tree"
groups="base.group_admin"
id="menu_open_view_employee_tree"
parent="menu_open_view_employee_list"/>
<record id="open_view_employee_list_my" model="ir.actions.act_window">
<field name="name">My Employees</field>
<field name="res_model">hr.employee</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('parent_id.user_id','=',uid)]</field>
</record>
<menuitem
action="open_view_employee_list_my"
id="menu_open_view_employee_list_my"
parent="menu_open_view_employee_list"/>
<record id="open_view_employee_new" model="ir.actions.act_window">
<field name="name">New Employee</field>
<field name="res_model">hr.employee</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
</record>
<menuitem action="open_view_employee_new" groups="base.group_admin" id="menu_open_view_employee_new" parent="hr.menu_open_view_employee_tree"/>
<menuitem
action="open_view_employee_new"
groups="base.group_admin"
id="menu_open_view_employee_new"
parent="menu_open_view_employee_list"/>
<!--
=======================
Employee architecture
=======================
-->
=======================
Employee architecture
=======================
-->
<record id="view_partner_tree2" model="ir.ui.view">
<field name="name">hr.employee.tree</field>
<field name="model">hr.employee</field>
@ -140,10 +168,10 @@
<!--
============
Working Time
============
-->
============
Working Time
============
-->
<record id="create_group" model="ir.ui.view">
<field name="name">hr.timesheet.group.form</field>
<field name="model">hr.timesheet.group</field>

View File

@ -95,10 +95,12 @@
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<field name="notes" position="after">
<field name="product_id"/>
<field name="journal_id"/>
</field>
<notebook position="inside">
<page string="Timesheets">
<field name="product_id"/>
<field name="journal_id"/>
</page>
</notebook>
</field>
</record>
</data>

View File

@ -244,8 +244,8 @@ class product_template(osv.osv):
'description': fields.text('Description'),
'description_purchase': fields.text('Purchase Description'),
'description_sale': fields.text('Sale Description'),
'type': fields.selection([('product','Stockable Product'),('consu', 'Consumable'),('service','Service')], 'Product Type', required=True),
'supply_method': fields.selection([('produce','Produce'),('buy','Buy')], 'Supply method', required=True),
'type': fields.selection([('product','Stockable Product'),('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Will change the way procurements are processed, consumable are stockable products with infinite stock, or without a stock management in the system."),
'supply_method': fields.selection([('produce','Produce'),('buy','Buy')], 'Supply method', required=True, help="Produce will generate production order or tasks, according to the product type. Purchase will trigger purchase orders when requested."),
'sale_delay': fields.float('Customer Lead Time', help="This is the average time between the confirmation of the customer order and the delivery of the finnished products. It's the time you promise to your customers."),
'produce_delay': fields.float('Manufacturing Lead Time', help="Average time to produce this product. This is only for the production order and, if it is a multi-level bill of material, it's only for the level of this product. Different delays will be summed for all levels and purchase orders."),
'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Procure Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until refurnishing. 'Make to Order': When needed, purchase or produce for the procurement request."),