merge
bzr revid: nel@silver-20081030082445-g6i7zs68eolw35ih bzr revid: nel@silver-20081030082551-bc3j7nhaum9a2oqd
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
<report auto="False" id="account_3rdparty_ledger" menu="False" model="res.partner" name="account.third_party_ledger" rml="account/report/third_party_ledger.rml" string="Partner Ledger"/>
|
||||
<report auto="False" id="account_account_balance" menu="False" model="account.account" name="account.account.balance" rml="account/report/account_balance.rml" string="Account Balance"/>
|
||||
<report auto="False" id="account_3rdparty_account_balance" menu="False" model="account.account" name="account.partner.balance" rml="account/report/partner_balance.rml" string="Partner Balance"/>
|
||||
<report auto="False" id="account_central_journal" model="account.journal.period" name="account.central.journal" rml="account/report/central_journal.rml" string="Print Central Journal"/>
|
||||
<report auto="False" id="account_general_journal" model="account.journal.period" name="account.general.journal" rml="account/report/general_journal.rml" string="Print General Journal"/>
|
||||
<report auto="False" id="account_journal" model="account.journal.period" name="account.journal.period.print" rml="account/report/account_journal.rml" string="Print Journal"/>
|
||||
<report auto="False" id="account_central_journal" model="account.journal.period" name="account.central.journal" rml="account/report/central_journal.rml" string="Central Journal"/>
|
||||
<report auto="False" id="account_general_journal" model="account.journal.period" name="account.general.journal" rml="account/report/general_journal.rml" string="General Journal"/>
|
||||
<report auto="False" id="account_journal" model="account.journal.period" name="account.journal.period.print" rml="account/report/account_journal.rml" string="Journal"/>
|
||||
<report auto="False" id="account_overdue" model="res.partner" name="account.overdue" rml="account/report/overdue.rml" string="Overdue Payments"/>
|
||||
<report auto="False" id="account_invoices" model="account.invoice" name="account.invoice" rml="account/report/invoice.rml" string="Invoices" attachment="print-"/>
|
||||
<report id="account_transfers" model="account.transfer" name="account.transfer" string="Transfers" xml="account/report/transfer.xml" xsl="account/report/transfer.xsl"/>
|
||||
@@ -17,23 +17,23 @@
|
||||
|
||||
<report auto="False" id="account_vat_declaration" menu="False" model="account.tax.code" name="account.vat.declaration" rml="account/report/tax_report.rml" string="Taxes Report"/>
|
||||
|
||||
<menuitem
|
||||
id="menu_tax_report"
|
||||
name="Taxes Reports"
|
||||
parent="account.menu_finance_reporting"/>
|
||||
<menuitem
|
||||
id="menu_tax_report"
|
||||
name="Taxes Reports"
|
||||
parent="account.menu_finance_reporting"/>
|
||||
|
||||
<wizard
|
||||
id="wizard_vat_declaration"
|
||||
menu="False"
|
||||
model="account.tax.code"
|
||||
name="account.vat.declaration"
|
||||
string="Print Taxes Report"/>
|
||||
id="wizard_vat_declaration"
|
||||
menu="False"
|
||||
model="account.tax.code"
|
||||
name="account.vat.declaration"
|
||||
string="Print Taxes Report"/>
|
||||
<menuitem
|
||||
icon="STOCK_PRINT"
|
||||
action="wizard_vat_declaration"
|
||||
id="menu_wizard_vat_declaration"
|
||||
parent="menu_tax_report"
|
||||
type="wizard"/>
|
||||
action="wizard_vat_declaration"
|
||||
id="menu_wizard_vat_declaration"
|
||||
parent="menu_tax_report"
|
||||
type="wizard"/>
|
||||
|
||||
|
||||
<record id="action_tax_code_tree" model="ir.actions.act_window">
|
||||
@@ -43,20 +43,20 @@
|
||||
<field name="view_type">tree</field>
|
||||
<field name="view_id" ref="view_tax_code_tree"/>
|
||||
</record>
|
||||
<menuitem
|
||||
action="action_tax_code_tree"
|
||||
id="menu_action_tax_code_tree"
|
||||
parent="menu_tax_report"
|
||||
sequence="12"/>
|
||||
<menuitem
|
||||
action="action_tax_code_tree"
|
||||
id="menu_action_tax_code_tree"
|
||||
parent="menu_tax_report"
|
||||
sequence="12"/>
|
||||
|
||||
<!--
|
||||
|
||||
<report id="analytic_journal"
|
||||
string="Analytic journal"
|
||||
model="account.analytic.account"
|
||||
name="account.analytic.journal"
|
||||
xml="account/report/analytic_journal.rml"
|
||||
auto="False" />
|
||||
-->
|
||||
<report id="analytic_journal"
|
||||
string="Analytic journal"
|
||||
model="account.analytic.account"
|
||||
name="account.analytic.journal"
|
||||
xml="account/report/analytic_journal.rml"
|
||||
auto="False" />
|
||||
-->
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -1372,7 +1372,7 @@
|
||||
<separator string="" colspan="4"/>
|
||||
<label string="" colspan="2"/>
|
||||
<group col="2" colspan="2">
|
||||
<button icon="gtk-cancel" special="cancel" string="Don't Continue" name="action_cancel" type="object"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Skip" name="action_cancel" type="object"/>
|
||||
<button icon="gtk-ok" name="action_create" string="Continue" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
|
||||
@@ -1,31 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<menuitem icon="terp-project" id="menu_main" name="Project Management"/>
|
||||
|
||||
<record id="action_account_analytic_managed" model="ir.actions.act_window">
|
||||
<field name="name">My managed accounts</field>
|
||||
<field name="name">My Accounts</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="domain">[('user_id','=',uid)]</field>
|
||||
</record>
|
||||
<menuitem id="next_id_71" name="Financial Project Management" parent="project.menu_main" sequence="20"/>
|
||||
<menuitem id="menu_account" name="Analytic Accounts" parent="next_id_71" sequence="10"/>
|
||||
<menuitem id="menu_invoicing" name="Invoicing" parent="next_id_71" sequence="20"/>
|
||||
|
||||
<menuitem id="next_id_71" name="Analytic Accounts" parent="account_analytic_analysis.menu_main"/><menuitem action="action_account_analytic_managed" id="menu_analytic_account_managed" parent="next_id_71"/>
|
||||
<menuitem action="action_account_analytic_managed" id="menu_analytic_account_managed" parent="menu_account"/>
|
||||
|
||||
<record id="action_hr_tree_invoiced_all" model="ir.actions.act_window">
|
||||
<field name="name">All Uninvoiced Entries</field>
|
||||
<field name="res_model">account.analytic.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="domain">[('invoice_id','=',False),('to_invoice','!=',False)]</field>
|
||||
</record>
|
||||
<menuitem action="action_hr_tree_invoiced_all" id="menu_action_hr_tree_invoiced_all" parent="menu_invoicing"/>
|
||||
|
||||
<record id="action_hr_tree_invoiced_my" model="ir.actions.act_window">
|
||||
<field name="name">Uninvoiced entries of my accounts</field>
|
||||
<field name="name">My Uninvoiced Entries</field>
|
||||
<field name="res_model">account.analytic.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="domain">[('invoice_id','=',False),('to_invoice','!=',False),('account_id.user_id','=',uid)]</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_hr_tree_invoiced_my" id="menu_action_hr_tree_invoiced_my" parent="account_analytic_analysis.next_id_71"/>
|
||||
<menuitem action="action_hr_tree_invoiced_my" id="menu_action_hr_tree_invoiced_my" parent="menu_invoicing"/>
|
||||
|
||||
<record id="action_account_analytic_managed_open" model="ir.actions.act_window">
|
||||
<field name="name">My Open Managed Accounts</field>
|
||||
<field name="name">My Current Accounts</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
@@ -35,7 +43,7 @@
|
||||
<menuitem action="action_account_analytic_managed_open" id="menu_analytic_account_to_valid_open" parent="account_analytic_analysis.menu_analytic_account_managed"/>
|
||||
|
||||
<record id="action_account_analytic_managed_pending" model="ir.actions.act_window">
|
||||
<field name="name">My Pending Managed Accounts</field>
|
||||
<field name="name">My Pending Accounts</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
@@ -44,15 +52,6 @@
|
||||
|
||||
<menuitem action="action_account_analytic_managed_pending" id="menu_analytic_account_to_valid_pending" parent="account_analytic_analysis.menu_analytic_account_managed"/>
|
||||
|
||||
<record id="action_account_analytic_managed_overpassed" model="ir.actions.act_window">
|
||||
<field name="name">Overpassed Accounts</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="domain">[('date','<=',time.strftime('%Y-%m-%d')),('state','=','open')]</field>
|
||||
</record>
|
||||
<menuitem action="action_account_analytic_managed_overpassed" id="menu_action_account_analytic_managed_overpassed" parent="account_analytic_analysis.next_id_71"/>
|
||||
|
||||
<record id="action_account_analytic_new" model="ir.actions.act_window">
|
||||
<field name="name">New Analytic Account</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
@@ -62,7 +61,8 @@
|
||||
<menuitem
|
||||
action="action_account_analytic_new"
|
||||
id="menu_action_account_analytic_new"
|
||||
parent="account_analytic_analysis.next_id_71"/>
|
||||
sequence="50"
|
||||
parent="account_analytic_analysis.menu_account"/>
|
||||
|
||||
<record id="action_account_analytic_all" model="ir.actions.act_window">
|
||||
<field name="name">All Analytic Accounts</field>
|
||||
@@ -73,28 +73,30 @@
|
||||
<field name="domain">[]</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_analytic_all" id="menu_action_account_analytic_all" parent="account_analytic_analysis.next_id_71"/>
|
||||
<menuitem action="action_account_analytic_all" id="menu_action_account_analytic_all" parent="account_analytic_analysis.menu_account"/>
|
||||
|
||||
<record id="action_account_analytic_all_draft" model="ir.actions.act_window">
|
||||
<field name="name">Draft Analytic Accounts</field>
|
||||
<record id="action_account_analytic_managed_overpassed" model="ir.actions.act_window">
|
||||
<field name="name">Overpassed Accounts</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="view_id" ref="account.view_account_analytic_account_list"/>
|
||||
<field name="domain">[('state','=','draft')]</field>
|
||||
<field name="domain">[('date','<=',time.strftime('%Y-%m-%d')),('state','=','open')]</field>
|
||||
</record>
|
||||
<menuitem
|
||||
action="action_account_analytic_managed_overpassed"
|
||||
id="menu_action_account_analytic_managed_overpassed"
|
||||
sequence="50"
|
||||
parent="menu_invoicing"/>
|
||||
|
||||
<menuitem action="action_account_analytic_all_draft" id="menu_action_account_analytic_all_draft" parent="menu_action_account_analytic_all"/>
|
||||
|
||||
<record id="action_account_analytic_all_open" model="ir.actions.act_window">
|
||||
<field name="name">Open Analytic Accounts</field>
|
||||
<field name="name">Current Analytic Accounts</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="view_id" ref="account.view_account_analytic_account_list"/>
|
||||
<field name="domain">[('state','=','open')]</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_analytic_all_open" id="menu_action_account_analytic_all_open" parent="menu_action_account_analytic_all"/>
|
||||
|
||||
<record id="action_account_analytic_all_pending" model="ir.actions.act_window">
|
||||
@@ -107,15 +109,5 @@
|
||||
</record>
|
||||
<menuitem action="action_account_analytic_all_pending" id="menu_action_account_analytic_all_pending" parent="menu_action_account_analytic_all"/>
|
||||
|
||||
<record id="action_account_analytic_all_simplified" model="ir.actions.act_window">
|
||||
<field name="name">Simplified View Analytic Accounts</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="view_id" ref="view_account_analytic_simplified"/>
|
||||
<field name="domain">[]</field>
|
||||
</record>
|
||||
<menuitem action="action_account_analytic_all_simplified" id="menu_action_account_analytic_all_simplified" parent="menu_action_account_analytic_all"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -52,6 +52,8 @@ class res_partner_contact(osv.osv):
|
||||
'country_id':fields.many2one('res.country','Nationality'),
|
||||
'birthdate':fields.date('Birth Date'),
|
||||
'active' : fields.boolean('Active'),
|
||||
'partner_id':fields.related('job_ids','address_id','partner_id',type='many2one', relation='res.partner', string='Main Employer'),
|
||||
'function_id':fields.related('job_ids','function_id',type='many2one', relation='res.partner.function', string='Main Job'),
|
||||
}
|
||||
_defaults = {
|
||||
'active' : lambda *a: True,
|
||||
@@ -91,19 +93,13 @@ class res_partner_address(osv.osv):
|
||||
_inherit='res.partner.address'
|
||||
_description ='Partner Address'
|
||||
_columns = {
|
||||
'job_ids':fields.one2many('res.partner.job', 'address_id', 'Functions and Addresses'),
|
||||
'job_ids':fields.one2many('res.partner.job', 'address_id', 'Contacts'),
|
||||
'email': fields.related('job_ids', 'email', type='char', string='Default Email'),
|
||||
}
|
||||
res_partner_address()
|
||||
|
||||
class res_partner_job(osv.osv):
|
||||
|
||||
def _get_partner_id(self, cr, uid, ids, *a):
|
||||
res={}
|
||||
for id in self.browse(cr, uid, ids):
|
||||
res[id.id] = id.address_id.partner_id and id.address_id.partner_id.id or False
|
||||
return res
|
||||
|
||||
def name_get(self, cr, uid, ids, context={}):
|
||||
if not len(ids):
|
||||
return []
|
||||
@@ -122,15 +118,15 @@ class res_partner_job(osv.osv):
|
||||
return super(res_partner_job,self).search(cr, user, args, offset, limit, order, context, count)
|
||||
|
||||
_name = 'res.partner.job'
|
||||
_description ='Contact Function'
|
||||
_description ='Contact Job Title'
|
||||
_order = 'sequence_contact'
|
||||
_columns = {
|
||||
'name': fields.function(_get_partner_id, method=True, type='many2one', relation='res.partner', string='Partner'),
|
||||
'name': fields.related('address_id','partner_id', type='many2one', relation='res.partner', string='Partner'),
|
||||
'address_id':fields.many2one('res.partner.address','Address', required=True),
|
||||
'contact_id':fields.many2one('res.partner.contact','Contact', required=True),
|
||||
'function_id': fields.many2one('res.partner.function','Function', required=True),
|
||||
'function_id': fields.many2one('res.partner.function','Job Title', required=True),
|
||||
'sequence_contact':fields.integer('Sequence (Contact)',help='order of importance of this address in the list of addresses of the linked contact'),
|
||||
'sequence_partner':fields.integer('Sequence (Partner)',help='order of importance of this function in the list of functions of the linked partner'),
|
||||
'sequence_partner':fields.integer('Sequence (Partner)',help='order of importance of this job title in the list of job title of the linked partner'),
|
||||
'email': fields.char('E-Mail', size=240),
|
||||
'phone': fields.char('Phone', size=64),
|
||||
'date_start' : fields.date('Date Start'),
|
||||
|
||||
@@ -232,74 +232,74 @@
|
||||
<record id="res_partner_job_11" model="res.partner.job">
|
||||
<field name="address_id" ref="base.main_address"/>
|
||||
<field name="function_id" ref="base.function_sale"/>
|
||||
<field eval=""""pmi@tinyerp.com"""" name="email"/>
|
||||
<field eval=""""pmi@mycompany.com"""" name="email"/>
|
||||
<field name="contact_id" ref="res_partner_contact_mignon0"/>
|
||||
</record>
|
||||
<record id="res_partner_job_12" model="res.partner.job">
|
||||
<field name="address_id" ref="base.main_address"/>
|
||||
<field name="function_id" ref="base.function_it"/>
|
||||
<field eval=""""stw@tinyerp.com"""" name="email"/>
|
||||
<field eval=""""stw@mycompany.com"""" name="email"/>
|
||||
<field name="contact_id" ref="res_partner_contact_wirtel0"/>
|
||||
</record>
|
||||
<record id="res_partner_job_13" model="res.partner.job">
|
||||
<field name="address_id" ref="base.main_address"/>
|
||||
<field name="function_id" ref="base.function_it"/>
|
||||
<field eval=""""chs@tinyerp.com"""" name="email"/>
|
||||
<field eval=""""chs@mycompany.com"""" name="email"/>
|
||||
<field name="contact_id" ref="res_partner_contact_simonis0"/>
|
||||
</record>
|
||||
<record id="res_partner_job_14" model="res.partner.job">
|
||||
<field name="address_id" ref="base.main_address"/>
|
||||
<field name="function_id" ref="base.function_it"/>
|
||||
<field eval=""""olt@tinyerp.com"""" name="email"/>
|
||||
<field eval=""""olt@mycompany.com"""" name="email"/>
|
||||
<field name="contact_id" ref="res_partner_contact_laurent0"/>
|
||||
</record>
|
||||
<record id="res_partner_job_15" model="res.partner.job">
|
||||
<field name="address_id" ref="base.main_address"/>
|
||||
<field name="function_id" ref="base.function_it"/>
|
||||
<field eval=""""fla@tinyerp.com"""" name="email"/>
|
||||
<field eval=""""fla@mycompany.com"""" name="email"/>
|
||||
<field name="contact_id" ref="res_partner_contact_lambotte0"/>
|
||||
</record>
|
||||
<record id="res_partner_job_16" model="res.partner.job">
|
||||
<field name="address_id" ref="base.main_address"/>
|
||||
<field name="function_id" ref="base.function_sale"/>
|
||||
<field eval=""""avw@tinyerp.com"""" name="email"/>
|
||||
<field eval=""""avw@mycompany.com"""" name="email"/>
|
||||
<field name="contact_id" ref="res_partner_contact_vandewerve0"/>
|
||||
</record>
|
||||
<record id="res_partner_job_17" model="res.partner.job">
|
||||
<field name="address_id" ref="base.main_address"/>
|
||||
<field name="function_id" ref="base.function_it"/>
|
||||
<field eval=""""fbs@tinyerp.com"""" name="email"/>
|
||||
<field eval=""""fbs@mycompany.com"""" name="email"/>
|
||||
<field name="contact_id" ref="res_partner_contact_semal0"/>
|
||||
</record>
|
||||
<record id="res_partner_job_18" model="res.partner.job">
|
||||
<field name="address_id" ref="base.main_address"/>
|
||||
<field name="function_id" ref="base.function_it"/>
|
||||
<field eval=""""qdp@tinyerp.com"""" name="email"/>
|
||||
<field eval=""""qdp@mycompany.com"""" name="email"/>
|
||||
<field name="contact_id" ref="res_partner_contact_depaoli0"/>
|
||||
</record>
|
||||
<record id="res_partner_job_19" model="res.partner.job">
|
||||
<field name="address_id" ref="base.main_address"/>
|
||||
<field name="function_id" ref="base.function_it"/>
|
||||
<field eval=""""nel@tinyerp.com"""" name="email"/>
|
||||
<field eval=""""nel@mycompany.com"""" name="email"/>
|
||||
<field name="contact_id" ref="res_partner_contact_elkhayat0"/>
|
||||
</record>
|
||||
<record id="res_partner_job_20" model="res.partner.job">
|
||||
<field name="address_id" ref="base.main_address"/>
|
||||
<field name="function_id" ref="base.function_it"/>
|
||||
<field eval=""""phu@tinyerp.com"""" name="email"/>
|
||||
<field eval=""""phu@mycompany.com"""" name="email"/>
|
||||
<field name="contact_id" ref="res_partner_contact_luu0"/>
|
||||
</record>
|
||||
<record id="res_partner_job_21" model="res.partner.job">
|
||||
<field name="address_id" ref="base.main_address"/>
|
||||
<field name="function_id" ref="base.function_director"/>
|
||||
<field eval=""""fp@tinyerp.com"""" name="email"/>
|
||||
<field eval=""""fp@mycompany.com"""" name="email"/>
|
||||
<field name="contact_id" ref="res_partner_contact_pinckears0"/>
|
||||
<field name="sequence_partner">-1</field>
|
||||
</record>
|
||||
<record id="res_partner_job_22" model="res.partner.job">
|
||||
<field name="address_id" ref="base.main_address"/>
|
||||
<field name="function_id" ref="base.function_sale"/>
|
||||
<field eval=""""cde@tinyerp.com"""" name="email"/>
|
||||
<field eval=""""cde@mycompany.com"""" name="email"/>
|
||||
<field name="contact_id" ref="res_partner_contact_debois0"/>
|
||||
</record>
|
||||
<record id="res_partner_job_23" model="res.partner.job">
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
<field name="first_name"/>
|
||||
<field name="mobile"/>
|
||||
<field name="lang_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="function_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -34,6 +36,8 @@
|
||||
<field name="website"/>
|
||||
<field name="lang_id"/>
|
||||
<field name="active"/>
|
||||
<field name="partner_id" invisible="1" select="2"/>
|
||||
<field name="function_id" invisible="1" select="2"/>
|
||||
<field name="job_ids" colspan="4" nolabel="1" mode="tree,form">
|
||||
<form string="Functions and Addresses">
|
||||
<field name="function_id"/>
|
||||
@@ -248,10 +252,10 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Contact Functions">
|
||||
<field name="name"/>
|
||||
<field name="address_id"/>
|
||||
<field name="contact_id"/>
|
||||
<field name="function_id"/>
|
||||
<field name="name"/>
|
||||
<field name="address_id"/>
|
||||
<field name="email"/>
|
||||
<field name="phone"/>
|
||||
<field name="state" />
|
||||
@@ -273,10 +277,10 @@
|
||||
<field name="function_id" select="1"/>
|
||||
<field name="email" select="2"/>
|
||||
<field name="phone" select="2"/>
|
||||
<field name="sequence_contact" select="2"/>
|
||||
<field name="sequence_partner" select="2"/>
|
||||
<field name="date_start" />
|
||||
<field name="date_stop" />
|
||||
<field name="sequence_contact" select="2" groups="base.group_user"/>
|
||||
<field name="sequence_partner" select="2" groups="base.group_user"/>
|
||||
<field name="date_start" groups="base.group_user"/>
|
||||
<field name="date_stop" groups="base.group_user"/>
|
||||
<field name="state" select="2" />
|
||||
</page>
|
||||
</notebook>
|
||||
@@ -286,14 +290,19 @@
|
||||
|
||||
<!-- Menuitem for res.partner.job -->
|
||||
<record model="ir.actions.act_window" id="action_res_partner_job">
|
||||
<field name="name">Functions</field>
|
||||
<field name="name">Contact's Jobs</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">res.partner.job</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
<menuitem name="Partners/Functions" action="action_res_partner_job" id="menu_action_res_partner_job"/>
|
||||
<menuitem
|
||||
name="Partners/Contact's Jobs"
|
||||
action="action_res_partner_job"
|
||||
id="menu_action_res_partner_job"
|
||||
groups="base.group_extended"/>
|
||||
|
||||
<!-- Act window defining a shorcut on partners to open all his contacts -->
|
||||
<act_window name="Open all Partner's Function"
|
||||
<act_window name="Partner Contacts"
|
||||
domain="[('name', '=', active_id)]"
|
||||
res_model="res.partner.job"
|
||||
src_model="res.partner"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"version":"1.0",
|
||||
"author":"Tiny",
|
||||
"category":"Board/Associations",
|
||||
"depends":["event","membership","board"],
|
||||
"depends":["event","membership","board","project"],
|
||||
"demo_xml":["board_association_demo.xml"],
|
||||
"update_xml":["board_association_view.xml"],
|
||||
"description": """
|
||||
|
||||
@@ -1,63 +1,63 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record model="board.note.type" id="note_association_type">
|
||||
<field name="name">associations</field>
|
||||
</record>
|
||||
<data>
|
||||
<record model="board.note.type" id="note_association_type">
|
||||
<field name="name">associations</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="board_associations_manager_form">
|
||||
<field name="name">board.associations.manager.form</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Association Dashboard">
|
||||
<hpaned position="100">
|
||||
<child1>
|
||||
<action string="Next Events"
|
||||
name="%(event.action_event_registration)d"
|
||||
colspan="4"/>
|
||||
<action
|
||||
string="My tasks"
|
||||
name="%(project.action_view_task5)d"
|
||||
colspan="4"
|
||||
height="200"
|
||||
width="510"/>
|
||||
<action
|
||||
string="Unpaid Invoices"
|
||||
name="%(account.action_invoice_tree7)d"
|
||||
colspan="4"/>
|
||||
</child1>
|
||||
<record model="ir.ui.view" id="board_associations_manager_form">
|
||||
<field name="name">board.associations.manager.form</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Association Dashboard">
|
||||
<hpaned position="100">
|
||||
<child1>
|
||||
<action string="Next Events"
|
||||
name="%(event.action_event_registration)d"
|
||||
colspan="4"/>
|
||||
<action
|
||||
string="My tasks"
|
||||
name="%(project.action_view_task5_prog)d"
|
||||
colspan="4"
|
||||
height="200"
|
||||
width="510"/>
|
||||
<action
|
||||
string="Unpaid Invoices"
|
||||
name="%(account.action_invoice_tree7)d"
|
||||
colspan="4"/>
|
||||
</child1>
|
||||
|
||||
<child2>
|
||||
<action
|
||||
string="New members"
|
||||
name="%(membership.action_report_partner_member_year_tree)d"
|
||||
view_mode="graph,tree" colspan="4"/>
|
||||
<action
|
||||
string="Registrations by Events"
|
||||
name="%(event.action_event_type_registration)d"
|
||||
view_mode="graph,tree"
|
||||
colspan="4"/>
|
||||
</child2>
|
||||
</hpaned>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<child2>
|
||||
<action
|
||||
string="New members"
|
||||
name="%(membership.action_report_partner_member_year_tree)d"
|
||||
view_mode="graph,tree" colspan="4"/>
|
||||
<action
|
||||
string="Registrations by Events"
|
||||
name="%(event.action_event_type_registration)d"
|
||||
view_mode="graph,tree"
|
||||
colspan="4"/>
|
||||
</child2>
|
||||
</hpaned>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="open_board_associations_manager">
|
||||
<field name="name">Association Dashboard</field>
|
||||
<field name="res_model">board.board</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="board_associations_manager_form"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="open_board_associations_manager">
|
||||
<field name="name">Association Dashboard</field>
|
||||
<field name="res_model">board.board</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="board_associations_manager_form"/>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Associations" parent="board.dashboard_menu"
|
||||
action="open_board_associations_manager"
|
||||
sequence="1"
|
||||
id="menu_board_associations_manager"
|
||||
icon="terp-graph"/>
|
||||
<menuitem
|
||||
name="Associations" parent="board.dashboard_menu"
|
||||
action="open_board_associations_manager"
|
||||
sequence="1"
|
||||
id="menu_board_associations_manager"
|
||||
icon="terp-graph"/>
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
+8
-8
@@ -223,8 +223,8 @@ class crm_case_rule(osv.osv):
|
||||
'active': fields.boolean('Active'),
|
||||
'sequence': fields.integer('Sequence'),
|
||||
|
||||
'trg_state_from': fields.selection([('',''),('escalate','Escalate')]+AVAILABLE_STATES, 'Case state from', size=16),
|
||||
'trg_state_to': fields.selection([('',''),('escalate','Escalate')]+AVAILABLE_STATES, 'Case state to', size=16),
|
||||
'trg_state_from': fields.selection([('',''),('escalate','Escalate')]+AVAILABLE_STATES, 'Case State', size=16),
|
||||
'trg_state_to': fields.selection([('',''),('escalate','Escalate')]+AVAILABLE_STATES, 'Button Pressed', size=16),
|
||||
|
||||
'trg_date_type': fields.selection([
|
||||
('none','None'),
|
||||
@@ -242,19 +242,19 @@ class crm_case_rule(osv.osv):
|
||||
'trg_partner_id': fields.many2one('res.partner', 'Partner'),
|
||||
'trg_partner_categ_id': fields.many2one('res.partner.category', 'Partner Category'),
|
||||
|
||||
'trg_priority_from': fields.selection([('','')] + AVAILABLE_PRIORITIES, 'Priority min'),
|
||||
'trg_priority_to': fields.selection([('','')] + AVAILABLE_PRIORITIES, 'Priority max'),
|
||||
'trg_priority_from': fields.selection([('','')] + AVAILABLE_PRIORITIES, 'Minimum Priority'),
|
||||
'trg_priority_to': fields.selection([('','')] + AVAILABLE_PRIORITIES, 'Maximim Priority'),
|
||||
|
||||
'act_method': fields.char('Call Object Method', size=64),
|
||||
'act_state': fields.selection([('','')]+AVAILABLE_STATES, 'Set state to', size=16),
|
||||
'act_section_id': fields.many2one('crm.case.section', 'Set section to'),
|
||||
'act_user_id': fields.many2one('res.users', 'Set responsible to'),
|
||||
'act_priority': fields.selection([('','')] + AVAILABLE_PRIORITIES, 'Set priority to'),
|
||||
'act_email_cc': fields.char('Add watchers (Cc)', size=250),
|
||||
'act_email_cc': fields.char('Add watchers (Cc)', size=250, help="These people will receive a copy of the futur communication between partner and users by email"),
|
||||
|
||||
'act_remind_partner': fields.boolean('Remind partner'),
|
||||
'act_remind_user': fields.boolean('Remind responsible'),
|
||||
'act_remind_attach': fields.boolean('Remind with attachment'),
|
||||
'act_remind_partner': fields.boolean('Remind Partner', help="Check this if you want the rule to send a reminder by email to the partner."),
|
||||
'act_remind_user': fields.boolean('Remind responsible', help="Check this if you want the rule to send a reminder by email to the user."),
|
||||
'act_remind_attach': fields.boolean('Remind with attachment', help="Check this if you want that all documents attached to the case be attached to the reminder email sent."),
|
||||
|
||||
'act_mail_to_user': fields.boolean('Mail to responsible'),
|
||||
'act_mail_to_partner': fields.boolean('Mail to partner'),
|
||||
|
||||
+35
-34
@@ -55,7 +55,6 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_section_act" model="ir.actions.act_window">
|
||||
<field name="name">Sections</field>
|
||||
<field name="res_model">crm.case.section</field>
|
||||
@@ -63,7 +62,7 @@
|
||||
<field name="view_id" ref="crm_case_section_view_tree"/>
|
||||
</record>
|
||||
<menuitem id="next_id_51" name="Cases" parent="crm.menu_crm_configuration"/><menuitem action="crm_case_section_act" id="menu_crm_case_section_act" parent="next_id_51"/>
|
||||
|
||||
|
||||
<record id="crm_case_section_act_tree" model="ir.actions.act_window">
|
||||
<field name="name">Cases by section</field>
|
||||
<field name="res_model">crm.case.section</field>
|
||||
@@ -71,8 +70,9 @@
|
||||
<field name="view_type">tree</field>
|
||||
<field name="view_id" ref="crm_case_section_view_tree"/>
|
||||
</record>
|
||||
<menuitem id="next_id_52" name="Cases" parent="crm.menu_crm"/><menuitem action="crm_case_section_act_tree" id="menu_crm_case_section_act_tree" parent="next_id_52"/>
|
||||
|
||||
<menuitem id="next_id_52" name="Cases" parent="crm.menu_crm" groups="base.group_extended"/>
|
||||
<menuitem action="crm_case_section_act_tree" id="menu_crm_case_section_act_tree" parent="next_id_52"/>
|
||||
|
||||
<!-- Case Categories -->
|
||||
<record id="crm_case_categ-view" model="ir.ui.view">
|
||||
<field name="name">crm.case.categ.form</field>
|
||||
@@ -114,39 +114,41 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Case Rule">
|
||||
<notebook>
|
||||
<page string="Rule Information">
|
||||
<separator colspan="4" string="General Information"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="active" select="2"/>
|
||||
|
||||
<separator colspan="4" string="Criterions to be checked"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="active" select="2"/>
|
||||
<notebook colspan="4">
|
||||
<page string="Conditions">
|
||||
<separator colspan="4" string="Conditions on States"/>
|
||||
<field name="trg_state_from" select="2"/>
|
||||
<field name="trg_state_to" select="2"/>
|
||||
|
||||
<separator colspan="4" string="Conditions on Case Fields"/>
|
||||
<field name="trg_section_id" select="1"/>
|
||||
<field name="trg_categ_id"/>
|
||||
<field name="trg_user_id" select="2"/>
|
||||
|
||||
<newline/>
|
||||
<field name="trg_priority_from"/>
|
||||
<field name="trg_priority_to"/>
|
||||
|
||||
<separator colspan="4" string="Conditions on Case Partner"/>
|
||||
<field name="trg_partner_id"/>
|
||||
<field name="trg_partner_categ_id"/>
|
||||
|
||||
<separator colspan="4" string="Conditions on Priority Range"/>
|
||||
<field name="trg_priority_from"/>
|
||||
<field name="trg_priority_to"/>
|
||||
<separator colspan="4" string="Conditions on Timing"/>
|
||||
<field name="trg_date_type"/>
|
||||
<label align="1.0" string="Delay after trigger date:"/>
|
||||
<label align="1.0" string="Delay After Trigger Date:"/>
|
||||
<group col="2" colspan="1">
|
||||
<field name="trg_date_range" nolabel="1"/>
|
||||
<field name="trg_date_range_type" nolabel="1"/>
|
||||
</group>
|
||||
|
||||
<separator colspan="4" string="Actions to execute"/>
|
||||
<separator colspan="4" string="Note"/>
|
||||
<label align="0.0" string="The rule use a AND operator. The case must match all non empty fields so that the rule execute the action described in the 'Actions' tab." colspan="4"/>
|
||||
</page>
|
||||
<page string="Actions">
|
||||
<separator colspan="4" string="Fields to Change"/>
|
||||
<field name="act_state"/>
|
||||
<field name="act_section_id"/>
|
||||
<field name="act_user_id"/>
|
||||
<field name="act_priority"/>
|
||||
<separator colspan="4" string="E-Mail Reminders (includes the content of the case)"/>
|
||||
<field name="act_remind_user"/>
|
||||
<field name="act_remind_partner"/>
|
||||
<field name="act_remind_attach"/>
|
||||
@@ -154,26 +156,25 @@
|
||||
<!--
|
||||
<field name="act_method" colspan="4" readonly="1"/>
|
||||
-->
|
||||
|
||||
</page>
|
||||
<page string="E-Mail Information">
|
||||
<separator colspan="4" string="Email to send"/>
|
||||
<page string="E-Mail Actions">
|
||||
<separator colspan="4" string="Template of Email to Send"/>
|
||||
<field name="act_mail_to_user"/>
|
||||
<field name="act_mail_to_partner"/>
|
||||
<field name="act_mail_to_watchers"/>
|
||||
<field colspan="4" name="act_mail_to_email"/>
|
||||
<field colspan="4" name="act_mail_body"/>
|
||||
<group col="2" colspan="4" string="Special Keywords">
|
||||
<label align="0.0" string="%%(case_id)s = Case ID"/>
|
||||
<label align="0.0" string="%%(case_subject)s = Case subject"/>
|
||||
<label align="0.0" string="%%(case_date)s = Creation date"/>
|
||||
<label align="0.0" string="%%(email_from)s = Partner email"/>
|
||||
<label align="0.0" string="%%(partner)s = Partner name"/>
|
||||
<label align="0.0" string="%%(partner_email)s = Partner email"/>
|
||||
<label align="0.0" string="%%(case_user)s = Responsible name"/>
|
||||
<label align="0.0" string="%%(case_user_email)s = Responsible email"/>
|
||||
<label align="0.0" string="%%(case_user_phone)s = Responsible phone"/>
|
||||
</group>
|
||||
|
||||
<separator colspan="4" string="Special Keywords to Be Used in The Body"/>
|
||||
<label align="0.0" string="%%(case_id)s = Case ID" colspan="2"/>
|
||||
<label align="0.0" string="%%(case_subject)s = Case subject" colspan="2"/>
|
||||
<label align="0.0" string="%%(case_date)s = Creation date" colspan="2"/>
|
||||
<label align="0.0" string="%%(email_from)s = Partner email" colspan="2"/>
|
||||
<label align="0.0" string="%%(partner)s = Partner name" colspan="2"/>
|
||||
<label align="0.0" string="%%(partner_email)s = Partner email" colspan="2"/>
|
||||
<label align="0.0" string="%%(case_user)s = Responsible name" colspan="2"/>
|
||||
<label align="0.0" string="%%(case_user_email)s = Responsible email" colspan="2"/>
|
||||
<label align="0.0" string="%%(case_user_phone)s = Responsible phone" colspan="2"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
|
||||
@@ -5,11 +5,17 @@
|
||||
"author" : "Tiny",
|
||||
"website" : "http://tinyerp.com/module_crm.html",
|
||||
"category" : "Generic Modules/CRM & SRM",
|
||||
"description": """ The Tiny ERP case and request tracker enables a group of
|
||||
people to intelligently and efficiently manage tasks, issues,
|
||||
and requests. It manages key tasks such as communication,
|
||||
identification, prioritization, assignment, resolution and notification.""",
|
||||
"depends" : ["crm","report_crm", "process", "account"],
|
||||
"description": """
|
||||
The Tiny ERP case and request tracker enables a group of
|
||||
people to intelligently and efficiently manage tasks, issues,
|
||||
and requests. It manages key tasks such as communication,
|
||||
identification, prioritization, assignment, resolution and notification.
|
||||
|
||||
This module provide screens like: jobs hiring process, leads, business
|
||||
opportunities, fund raising trackings, support & helpdesk, calendar of
|
||||
meetings, eso.
|
||||
""",
|
||||
"depends" : ["crm","report_crm", "process"],
|
||||
"init_xml" : [
|
||||
"crm_config_view.xml",
|
||||
"crm_bugs_view.xml",
|
||||
@@ -21,24 +27,24 @@
|
||||
"crm_report_view.xml"
|
||||
],
|
||||
"demo_xml" : [
|
||||
"crm_bugs_demo.xml",
|
||||
"crm_fund_demo.xml",
|
||||
"crm_jobs_demo.xml",
|
||||
"crm_meeting_demo.xml",
|
||||
"crm_lead_demo.xml",
|
||||
"crm_opportunity_demo.xml",
|
||||
],
|
||||
# "crm_bugs_demo.xml",
|
||||
# "crm_fund_demo.xml",
|
||||
# "crm_jobs_demo.xml",
|
||||
# "crm_meeting_demo.xml",
|
||||
# "crm_lead_demo.xml",
|
||||
# "crm_opportunity_demo.xml",
|
||||
],
|
||||
"update_xml" : [
|
||||
"crm_bugs_data.xml",
|
||||
"crm_fund_data.xml",
|
||||
"crm_jobs_data.xml",
|
||||
"crm_meeting_data.xml",
|
||||
"crm_lead_data.xml",
|
||||
"crm_opportunity_data.xml",
|
||||
"crm_bugs_menu.xml", "crm_fund_menu.xml",
|
||||
"crm_jobs_menu.xml", "crm_opportunity_menu.xml",
|
||||
"crm_helpdesk_menu.xml", "crm_lead_menu.xml",
|
||||
"crm_meeting_menu.xml",
|
||||
# "crm_bugs_data.xml",
|
||||
# "crm_fund_data.xml",
|
||||
# "crm_jobs_data.xml",
|
||||
# "crm_meeting_data.xml",
|
||||
# "crm_lead_data.xml",
|
||||
# "crm_opportunity_data.xml",
|
||||
# "crm_bugs_menu.xml", "crm_fund_menu.xml",
|
||||
# "crm_jobs_menu.xml", "crm_opportunity_menu.xml",
|
||||
# "crm_helpdesk_menu.xml", "crm_lead_menu.xml",
|
||||
# "crm_meeting_menu.xml",
|
||||
"security/ir.model.access.csv",
|
||||
"process/crm_configuration_process.xml",
|
||||
],
|
||||
|
||||
@@ -1,78 +1,78 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<!--
|
||||
Case Sections
|
||||
-->
|
||||
<record model="crm.case.section" id="section_support">
|
||||
<field name="name">Bug Tracking</field>
|
||||
<field name="code">BugSup</field>
|
||||
</record>
|
||||
<!--
|
||||
Case Sections
|
||||
-->
|
||||
<record model="crm.case.section" id="section_support">
|
||||
<field name="name">Bug Tracking</field>
|
||||
<field name="code">BugSup</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Case Categories
|
||||
-->
|
||||
<!-- For Bugs -->
|
||||
<!--
|
||||
Case Categories
|
||||
-->
|
||||
<!-- For Bugs -->
|
||||
|
||||
<record model="crm.case.categ" id="categ1">
|
||||
<field name="name">Bugs</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ2">
|
||||
<field name="name">Patches</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ3">
|
||||
<field name="name">Feature Requests</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ1">
|
||||
<field name="name">Bugs</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ2">
|
||||
<field name="name">Patches</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ3">
|
||||
<field name="name">Feature Requests</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Case Category2
|
||||
-->
|
||||
<!-- For Bugs -->
|
||||
<record model="crm.case.category2" id="category1">
|
||||
<field name="name">Version 4.2</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.category2" id="category2">
|
||||
<field name="name">Version 4.4</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<!--
|
||||
Case Category2
|
||||
-->
|
||||
<!-- For Bugs -->
|
||||
<record model="crm.case.category2" id="category1">
|
||||
<field name="name">Version 4.2</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.category2" id="category2">
|
||||
<field name="name">Version 4.4</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Case Stage
|
||||
-->
|
||||
<!-- For Bugs -->
|
||||
<!--
|
||||
Case Stage
|
||||
-->
|
||||
<!-- For Bugs -->
|
||||
|
||||
<record model="crm.case.stage" id="stage1">
|
||||
<field name="name">Accepted as Bug</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage2">
|
||||
<field name="name">Fixed</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage3">
|
||||
<field name="name">Won't fix</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage4">
|
||||
<field name="name">Invalid</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage5">
|
||||
<field name="name">Awaiting Response</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage6">
|
||||
<field name="name">Works For Me</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage7">
|
||||
<field name="name">Future</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage1">
|
||||
<field name="name">Accepted as Bug</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage2">
|
||||
<field name="name">Fixed</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage3">
|
||||
<field name="name">Won't fix</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage4">
|
||||
<field name="name">Invalid</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage5">
|
||||
<field name="name">Awaiting Response</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage6">
|
||||
<field name="name">Works For Me</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage7">
|
||||
<field name="name">Future</field>
|
||||
<field name="section_id" ref="section_support"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -97,19 +97,23 @@ class crm_menu_config_wizard(osv.osv_memory):
|
||||
'opportunity': lambda *args: True,
|
||||
}
|
||||
def action_create(self, cr, uid, ids, *args):
|
||||
for res in self.read(cr,uid,ids):
|
||||
res.__delitem__('id')
|
||||
# 'update'
|
||||
for section in res :
|
||||
if res[section]:
|
||||
file_name = 'crm_'+section+'_menu.xml'
|
||||
if section=='document_ics':
|
||||
continue
|
||||
try:
|
||||
tools.convert_xml_import(cr, 'crm_configuration', tools.file_open(os.path.join('crm_configuration',file_name )), {}, 'init', *args)
|
||||
except Exception, e:
|
||||
raise osv.except_osv('Error !', e)
|
||||
|
||||
modid = self.pool.get('ir.module.module').search(cr, uid, [('name','=','crm_configuration')])
|
||||
moddemo = self.pool.get('ir.module.module').browse(cr, uid, modid[0]).demo
|
||||
lst= ('data','menu')
|
||||
if moddemo:
|
||||
lst = ('data','menu','demo')
|
||||
res = self.read(cr,uid,ids)[0]
|
||||
for section in ['meeting','lead','opportunity','jobs','bugs','fund','helpdesk'] :
|
||||
if (not res[section]):
|
||||
continue
|
||||
for fname in lst:
|
||||
file_name = 'crm_'+section+'_'+fname+'.xml'
|
||||
try:
|
||||
fp = tools.file_open(os.path.join('crm_configuration',file_name ))
|
||||
except IOError, e:
|
||||
fp = None
|
||||
if fp:
|
||||
tools.convert_xml_import(cr, 'crm_configuration', fp, {}, 'init', *args)
|
||||
return {
|
||||
'view_type': 'form',
|
||||
"view_mode": 'form',
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Configure CRM Sections">
|
||||
<separator col="4" colspan="4" string="Install Pre-Configured Features"/>
|
||||
<separator colspan="4" string="Install Pre-Configured Features"/>
|
||||
<label colspan="4" align="0.0" string="The CRM module of OpenERP is able to manage any kind of relationship. But, as to help you to start quickly on the system, we configured a few of them for you."/>
|
||||
<newline/>
|
||||
<field name="meeting"/>
|
||||
@@ -20,7 +20,9 @@
|
||||
<field name="bugs"/>
|
||||
<field name="fund"/>
|
||||
<field name="helpdesk"/>
|
||||
<separator colspan="4" string="Calendar Sharing"/>
|
||||
<field name="document_ics"/>
|
||||
<newline/>
|
||||
<group col="4" colspan="4">
|
||||
<button icon="gtk-cancel" name="action_cancel" type="object" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-go-forward" name="action_create" string="Next" type="object"/>
|
||||
@@ -48,16 +50,16 @@
|
||||
|
||||
<!-- graph view -->
|
||||
<record model="ir.ui.view" id="crm_case_graph_view_stage_cost">
|
||||
<field name="name">CRM -Graph</field>
|
||||
<field name="model">crm.case</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Cases By Stage and Estimates" type="bar" orientation="vertical">
|
||||
<field name="stage_id"/>
|
||||
<field name="planned_cost" operator="+"/>
|
||||
<field name="planned_revenue" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
<field name="name">CRM -Graph</field>
|
||||
<field name="model">crm.case</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Cases By Stage and Estimates" type="bar" orientation="vertical">
|
||||
<field name="stage_id"/>
|
||||
<field name="planned_cost" operator="+"/>
|
||||
<field name="planned_revenue" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -1,113 +1,106 @@
|
||||
<?xml version="1.0" ?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!--
|
||||
Process
|
||||
-->
|
||||
|
||||
<data>
|
||||
|
||||
<!--
|
||||
Process
|
||||
-->
|
||||
|
||||
<record id="process_process_contractworkflow0" model="process.process">
|
||||
<field eval=""""Contracts flow for services companies."""" name="note"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval=""""Contract Workflow"""" name="name"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Process Node
|
||||
-->
|
||||
|
||||
<record id="process_node_leads0" model="process.node">
|
||||
<field name="menu_id" ref="crm_configuration.menu_crm_case_categ0_act_leads_all"/>
|
||||
<field name="model_id" ref="crm.model_crm_case"/>
|
||||
<field eval=""""subflow"""" name="kind"/>
|
||||
<field eval=""""Leads"""" name="name"/>
|
||||
<field eval=""""Premier Contact Leads"""" name="note"/>
|
||||
<field name="process_id" ref="process_process_contractworkflow0"/>
|
||||
<field eval=""""object.state in ('draft', 'open', 'pending', 'done', 'cancel')"""" name="model_states"/>
|
||||
<field eval="1" name="flow_start"/>
|
||||
</record>
|
||||
|
||||
<record id="process_node_opportunities0" model="process.node">
|
||||
<field name="menu_id" ref="crm_configuration.menu_crm_case_categ0_act_oppor11"/>
|
||||
<field name="model_id" ref="crm.model_crm_case"/>
|
||||
<field eval=""""subflow"""" name="kind"/>
|
||||
<field eval=""""Opportunities"""" name="name"/>
|
||||
<field eval=""""Business Opportunities"""" name="note"/>
|
||||
<field name="process_id" ref="process_process_contractworkflow0"/>
|
||||
<field eval=""""object.state in ('draft', 'open', 'pending', 'done', 'cancel')"""" name="model_states"/>
|
||||
<field eval="0" name="flow_start"/>
|
||||
</record>
|
||||
|
||||
<record id="process_node_accord0" model="process.node">
|
||||
<field name="menu_id" ref="crm_configuration.menu_crm_case_categ0_act_leads_all"/>
|
||||
<field name="model_id" ref="crm.model_crm_case"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Accord"""" name="name"/>
|
||||
<field eval=""""Accord Client Contract"""" name="note"/>
|
||||
<field name="process_id" ref="process_process_contractworkflow0"/>
|
||||
<field eval=""""object.state=='done'"""" name="model_states"/>
|
||||
<field eval="0" name="flow_start"/>
|
||||
</record>
|
||||
|
||||
<record id="process_node_contractanalytic0" model="process.node">
|
||||
<field name="menu_id" ref="account.account_analytic_def_account"/>
|
||||
<field name="model_id" ref="account.model_account_analytic_account"/>
|
||||
<field eval=""""subflow"""" name="kind"/>
|
||||
<field eval=""""Contract Analytic"""" name="name"/>
|
||||
<field eval=""""Analytic accounts"""" name="note"/>
|
||||
<field name="process_id" ref="process_process_contractworkflow0"/>
|
||||
<field eval="0" name="flow_start"/>
|
||||
</record>
|
||||
|
||||
<record id="process_node_contractpricelist0" model="process.node">
|
||||
<field name="menu_id" ref="product.menu_product_pricelist_action2"/>
|
||||
<field name="model_id" ref="product.model_product_pricelist"/>
|
||||
<field eval=""""subflow"""" name="kind"/>
|
||||
<field eval=""""Contract Pricelist"""" name="name"/>
|
||||
<field eval=""""Contract Volume (pricelist)"""" name="note"/>
|
||||
<field name="process_id" ref="process_process_contractworkflow0"/>
|
||||
<field eval="0" name="flow_start"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Process Transition
|
||||
-->
|
||||
|
||||
<record id="process_transition_leadopportunity0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="role_ids"/>
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Lead Opportunity"""" name="name"/>
|
||||
<field eval=""""Creating business opportunities from leads"""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_opportunities0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_leads0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_opportunitiesaccord0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="role_ids"/>
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Opportunities Accord"""" name="name"/>
|
||||
<field eval=""""When leads are confirmed"""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_accord0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_opportunities0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_accordanalytic0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="role_ids"/>
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Accord Analytic"""" name="name"/>
|
||||
<field eval=""""Goes into the Analytic"""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_contractanalytic0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_accord0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_accordpricelist0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="role_ids"/>
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Accord Pricelist"""" name="name"/>
|
||||
<field eval=""""Goes into the Pricelist"""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_contractpricelist0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_accord0"/>
|
||||
</record>
|
||||
<field eval=""""Contracts flow for services companies."""" name="note"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval=""""Contract Workflow"""" name="name"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Process Node
|
||||
-->
|
||||
|
||||
<record id="process_node_leads0" model="process.node">
|
||||
<field name="model_id" ref="crm.model_crm_case"/>
|
||||
<field eval=""""subflow"""" name="kind"/>
|
||||
<field eval=""""Leads"""" name="name"/>
|
||||
<field eval=""""Premier Contact Leads"""" name="note"/>
|
||||
<field name="process_id" ref="process_process_contractworkflow0"/>
|
||||
<field eval=""""object.state in ('draft', 'open', 'pending', 'done', 'cancel')"""" name="model_states"/>
|
||||
<field eval="1" name="flow_start"/>
|
||||
</record>
|
||||
|
||||
<record id="process_node_opportunities0" model="process.node">
|
||||
<field name="model_id" ref="crm.model_crm_case"/>
|
||||
<field eval=""""subflow"""" name="kind"/>
|
||||
<field eval=""""Opportunities"""" name="name"/>
|
||||
<field eval=""""Business Opportunities"""" name="note"/>
|
||||
<field name="process_id" ref="process_process_contractworkflow0"/>
|
||||
<field eval=""""object.state in ('draft', 'open', 'pending', 'done', 'cancel')"""" name="model_states"/>
|
||||
<field eval="0" name="flow_start"/>
|
||||
</record>
|
||||
|
||||
<record id="process_node_accord0" model="process.node">
|
||||
<field name="model_id" ref="crm.model_crm_case"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Accord"""" name="name"/>
|
||||
<field eval=""""Accord Client Contract"""" name="note"/>
|
||||
<field name="process_id" ref="process_process_contractworkflow0"/>
|
||||
<field eval=""""object.state=='done'"""" name="model_states"/>
|
||||
<field eval="0" name="flow_start"/>
|
||||
</record>
|
||||
|
||||
<record id="process_node_contractanalytic0" model="process.node">
|
||||
<field eval=""""subflow"""" name="kind"/>
|
||||
<field eval=""""Contract Analytic"""" name="name"/>
|
||||
<field eval=""""Analytic Accounts"""" name="note"/>
|
||||
<field name="process_id" ref="process_process_contractworkflow0"/>
|
||||
<field eval="0" name="flow_start"/>
|
||||
</record>
|
||||
|
||||
<record id="process_node_contractpricelist0" model="process.node">
|
||||
<field eval=""""subflow"""" name="kind"/>
|
||||
<field eval=""""Contract Pricelist"""" name="name"/>
|
||||
<field eval=""""Contract Volume (pricelist)"""" name="note"/>
|
||||
<field name="process_id" ref="process_process_contractworkflow0"/>
|
||||
<field eval="0" name="flow_start"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Process Transition
|
||||
-->
|
||||
|
||||
<record id="process_transition_leadopportunity0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="role_ids"/>
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Lead Opportunity"""" name="name"/>
|
||||
<field eval=""""Creating business opportunities from leads"""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_opportunities0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_leads0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_opportunitiesaccord0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="role_ids"/>
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Opportunities Accord"""" name="name"/>
|
||||
<field eval=""""When leads are confirmed"""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_accord0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_opportunities0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_accordanalytic0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="role_ids"/>
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Accord Analytic"""" name="name"/>
|
||||
<field eval=""""Goes into the Analytic"""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_contractanalytic0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_accord0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_accordpricelist0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="role_ids"/>
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Accord Pricelist"""" name="name"/>
|
||||
<field eval=""""Goes into the Pricelist"""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_contractpricelist0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_accord0"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -12,15 +12,18 @@
|
||||
* User Authentification
|
||||
* Document Indexation
|
||||
""",
|
||||
"depends" : ["base"],
|
||||
"init_xml" : ["document_data.xml"],
|
||||
"depends" : ["base","process"],
|
||||
"init_xml" : [
|
||||
"document_data.xml",
|
||||
"document_demo.xml"
|
||||
],
|
||||
"update_xml" : [
|
||||
"document_view.xml",
|
||||
"document_data.xml",
|
||||
"security/document_security.xml",
|
||||
"security/ir.model.access.csv",
|
||||
],
|
||||
"demo_xml" : ["document_demo.xml"],
|
||||
"demo_xml" : [],
|
||||
"active": False,
|
||||
"installable": True
|
||||
}
|
||||
|
||||
+58
-60
@@ -229,6 +229,7 @@ class document_directory(osv.osv):
|
||||
'user_id': lambda self,cr,uid,ctx: uid,
|
||||
'domain': lambda self,cr,uid,ctx: '[]',
|
||||
'type': lambda *args: 'directory',
|
||||
'ressource_id': lambda *a: 0
|
||||
}
|
||||
_sql_constraints = [
|
||||
('dirname_uniq', 'unique (name,parent_id,ressource_id,ressource_parent_type_id)', 'The directory name must be unique !')
|
||||
@@ -647,49 +648,69 @@ class document_configuration_wizard(osv.osv_memory):
|
||||
|
||||
def action_config(self, cr, uid, ids, context=None):
|
||||
obj=self.pool.get('document.directory')
|
||||
search_ids=obj.search(cr,uid,[])
|
||||
browse_lst=obj.browse(cr,uid,search_ids)
|
||||
model_obj=self.pool.get('ir.model')
|
||||
objid=self.pool.get('ir.model.data')
|
||||
|
||||
for doc_obj in browse_lst:
|
||||
if doc_obj.name in ('Partner','Contacts','Personnal Folders','Partner Category','Sales Order','All Sales Order','Sales by Salesman','Projects'):
|
||||
res={}
|
||||
id=[]
|
||||
if doc_obj.name=='Partner':
|
||||
id=model_obj.search(cr,uid,[('model','=','res.partner')])
|
||||
if self.pool.get('sale.order'):
|
||||
id = objid._get_id(cr, uid, 'document', 'dir_sale_order_all')
|
||||
id = objid.browse(cr, uid, id, context=context).res_id
|
||||
mid = self.pool.get('ir.model').search(cr, uid, [('model','=','sale.order')])
|
||||
obj.write(cr, uid, [id], {
|
||||
'type':'ressource',
|
||||
'ressource_type_id': mid[0],
|
||||
'domain': '[]',
|
||||
})
|
||||
aid = objid._get_id(cr, uid, 'sale', 'report_sale_order')
|
||||
aid = objid.browse(cr, uid, aid, context=context).res_id
|
||||
|
||||
if doc_obj.name=='Contacts':
|
||||
id=model_obj.search(cr,uid,[('model','=','res.partner.address')])
|
||||
self.pool.get('document.directory.content').create(cr, uid, {
|
||||
'name': "Print Order",
|
||||
'suffix': "_print",
|
||||
'report_id': aid,
|
||||
'extension': '.pdf',
|
||||
'include_name': 1,
|
||||
'directory_id': id,
|
||||
})
|
||||
id = objid._get_id(cr, uid, 'document', 'dir_sale_order_quote')
|
||||
id = objid.browse(cr, uid, id, context=context).res_id
|
||||
obj.write(cr, uid, [id], {
|
||||
'type':'ressource',
|
||||
'ressource_type_id': mid[0],
|
||||
'domain': "[('state','=','draft')]",
|
||||
})
|
||||
|
||||
if doc_obj.name=='Partner Category':
|
||||
id=model_obj.search(cr,uid,[('model','=','res.partner.category')])
|
||||
if self.pool.get('product.product'):
|
||||
id = objid._get_id(cr, uid, 'document', 'dir_product')
|
||||
id = objid.browse(cr, uid, id, context=context).res_id
|
||||
mid = self.pool.get('ir.model').search(cr, uid, [('model','=','product.product')])
|
||||
obj.write(cr, uid, [id], {
|
||||
'type':'ressource',
|
||||
'ressource_type_id': mid[0],
|
||||
})
|
||||
|
||||
if doc_obj.name=='All Sales Order':
|
||||
val={}
|
||||
id=model_obj.search(cr,uid,[('model','=','sale.order')])
|
||||
if id and not len(doc_obj.content_ids):
|
||||
val['name']='Sale Report'
|
||||
val['suffix']='_report'
|
||||
val['report_id']=self.pool.get('ir.actions.report.xml').search(cr,uid,[('report_name','=','sale.order')])[0]
|
||||
val['extension']='.pdf'
|
||||
val['directory_id']=doc_obj.id
|
||||
self.pool.get('document.directory.content').create(cr,uid,val)
|
||||
if self.pool.get('stock.location'):
|
||||
aid = objid._get_id(cr, uid, 'stock', 'report_product_history')
|
||||
aid = objid.browse(cr, uid, aid, context=context).res_id
|
||||
|
||||
if doc_obj.name=='Sales by Salesman':
|
||||
id=model_obj.search(cr,uid,[('model','=','res.users')])
|
||||
self.pool.get('document.directory.content').create(cr, uid, {
|
||||
'name': "Product Stock",
|
||||
'suffix': "_stock_forecast",
|
||||
'report_id': aid,
|
||||
'extension': '.pdf',
|
||||
'include_name': 1,
|
||||
'directory_id': id,
|
||||
})
|
||||
|
||||
if self.pool.get('account.analytic.account'):
|
||||
id = objid._get_id(cr, uid, 'document', 'dir_project')
|
||||
id = objid.browse(cr, uid, id, context=context).res_id
|
||||
mid = self.pool.get('ir.model').search(cr, uid, [('model','=','account.analytic.account')])
|
||||
obj.write(cr, uid, [id], {
|
||||
'type':'ressource',
|
||||
'ressource_type_id': mid[0],
|
||||
'domain': '[]',
|
||||
'ressource_tree': 1
|
||||
})
|
||||
|
||||
if doc_obj.name=='Personnal Folders':
|
||||
id=model_obj.search(cr,uid,[('model','=','res.users')])
|
||||
|
||||
if doc_obj.name=='Projects':
|
||||
id=model_obj.search(cr,uid,[('model','=','account.analytic.account')])
|
||||
res['ressource_tree']=True
|
||||
|
||||
if id:
|
||||
res['ressource_type_id']=id[0]
|
||||
res['type']='ressource'
|
||||
obj.write(cr,uid,doc_obj.id,res)
|
||||
self.create_folder(cr, uid, ids, context=None)
|
||||
return {
|
||||
'view_type': 'form',
|
||||
"view_mode": 'form',
|
||||
@@ -698,27 +719,4 @@ class document_configuration_wizard(osv.osv_memory):
|
||||
'target':'new',
|
||||
}
|
||||
|
||||
def create_folder(self, cr, uid, ids, context=None):
|
||||
doc_obj=self.pool.get('document.directory')
|
||||
model_obj=self.pool.get('ir.model')
|
||||
for name in ('Sales','Quotation','Meetings','Analysis Reports'):
|
||||
res={}
|
||||
if name=='Sales':
|
||||
child_model=model_obj.search(cr,uid,[('model','=','sale.order')])
|
||||
link_model=model_obj.search(cr,uid,[('model','=','res.users')])
|
||||
if child_model:
|
||||
res['type']='ressource'
|
||||
res['ressource_type_id']=child_model[0]
|
||||
res['ressource_parent_type_id']=link_model[0]
|
||||
res['domain']="[('user_id','=',active_id)]"
|
||||
else:
|
||||
link_model=model_obj.search(cr,uid,[('model','=','account.analytic.account')])
|
||||
if link_model:
|
||||
res['ressource_parent_type_id']=link_model[0]
|
||||
res['ressource_id']=0
|
||||
if res:
|
||||
res['name']=name
|
||||
doc_obj.create(cr,uid,res)
|
||||
return True
|
||||
|
||||
document_configuration_wizard()
|
||||
|
||||
@@ -2,92 +2,71 @@
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record model="document.directory" id="dir_root">
|
||||
<field name="name">Main Repository</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
|
||||
<record model="document.directory" id="dir_root">
|
||||
<field name="name">Documents</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
</record>
|
||||
|
||||
</record>
|
||||
<record model="document.directory" id="dir_my_folder">
|
||||
<field name="name">My Folder</field>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_my_folder">
|
||||
<field name="name">My Folder</field>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
|
||||
</record>
|
||||
<record model="document.directory" id="dir_partner_category">
|
||||
<field name="name">Partners by Category</field>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
<field name="type">ressource</field>
|
||||
<field name="ressource_tree">1</field>
|
||||
<field name="ressource_type_id" search="[('model','=','res.partner.category')]" />
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_partner_category">
|
||||
<field name="name">Partner Category</field>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
<field name="type">ressource</field>
|
||||
<field name="ressource_tree">1</field>
|
||||
<field name="ressource_type_id" search="[('model','=','res.partner.category')]" />
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
|
||||
</record>
|
||||
<record model="document.directory" id="dir_partner">
|
||||
<field name="name">Partners</field>
|
||||
<field name="type">ressource</field>
|
||||
<field name="domain">[('category_id','in',[active_id])]</field>
|
||||
<field name="ressource_type_id" search="[('model','=','res.partner')]" />
|
||||
<field name="ressource_parent_type_id" search="[('model','=','res.partner.category')]" />
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_personnal_folder">
|
||||
<field name="name">Personnal Folders</field>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
<field name="type">ressource</field>
|
||||
<field name="ressource_type_id" ref="base.model_res_users" />
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_product">
|
||||
<field name="name">Products</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_partner">
|
||||
<field name="name">Partner</field>
|
||||
<field name="type">ressource</field>
|
||||
<field name="domain">[('category_id','in',[active_id])]</field>
|
||||
<field name="ressource_type_id" search="[('model','=','res.partner')]" />
|
||||
<field name="ressource_parent_type_id" search="[('model','=','res.partner.category')]" />
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
|
||||
</record>
|
||||
<record model="document.directory" id="dir_sale_order">
|
||||
<field name="name">Sales Order</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_partner_contacts">
|
||||
<field name="name">Contacts</field>
|
||||
<field name="type">ressource</field>
|
||||
<field name="domain">[('partner_id','=',active_id)]</field>
|
||||
<field name="ressource_type_id" search="[('model','=','res.partner.address')]" />
|
||||
<field name="ressource_parent_type_id" search="[('model','=','res.partner')]" />
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
|
||||
</record>
|
||||
<record model="document.directory" id="dir_sale_order_all">
|
||||
<field name="name">All Sales Order</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_sale_order"/>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_my_partner">
|
||||
<field name="name">My Folder</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="ressource_parent_type_id" search="[('model','=','res.partner')]" />
|
||||
|
||||
</record>
|
||||
<record model="document.directory" id="dir_sale_order_quote">
|
||||
<field name="name">Quotations</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_sale_order"/>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_personnal_folder">
|
||||
<field name="name">Personnal Folders</field>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_sale_order">
|
||||
<field name="name">Sales Order</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_sale_order_all">
|
||||
<field name="name">All Sales Order</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_sale_order"/>
|
||||
|
||||
</record>
|
||||
<record model="document.directory" id="dir_sale_order_salesman">
|
||||
<field name="name">Sales by Salesman</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_sale_order"/>
|
||||
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_project">
|
||||
<field name="name">Projects</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
|
||||
</record>
|
||||
<record model="document.directory" id="dir_project">
|
||||
<field name="name">Projects</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<openerp>
|
||||
<data>
|
||||
<menuitem name="Document Management" icon="terp-stock" id="menu_document"/>
|
||||
<menuitem name="Configuration" id="menu_document_configuration" parent="menu_document"/>
|
||||
|
||||
<record model="ir.ui.view" id="view_document_directory_form">
|
||||
<field name="name">document.directory</field>
|
||||
@@ -68,26 +69,37 @@
|
||||
<field name="res_model">document.directory</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem name="Configuration" id="menu_document_configuration" parent="menu_document"/>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Directories"
|
||||
action="action_document_directory_form"
|
||||
id="menu_document_directories"
|
||||
parent="menu_document_configuration"/>
|
||||
id="menu_document_directories"
|
||||
parent="menu_document_configuration"/>
|
||||
|
||||
|
||||
<record model="ir.actions.act_window" id="action_document_directory_tree">
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="name">Directorie's Structure</field>
|
||||
<field name="res_model">document.directory</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="domain">[('ressource_parent_type_id','=',False),('parent_id','=',False)]</field>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Directorie's Structure"
|
||||
action="action_document_directory_tree"
|
||||
id="menu_document_directories_tree"
|
||||
parent="menu_document"/>
|
||||
id="menu_document_directories_tree"
|
||||
parent="menu_document_configuration"/>
|
||||
|
||||
<record model="ir.actions.url" id="action_document_browse">
|
||||
<field name="name">Browse Files</field>
|
||||
<field name="url">ftp://localhost:8021/</field>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Browse Files Using FTP"
|
||||
action="action_document_browse"
|
||||
id="menu_document_browse"
|
||||
type="url"
|
||||
icon="STOCK_EXECUTE"
|
||||
parent="menu_document"/>
|
||||
|
||||
<record model="ir.ui.view" id="view_document_file_form">
|
||||
<field name="name">ir.attachment</field>
|
||||
@@ -147,8 +159,8 @@
|
||||
<menuitem
|
||||
name="Search a File"
|
||||
action="action_document_file_form"
|
||||
id="menu_document_files"
|
||||
parent="menu_document"/>
|
||||
id="menu_document_files"
|
||||
parent="menu_document"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_document_file_directory_form">
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
@@ -204,33 +216,20 @@
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_auto_config_form" model="ir.ui.view">
|
||||
<record id="view_auto_config_form" model="ir.ui.view">
|
||||
<field name="name">Auto Configure Directory</field>
|
||||
<field name="model">document.configuration.wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Auto Configure">
|
||||
<separator string="Connect to Document Management System." colspan="4"/>
|
||||
<label align="0.0" string="You can use ftp://admin:admin@localhost:8021 " colspan="4"/>
|
||||
<separator string="Configure Ressources Directory :" colspan="4"/>
|
||||
<newline/>
|
||||
<label string="'All Sales Order' -> sale.order" align="0.0" colspan="4"/>
|
||||
<label string="'Sales by Salesman' -> res.users" align="0.0" colspan="4"/>
|
||||
<label string="'Personnal Folders' -> res.users" align="0.0" colspan="4"/>
|
||||
<label string="'Projects' -> account.analytic.account with ressource tree" align="0.0" colspan="4"/>
|
||||
<separator string="New Directories." colspan="4"/>
|
||||
<label string="'Sales' -> sale.order which is link directory of 'res.users' model" align="0.0" colspan="4"/>
|
||||
<label align="0.0" string="'Quotation','Meetings','Analysis Reports' -> static directories which are link directories of 'account.analytic.account' model" colspan="4"/>
|
||||
<newline/>
|
||||
<newline/>
|
||||
<separator string="" colspan="4"/>
|
||||
<label string="" colspan="2"/>
|
||||
<separator string="Document Management System." colspan="4"/>
|
||||
<label string="This wizard will automatically configure the document management system according to modules installed on your system." align="0.0" colspan="4"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<label string="" colspan="2"/>
|
||||
<group col="4" colspan="2">
|
||||
<button special="cancel" string="Cancel" name="action_cancel" type="object" icon='gtk-cancel'/>
|
||||
<button name="action_config" string="Configure" icon='gtk-ok' type="object"/>
|
||||
</group>
|
||||
<newline/>
|
||||
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -244,10 +243,9 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.todo"
|
||||
id="config_auto_directory">
|
||||
<record model="ir.actions.todo" id="config_auto_directory">
|
||||
<field name="name">Auto Configure Directory</field>
|
||||
<field name="note">This wizard will be configure directory for ressource model.</field>
|
||||
<field name="note">This wizard will be configure directory for ressource model.</field>
|
||||
<field name="action_id" ref="action_config_auto_directory"/>
|
||||
<field name="state">open</field>
|
||||
</record>
|
||||
|
||||
@@ -327,7 +327,7 @@ class abstracted_fs:
|
||||
cr = db.cursor()
|
||||
uid = security.login(dbname, self.username, self.password)
|
||||
if not uid:
|
||||
raise OSError(1, 'Operation not permited.')
|
||||
raise OSError(2, 'Authentification Required.')
|
||||
return cr, uid, pool
|
||||
|
||||
# Ok
|
||||
|
||||
@@ -1,70 +1,71 @@
|
||||
#import pooler
|
||||
|
||||
class authorizer:
|
||||
read_perms = "elr"
|
||||
write_perms = "adfmw"
|
||||
read_perms = "elr"
|
||||
write_perms = "adfmw"
|
||||
|
||||
def __init__(self):
|
||||
self.password = ''
|
||||
def __init__(self):
|
||||
self.password = ''
|
||||
|
||||
def validate_authentication(self, username, password):
|
||||
"""Return True if the supplied username and password match the
|
||||
stored credentials."""
|
||||
self.password = password
|
||||
return True
|
||||
def validate_authentication(self, username, password):
|
||||
"""Return True if the supplied username and password match the
|
||||
stored credentials."""
|
||||
self.password = password
|
||||
return True
|
||||
|
||||
def impersonate_user(self, username, password):
|
||||
"""Impersonate another user (noop).
|
||||
def impersonate_user(self, username, password):
|
||||
"""Impersonate another user (noop).
|
||||
|
||||
It is always called before accessing the filesystem.
|
||||
By default it does nothing. The subclass overriding this
|
||||
method is expected to provide a mechanism to change the
|
||||
current user.
|
||||
"""
|
||||
It is always called before accessing the filesystem.
|
||||
By default it does nothing. The subclass overriding this
|
||||
method is expected to provide a mechanism to change the
|
||||
current user.
|
||||
"""
|
||||
|
||||
def terminate_impersonation(self):
|
||||
"""Terminate impersonation (noop).
|
||||
def terminate_impersonation(self):
|
||||
"""Terminate impersonation (noop).
|
||||
|
||||
It is always called after having accessed the filesystem.
|
||||
By default it does nothing. The subclass overriding this
|
||||
method is expected to provide a mechanism to switch back
|
||||
to the original user.
|
||||
"""
|
||||
It is always called after having accessed the filesystem.
|
||||
By default it does nothing. The subclass overriding this
|
||||
method is expected to provide a mechanism to switch back
|
||||
to the original user.
|
||||
"""
|
||||
|
||||
def has_user(self, username):
|
||||
"""Whether the username exists in the virtual users table."""
|
||||
return True
|
||||
def has_user(self, username):
|
||||
"""Whether the username exists in the virtual users table."""
|
||||
if username=='anonymous':
|
||||
return False
|
||||
return True
|
||||
|
||||
def has_perm(self, username, perm, path=None):
|
||||
"""Whether the user has permission over path (an absolute
|
||||
pathname of a file or a directory).
|
||||
def has_perm(self, username, perm, path=None):
|
||||
"""Whether the user has permission over path (an absolute
|
||||
pathname of a file or a directory).
|
||||
|
||||
Expected perm argument is one of the following letters:
|
||||
"elradfmw".
|
||||
"""
|
||||
return True
|
||||
paths = path.split('/')
|
||||
if not len(paths)>2:
|
||||
return True
|
||||
db_name = paths[1]
|
||||
db,pool = pooler.get_db_and_pool(db_name)
|
||||
res = security.login(db_name, username, self.password)
|
||||
return bool(res)
|
||||
Expected perm argument is one of the following letters:
|
||||
"elradfmw".
|
||||
"""
|
||||
paths = path.split('/')
|
||||
if not len(paths)>2:
|
||||
return True
|
||||
db_name = paths[1]
|
||||
db,pool = pooler.get_db_and_pool(db_name)
|
||||
res = security.login(db_name, username, self.password)
|
||||
return bool(res)
|
||||
|
||||
def get_perms(self, username):
|
||||
"""Return current user permissions."""
|
||||
return 'elr'
|
||||
def get_perms(self, username):
|
||||
"""Return current user permissions."""
|
||||
return 'elr'
|
||||
|
||||
def get_home_dir(self, username):
|
||||
"""Return the user's home directory."""
|
||||
return '/'
|
||||
def get_home_dir(self, username):
|
||||
"""Return the user's home directory."""
|
||||
return '/'
|
||||
|
||||
def get_msg_login(self, username):
|
||||
"""Return the user's login message."""
|
||||
return 'Welcome on OpenERP document management system.'
|
||||
def get_msg_login(self, username):
|
||||
"""Return the user's login message."""
|
||||
return 'Welcome on OpenERP document management system.'
|
||||
|
||||
def get_msg_quit(self, username):
|
||||
"""Return the user's quitting message."""
|
||||
return 'Bye.'
|
||||
def get_msg_quit(self, username):
|
||||
"""Return the user's quitting message."""
|
||||
return 'Bye.'
|
||||
|
||||
|
||||
|
||||
@@ -2512,9 +2512,14 @@ class FTPHandler(asynchat.async_chat):
|
||||
path = self.fs.ftp2fs(line, datacr)
|
||||
self.run_as_current_user(self.fs.chdir, path)
|
||||
except OSError, err:
|
||||
why = _strerror(err)
|
||||
self.log('FAIL CWD "%s". %s.' %(self.fs.ftpnorm(line), why))
|
||||
self.respond('550 %s.' %why)
|
||||
if err.errno==2:
|
||||
why = 'Authentication Required or Failed'
|
||||
self.log('FAIL CWD "%s". %s.' %(self.fs.ftpnorm(line), why))
|
||||
self.respond('530 %s.' %why)
|
||||
else:
|
||||
why = _strerror(err)
|
||||
self.log('FAIL CWD "%s". %s.' %(self.fs.ftpnorm(line), why))
|
||||
self.respond('550 %s.' %why)
|
||||
else:
|
||||
self.log('OK CWD "%s".' %self.fs.cwd)
|
||||
self.respond('250 "%s" is the current directory.' %self.fs.cwd)
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ class hr_employee(osv.osv):
|
||||
'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'),
|
||||
'address_id': fields.many2one('res.partner.address', 'Working Address'),
|
||||
'work_phone': fields.char('Work Phone', size=32),
|
||||
'work_email': fields.char('Work Email', size=128),
|
||||
'work_location': fields.char('Office Location', size=32),
|
||||
|
||||
@@ -40,15 +40,7 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="act_hr_timesheet_line_today_form" model="ir.actions.act_window">
|
||||
<field name="name">Working Hours</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">hr.analytic.timesheet</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="hr_timesheet_line_tree"/>
|
||||
</record>
|
||||
<menuitem id="menu_act_hr_timesheet_line_today_form" parent="hr.menu_hr_root"/>
|
||||
<menuitem id="menu_act_hr_timesheet_line_today_form" parent="hr.menu_hr_root" name="Working Hours"/>
|
||||
|
||||
<record id="act_hr_timesheet_line_me_all_form" model="ir.actions.act_window">
|
||||
<field name="name">My Working Hours</field>
|
||||
|
||||
@@ -190,18 +190,31 @@
|
||||
</record>
|
||||
<menuitem action="act_hr_timesheet_sheet_form_my_confirm" id="menu_act_hr_timesheet_sheet_form_my_confirm" parent="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my"/>
|
||||
|
||||
<wizard id="act_hr_timesheet_sheet_form_department_current" model="hr.employee" name="hr_timesheet_sheet.department.open" string="My Department's Timesheet"/>
|
||||
<wizard
|
||||
id="act_hr_timesheet_sheet_form_department_current"
|
||||
model="hr.employee"
|
||||
name="hr_timesheet_sheet.department.open"
|
||||
string="My Department's Timesheet"
|
||||
multi="True"/>
|
||||
<menuitem action="act_hr_timesheet_sheet_form_department_current" icon="STOCK_JUSTIFY_FILL" id="menu_act_hr_timesheet_sheet_form_department_current" parent="hr_timesheet_sheet.next_id_60" type="wizard"/>
|
||||
|
||||
<wizard id="act_hr_timesheet_sheet_form_department_validate" model="hr.employee" name="hr_timesheet_sheet.department.validate.open" string="My Department's Timesheet to Validate"/>
|
||||
<wizard
|
||||
id="act_hr_timesheet_sheet_form_department_validate"
|
||||
model="hr.employee"
|
||||
name="hr_timesheet_sheet.department.validate.open"
|
||||
string="My Department's Timesheet to Validate"
|
||||
multi="True"/>
|
||||
<menuitem action="act_hr_timesheet_sheet_form_department_validate" icon="STOCK_JUSTIFY_FILL" id="menu_act_hr_timesheet_sheet_form_department_validate" parent="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_department_current" type="wizard"/>
|
||||
|
||||
<wizard id="act_hr_timesheet_sheet_form_department_confirm" model="hr.employee" name="hr_timesheet_sheet.department.confirm.open" string="My Department's Timesheet to Confirm"/>
|
||||
<wizard
|
||||
id="act_hr_timesheet_sheet_form_department_confirm"
|
||||
model="hr.employee"
|
||||
name="hr_timesheet_sheet.department.confirm.open"
|
||||
string="My Department's Timesheet to Confirm"
|
||||
multi="True"/>
|
||||
|
||||
<menuitem action="act_hr_timesheet_sheet_form_department_confirm" icon="STOCK_JUSTIFY_FILL" id="menu_act_hr_timesheet_sheet_form_department_confirm" parent="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_department_current" type="wizard"/>
|
||||
|
||||
|
||||
|
||||
|
||||
<wizard id="act_hr_timesheet_sheet_form_my_current" model="hr.employee" name="hr_timesheet_sheet.current.open" string="My Current Timesheet"/>
|
||||
<menuitem action="act_hr_timesheet_sheet_form_my_current" icon="STOCK_NEW" id="menu_act_hr_timesheet_sheet_form_my_current" parent="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my" type="wizard"/>
|
||||
|
||||
|
||||
@@ -1136,6 +1136,11 @@ class StockMove(osv.osv):
|
||||
_columns = {
|
||||
'procurements': fields.one2many('mrp.procurement', 'move_id', 'Procurements'),
|
||||
}
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
default = default or {}
|
||||
default['procurements'] = []
|
||||
return super(StockMove, self).copy(cr, uid, id, default, context)
|
||||
|
||||
def _action_explode(self, cr, uid, move, context={}):
|
||||
if move.product_id.supply_method=='produce' and move.product_id.procure_method=='make_to_order':
|
||||
bis = self.pool.get('mrp.bom').search(cr, uid, [
|
||||
|
||||
+2
-11
@@ -3,6 +3,7 @@
|
||||
<data>
|
||||
|
||||
<menuitem icon="terp-mrp" id="menu_mrp_root" name="Manufacturing"/>
|
||||
<menuitem id="menu_mrp_reordering" name="Automatic Procurements" parent="stock.menu_stock_root" sequence="4"/>
|
||||
|
||||
<!--
|
||||
Property / Property Group
|
||||
@@ -689,15 +690,6 @@
|
||||
</record>
|
||||
<menuitem action="mrp_procurement_action" id="menu_mrp_procurement_action" parent="mrp.menu_mrp_root" groups="base.group_extended" />
|
||||
|
||||
<record id="mrp_procurement_action2" model="ir.actions.act_window">
|
||||
<field name="name">Draft procurements</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.procurement</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('state','=','draft')]</field>
|
||||
</record>
|
||||
<menuitem action="mrp_procurement_action2" id="menu_mrp_procurement_action2" parent="mrp.menu_mrp_procurement_action"/>
|
||||
<record id="mrp_procurement_action3" model="ir.actions.act_window">
|
||||
<field name="name">Unscheduled procurements</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
@@ -716,7 +708,7 @@
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('state','=','exception')]</field>
|
||||
</record>
|
||||
<menuitem action="mrp_procurement_action5" id="menu_mrp_procurement_action5" parent="stock.menu_stock_root"/>
|
||||
<menuitem action="mrp_procurement_action5" id="menu_mrp_procurement_action5" parent="menu_mrp_reordering"/>
|
||||
|
||||
<record id="mrp_procurement_action4" model="ir.actions.act_window">
|
||||
<field name="name">Exceptions Procurements to Fix</field>
|
||||
@@ -789,7 +781,6 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="view_warehouse_orderpoint_tree"/>
|
||||
</record>
|
||||
<menuitem id="menu_mrp_reordering" name="Reordering Policy" parent="stock.menu_stock_root" sequence="4"/>
|
||||
<menuitem action="action_orderpoint_form" id="menu_action_orderpoint_form" parent="menu_mrp_reordering"/>
|
||||
|
||||
<act_window domain="[('warehouse_id', '=', active_id)]" id="act_stock_warehouse_2_stock_warehouse_orderpoint" name="Minimum Stock Rules" res_model="stock.warehouse.orderpoint" src_model="stock.warehouse"/>
|
||||
|
||||
@@ -162,7 +162,8 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem action="product_price_type_action" groups="base.group_extended" id="menu_product_price_type_action" parent="product.menu_config_product"/>
|
||||
<menuitem name="Prices Computations" id="menu_price" parent="product.menu_config_product"/>
|
||||
<menuitem action="product_price_type_action" groups="base.group_extended" id="menu_product_price_type_action" parent="menu_price"/>
|
||||
|
||||
<record id="product_pricelist_type_view" model="ir.ui.view">
|
||||
<field name="name">product.pricelist.type.form</field>
|
||||
@@ -182,7 +183,7 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem action="product_pricelist_type_action" groups="base.group_extended" id="menu_product_pricelist_type_action" parent="product.menu_config_product"/>
|
||||
<menuitem action="product_pricelist_type_action" groups="base.group_extended" id="menu_product_pricelist_type_action" parent="menu_price"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -289,7 +289,7 @@
|
||||
<field name="model">product.ul</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Logistical Unit">
|
||||
<form string="Packagings">
|
||||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
</form>
|
||||
@@ -300,14 +300,14 @@
|
||||
<field name="model">product.ul</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Logistical Unit">
|
||||
<tree string="Packagings">
|
||||
<field name="name" select="1"/>
|
||||
<field name="type" select="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="product_ul_form_action" model="ir.actions.act_window">
|
||||
<field name="name">Logistical Unit</field>
|
||||
<field name="name">Packagings</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.ul</field>
|
||||
<field name="view_type">form</field>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"version":"1.0",
|
||||
"author":"Tiny",
|
||||
"category":"Profile",
|
||||
"depends":["mrp", "sale", "delivery","board_manufacturing"],
|
||||
"depends":["mrp", "sale", "delivery","board_manufacturing","product_margin"],
|
||||
"demo_xml":[],
|
||||
"update_xml":[
|
||||
"security/ir.model.access.csv",
|
||||
|
||||
@@ -63,6 +63,9 @@ class profile_manufacturing_config_install_modules_wizard(osv.osv_memory):
|
||||
"is often used for: localisation of products, managing a manufacturing "\
|
||||
"chain, a quality control location, product that you rent, etc."\
|
||||
),
|
||||
'warning': fields.boolean('Alerts',
|
||||
help="Allows to manage alerts on products and partners that are "\
|
||||
"showed on different events: sale order, invoice, purchase order, ..."),
|
||||
'point_of_sale': fields.boolean('Point of Sale',
|
||||
help="This module allows you to manage a point of sale system. "\
|
||||
"It offers a basic form for pos operations. You must also check "\
|
||||
@@ -70,7 +73,7 @@ class profile_manufacturing_config_install_modules_wizard(osv.osv_memory):
|
||||
"materials and payment processing hardware."),
|
||||
'portal': fields.boolean('Portal',
|
||||
help="This module allows you to manage a Portal system."),
|
||||
'mrp_subproduct': fields.boolean('Mrp Sub Product',
|
||||
'mrp_subproduct': fields.boolean('Mrp Sub Product',
|
||||
help="This module allows you to add sub poducts in mrp bom."),
|
||||
'warning': fields.boolean('Warning',
|
||||
help="Able you to set warnings on products and partners."),
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
<field name="crm_configuration"/>
|
||||
<field name="board_document"/>
|
||||
<field name="warning"/>
|
||||
<separator string="Portal Management" colspan="4"/>
|
||||
<field name="portal"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<label string="" colspan="2"/>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</record>
|
||||
|
||||
<record id="process_node_opentask0" model="process.node">
|
||||
<field name="menu_id" ref="project.menu_action_view_task6"/>
|
||||
<field name="menu_id" ref="menu_tasks_yours_prog"/>
|
||||
<field name="model_id" ref="project.model_project_task"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Open task"""" name="name"/>
|
||||
@@ -152,4 +152,4 @@
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
||||
@@ -137,7 +137,7 @@ class project(osv.osv):
|
||||
'warn_footer': fields.text('Mail Footer', help="Footer added at the beginning of the email for the warning message sent to the customer when a task is closed."),
|
||||
'notes': fields.text('Notes', help="Internal description of the project."),
|
||||
'timesheet_id': fields.many2one('hr.timesheet.group', 'Working Time', help="Timetable working hours to adjust the gantt diagram report"),
|
||||
'state': fields.selection([('template', 'Template'), ('open', 'Open'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', required=True, readonly=True),
|
||||
'state': fields.selection([('template', 'Template'), ('open', 'Running'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', required=True, readonly=True),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
@@ -289,8 +289,8 @@ class task(osv.osv):
|
||||
'priority' : fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Importance'),
|
||||
'sequence': fields.integer('Sequence'),
|
||||
'type': fields.many2one('project.task.type', 'Type'),
|
||||
'state': fields.selection([('draft', 'Draft'),('open', 'Open'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'Status', readonly=True, required=True),
|
||||
'date_start': fields.datetime('Date Opened'),
|
||||
'state': fields.selection([('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'Status', readonly=True, required=True),
|
||||
'date_start': fields.datetime('Starting Date'),
|
||||
'date_deadline': fields.datetime('Deadline'),
|
||||
'date_close': fields.datetime('Date Closed', readonly=True),
|
||||
'project_id': fields.many2one('project.project', 'Project', ondelete='cascade'),
|
||||
@@ -375,7 +375,7 @@ class task(osv.osv):
|
||||
project = task.project_id
|
||||
if project and project.warn_manager and project.manager.id and (project.manager.id != uid):
|
||||
request.create(cr, uid, {
|
||||
'name': "Task '%s' reopened" % task.name,
|
||||
'name': "Task '%s' set in progress" % task.name,
|
||||
'state': 'waiting',
|
||||
'act_from': uid,
|
||||
'act_to': project.manager.id,
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<openerp>
|
||||
<data>
|
||||
<menuitem icon="terp-project" id="menu_main" name="Project Management"/>
|
||||
<menuitem id="menu_tasks" name="Tasks" parent="menu_main"/>
|
||||
<menuitem id="menu_definitions" name="Configuration" parent="project.menu_main" sequence="1"/>
|
||||
|
||||
<!-- Project -->
|
||||
@@ -33,7 +34,7 @@
|
||||
<group col="9" colspan="8">
|
||||
<field name="state"/>
|
||||
<button name="set_template" string="Set as Template" type="object" states="open"/>
|
||||
<button name="set_open" string="Reopen Project" type="object" states="pending,cancelled,done"/>
|
||||
<button name="set_open" string="Reactivate Project" type="object" states="pending,cancelled,done"/>
|
||||
<button name="set_pending" string="Pending" type="object" states="open"/>
|
||||
<button name="set_cancel" string="Cancel" type="object" states="open,pending"/>
|
||||
<button name="set_done" string="Done" type="object" states="open,pending"/>
|
||||
@@ -89,36 +90,10 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="open_view_all_project" model="ir.actions.act_window">
|
||||
<field name="name">All Projects</field>
|
||||
<field name="res_model">project.project</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="domain">[('parent_id','=',False)]</field>
|
||||
<field name="view_id" ref="view_project"/>
|
||||
</record>
|
||||
<menuitem action="open_view_all_project" id="menu_all_project" parent="project.menu_main"/>
|
||||
|
||||
<record id="open_view_all_project_unclosed" model="ir.actions.act_window">
|
||||
<field name="name">Unclosed projects</field>
|
||||
<field name="res_model">project.project</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="domain">[('parent_id','=',False),('state','<>','cancelled'),('state','<>','done')]</field>
|
||||
<field name="view_id" ref="view_project"/>
|
||||
</record>
|
||||
<menuitem action="open_view_all_project_unclosed" id="menu_all_project_unclosed" parent="project.menu_all_project"/>
|
||||
|
||||
|
||||
<record id="open_view_all_project_unclosed_open" model="ir.actions.act_window">
|
||||
<field name="name">Open projects</field>
|
||||
<field name="res_model">project.project</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="domain">[('parent_id','=',False),('state','=','open')]</field>
|
||||
<field name="view_id" ref="view_project"/>
|
||||
</record>
|
||||
<menuitem action="open_view_all_project_unclosed_open" id="menu_all_project_unclosed_open" parent="project.menu_all_project_unclosed"/>
|
||||
<menuitem id="menu_all_project" parent="project.menu_main" name="Projects"/>
|
||||
|
||||
<record id="open_view_project_open" model="ir.actions.act_window">
|
||||
<field name="name">Open projects</field>
|
||||
<field name="name">Running projects</field>
|
||||
<field name="res_model">project.project</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('state','=','open')]</field>
|
||||
@@ -142,7 +117,7 @@
|
||||
<field name="view_mode">form,tree,calendar</field>
|
||||
<field name="view_id" eval="False"/>
|
||||
</record>
|
||||
<menuitem action="open_view_project" id="menu_open_view_project" parent="menu_all_project"/>
|
||||
<menuitem action="open_view_project" id="menu_open_view_project" parent="menu_all_project" sequence="50"/>
|
||||
|
||||
<record id="view_task_work_form" model="ir.ui.view">
|
||||
<field name="name">project.task.work.form</field>
|
||||
@@ -189,33 +164,37 @@
|
||||
</field>
|
||||
</record>
|
||||
<record id="open_view_my_project" model="ir.actions.act_window">
|
||||
<field name="name">My projects</field>
|
||||
<field name="name">My Projects</field>
|
||||
<field name="res_model">project.project</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="domain">[('parent_id','=',False),('manager', '=', uid)]</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('manager', '=', uid)]</field>
|
||||
<field name="view_id" ref="view_my_project"/>
|
||||
</record>
|
||||
<menuitem action="open_view_my_project" id="menu_open_view_my_project" parent="project.menu_main"/>
|
||||
<menuitem action="open_view_my_project" id="menu_open_view_my_project" parent="menu_all_project"
|
||||
sequence="1"/>
|
||||
|
||||
|
||||
<record id="open_view_my_project_open_unclosed" model="ir.actions.act_window">
|
||||
<field name="name">My unclosed projects</field>
|
||||
<record id="open_view_my_project_my_run" model="ir.actions.act_window">
|
||||
<field name="name">My Running Projects</field>
|
||||
<field name="res_model">project.project</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="domain">[('parent_id','=',False),('manager', '=', uid),('state','<>','cancelled'),('state','<>','done')]</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('manager', '=', uid),('state','=','open')]</field>
|
||||
<field name="view_id" ref="view_my_project"/>
|
||||
</record>
|
||||
<menuitem action="open_view_my_project_open_unclosed" id="menu_open_view_my_project_open_unclosed" parent="project.menu_open_view_my_project"/>
|
||||
|
||||
<menuitem
|
||||
action="open_view_my_project_my_run"
|
||||
id="menu_open_view_my_project_my_run"
|
||||
parent="menu_open_view_my_project"/>
|
||||
|
||||
<record id="open_view_my_project_open" model="ir.actions.act_window">
|
||||
<field name="name">My open projects</field>
|
||||
<field name="name">Projects Structure</field>
|
||||
<field name="res_model">project.project</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="domain">[('parent_id','=',False),('manager', '=', uid),('state','=','open')]</field>
|
||||
<field name="view_id" ref="view_my_project"/>
|
||||
<field name="domain">[('parent_id','=',False)]</field>
|
||||
</record>
|
||||
<menuitem action="open_view_my_project_open" id="menu_open_view_my_project_open" parent="project.menu_open_view_my_project_open_unclosed"/>
|
||||
<menuitem
|
||||
action="open_view_my_project_open"
|
||||
id="menu_open_view_my_project_open"
|
||||
parent="project.menu_all_project"/>
|
||||
|
||||
<!-- Task -->
|
||||
<record id="view_task_form2" model="ir.ui.view">
|
||||
@@ -249,8 +228,8 @@
|
||||
<group col="11" colspan="4">
|
||||
<field name="state" select="1"/>
|
||||
<button name="do_draft" states="open" string="Draft" type="object"/>
|
||||
<button name="do_open" states="pending,draft" string="Open" type="object"/>
|
||||
<button name="do_reopen" states="done,cancelled" string="Re-open" type="object"/>
|
||||
<button name="do_open" states="pending,draft" string="Start Task" type="object"/>
|
||||
<button name="do_reopen" states="done,cancelled" string="Reactivate" type="object"/>
|
||||
<button name="do_pending" states="open" string="Pending" type="object"/>
|
||||
<button groups="base.group_extended" name="%(wizard_delegate_task)d" states="pending,open" string="Delegate" type="action"/>
|
||||
<button name="%(wizard_close_task)d" states="pending,open" string="Done" type="action"/>
|
||||
@@ -359,7 +338,7 @@
|
||||
<field name="view_mode">tree,form,calendar,gantt,graph</field>
|
||||
<field eval="False" name="view_id"/>
|
||||
</record>
|
||||
<menuitem action="action_view_task" id="menu_action_view_task" parent="project.menu_main"/>
|
||||
<menuitem action="action_view_task" id="menu_action_view_task" parent="project.menu_tasks"/>
|
||||
|
||||
<record id="action_view_task4" model="ir.actions.act_window">
|
||||
<field name="name">My Tasks</field>
|
||||
@@ -368,7 +347,7 @@
|
||||
<field name="view_mode">tree,form,calendar,gantt,graph</field>
|
||||
<field name="domain">[('user_id', '=', uid)]</field>
|
||||
</record>
|
||||
<menuitem action="action_view_task4" id="menu_action_view_task4" parent="project.menu_main"/>
|
||||
<menuitem action="action_view_task4" id="menu_action_view_task4" parent="project.menu_tasks"/>
|
||||
|
||||
<record id="action_view_task5_pending" model="ir.actions.act_window">
|
||||
<field name="name">My Pending Tasks</field>
|
||||
@@ -379,23 +358,34 @@
|
||||
</record>
|
||||
<menuitem action="action_view_task5_pending" id="menu_tasks_yours_pending" parent="menu_action_view_task4"/>
|
||||
|
||||
<record id="action_view_task5" model="ir.actions.act_window">
|
||||
<field name="name">My Open Tasks</field>
|
||||
<record id="action_view_task5_prog" model="ir.actions.act_window">
|
||||
<field name="name">My Current Tasks</field>
|
||||
<field name="res_model">project.task</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
<field name="domain">[('user_id', '=', uid),('state','=','open')]</field>
|
||||
<field name="domain">[('user_id', '=', uid),('state','in',('open','draft'))]</field>
|
||||
</record>
|
||||
<menuitem action="action_view_task5" id="menu_tasks_yours" parent="menu_action_view_task4"/>
|
||||
<menuitem action="action_view_task5_prog" id="menu_tasks_yours_prog" parent="menu_action_view_task4"
|
||||
sequence="1"/>
|
||||
|
||||
<record id="action_view_task5_prog" model="ir.actions.act_window">
|
||||
<record id="action_view_task5_prog_prog" model="ir.actions.act_window">
|
||||
<field name="name">My Tasks in Progress</field>
|
||||
<field name="res_model">project.task</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
<field name="domain">[('user_id', '=', uid),('state','=','open')]</field>
|
||||
<field name="domain">[('user_id', '=', uid),('state','=','open'))]</field>
|
||||
</record>
|
||||
<menuitem action="action_view_task5_prog" id="menu_tasks_yours_prog" parent="menu_action_view_task4"/>
|
||||
<menuitem action="action_view_task5_prog_prog" id="menu_tasks_yours_prog_prog" parent="menu_tasks_yours_prog"/>
|
||||
|
||||
<record id="action_view_task5_prog_draft" model="ir.actions.act_window">
|
||||
<field name="name">My Draft Tasks</field>
|
||||
<field name="res_model">project.task</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
<field name="domain">[('user_id', '=', uid),('state','=','draft'))]</field>
|
||||
</record>
|
||||
<menuitem action="action_view_task5_prog_draft" id="menu_tasks_yours_prog_draft" parent="menu_tasks_yours_prog"/>
|
||||
|
||||
|
||||
<record id="action_view_task_new" model="ir.actions.act_window">
|
||||
<field name="name">New Task</field>
|
||||
@@ -403,16 +393,7 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form,tree,calendar,graph</field>
|
||||
</record>
|
||||
<menuitem action="action_view_task_new" id="menu_action_view_task_new" parent="menu_action_view_task4"/>
|
||||
|
||||
<record id="action_view_task6" model="ir.actions.act_window">
|
||||
<field name="name">Open Tasks</field>
|
||||
<field name="res_model">project.task</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
<field name="domain">[('state', '=', 'open')]</field>
|
||||
</record>
|
||||
<menuitem action="action_view_task6" id="menu_action_view_task6" parent="project.menu_action_view_task"/>
|
||||
<menuitem action="action_view_task_new" id="menu_action_view_task_new" parent="menu_tasks"/>
|
||||
|
||||
<record id="action_view_task6_prog" model="ir.actions.act_window">
|
||||
<field name="name">Tasks in Progress</field>
|
||||
@@ -502,7 +483,7 @@
|
||||
<act_window
|
||||
domain="[('project_id', '=', active_id),('state', '<>', 'cancelled'),('state', '<>', 'done')]"
|
||||
id="act_project_project_2_project_task_opened"
|
||||
name="Open Tasks"
|
||||
name="Tasks in Progress"
|
||||
res_model="project.task"
|
||||
src_model="project.project"
|
||||
view_mode="tree,form,calendar,graph"
|
||||
|
||||
@@ -53,7 +53,8 @@
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="domain">[]</field>
|
||||
</record>
|
||||
<menuitem id="next_id_57" name="Reporting" parent="project.menu_main"/><menuitem id="next_id_58" name="All Months" parent="next_id_57"/><menuitem action="action_project_task" id="menu_project_task_user_tree" parent="next_id_58"/>
|
||||
<menuitem id="next_id_57" name="Reporting" parent="project.menu_main" sequence="50"/>
|
||||
<menuitem id="next_id_58" name="All Months" parent="next_id_57"/><menuitem action="action_project_task" id="menu_project_task_user_tree" parent="next_id_58"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
+40
-16
@@ -456,19 +456,22 @@ class sale_order(osv.osv):
|
||||
write_cancel_ids = []
|
||||
for order in self.browse(cr, uid, ids, context={}):
|
||||
for line in order.order_line:
|
||||
if line.procurement_id and (line.procurement_id.state != 'done') and (line.state!='done'):
|
||||
if (not line.procurement_id) or (line.procurement_id.state=='done') or (line.procurement_id.move_id and line.procurement_id.move_id.state=='done'):
|
||||
finished = True
|
||||
else:
|
||||
finished = False
|
||||
if line.procurement_id and line.procurement_id.state == 'cancel':
|
||||
canceled = True
|
||||
if line.procurement_id and line.procurement_id.state <> 'cancel':
|
||||
notcanceled = True
|
||||
if line.procurement_id:
|
||||
if (line.procurement_id.state == 'cancel') or (line.procurement_id.move_id and line.procurement_id.move_id.state=='cancel'):
|
||||
canceled = True
|
||||
if line.state != 'cancel':
|
||||
write_cancel_ids.append(line.id)
|
||||
else:
|
||||
notcanceled = True
|
||||
# if a line is finished (ie its procuremnt is done or it has not procuremernt and it
|
||||
# is not already marked as done, mark it as being so...
|
||||
if ((not line.procurement_id) or line.procurement_id.state == 'done') and line.state != 'done':
|
||||
write_done_ids.append(line.id)
|
||||
# ... same for canceled lines
|
||||
if line.procurement_id and line.procurement_id.state == 'cancel' and line.state != 'cancel':
|
||||
write_cancel_ids.append(line.id)
|
||||
|
||||
if write_done_ids:
|
||||
self.pool.get('sale.order.line').write(cr, uid, write_done_ids, {'state': 'done'})
|
||||
if write_cancel_ids:
|
||||
@@ -477,6 +480,7 @@ class sale_order(osv.osv):
|
||||
if mode=='finished':
|
||||
return finished
|
||||
elif mode=='canceled':
|
||||
return canceled
|
||||
if notcanceled:
|
||||
return False
|
||||
return canceled
|
||||
@@ -932,25 +936,45 @@ class sale_config_picking_policy(osv.osv_memory):
|
||||
'name':fields.char('Name', size=64),
|
||||
'picking_policy': fields.selection([
|
||||
('direct','Direct Delivery'),
|
||||
('one','All at once')
|
||||
], 'Packing Policy', required=True ),
|
||||
('one','All at Once')
|
||||
], 'Packing Default Policy', required=True ),
|
||||
'order_policy': fields.selection([
|
||||
('manual','Invoice based on Sales Orders'),
|
||||
('picking','Invoice based on Deliveries'),
|
||||
], 'Shipping Policy', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
('manual','Invoice Based on Sales Orders'),
|
||||
('picking','Invoice Based on Deliveries'),
|
||||
], 'Shipping Default Policy', required=True),
|
||||
'step': fields.selection([
|
||||
('one','Delivery Order Only'),
|
||||
('two','Packing List & Delivery Order')
|
||||
], 'Steps To Deliver a Sale Order', required=True,
|
||||
help="By default, Open ERP is able to manage complex routing and paths "\
|
||||
"of products in your warehouse and partner locations. This will configure "\
|
||||
"the most common and simple methods to deliver products to the customer "\
|
||||
"in one or two operations by the worker.")
|
||||
}
|
||||
_defaults={
|
||||
'picking_policy': lambda *a: 'direct',
|
||||
'order_policy': lambda *a: 'picking'
|
||||
'order_policy': lambda *a: 'picking',
|
||||
'step': lambda *a: 'one'
|
||||
}
|
||||
def set_default(self, cr, uid, ids, context=None):
|
||||
print context
|
||||
for o in self.browse(cr, uid, ids, context=context):
|
||||
print o.picking_policy, o.order_policy
|
||||
ir_values_obj = self.pool.get('ir.values')
|
||||
ir_values_obj.set(cr,uid,'default',False,'picking_policy',['sale.order'],o.picking_policy)
|
||||
ir_values_obj = self.pool.get('ir.values')
|
||||
ir_values_obj.set(cr,uid,'default',False,'order_policy',['sale.order'],o.order_policy)
|
||||
|
||||
if o.step=='one':
|
||||
md = self.pool.get('ir.model.data')
|
||||
group_id = md._get_id(cr, uid, 'base', 'group_no_one')
|
||||
group_id = md.browse(cr, uid, group_id, context).res_id
|
||||
menu_id = md._get_id(cr, uid, 'stock', 'menu_action_picking_tree_delivery')
|
||||
menu_id = md.browse(cr, uid, menu_id, context).res_id
|
||||
self.pool.get('ir.ui.menu').write(cr, uid, [menu_id], {'groups_id':[(6,0,[group_id])]})
|
||||
|
||||
location_id = md._get_id(cr, uid, 'stock', 'stock_location_output')
|
||||
location_id = md.browse(cr, uid, location_id, context).res_id
|
||||
self.pool.get('stock.location').write(cr, uid, [location_id], {'chained_auto_packing':'transparent'})
|
||||
|
||||
return {
|
||||
'view_type': 'form',
|
||||
"view_mode": 'form',
|
||||
|
||||
@@ -424,7 +424,8 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" eval="False"/>
|
||||
</record>
|
||||
<menuitem action="action_order_line_tree1" id="menu_action_order_line_tree1" parent="sale.menu_sale_root"/>
|
||||
<menuitem action="action_order_line_tree1" id="menu_action_order_line_tree1" parent="sale.menu_sale_root"
|
||||
groups="base.group_extended"/>
|
||||
|
||||
<record id="action_order_line_tree2" model="ir.actions.act_window">
|
||||
<field name="name">Uninvoiced Lines</field>
|
||||
@@ -463,6 +464,8 @@
|
||||
<field name="picking_policy"/>
|
||||
<newline/>
|
||||
<field name="order_policy"/>
|
||||
<newline/>
|
||||
<field name="step"/>
|
||||
<group col="4" colspan="4">
|
||||
<button icon="gtk-cancel" name="action_cancel" type="object" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-ok" name="set_default" string="Set Default" type="object"/>
|
||||
|
||||
+17
-17
@@ -3,26 +3,26 @@
|
||||
<data>
|
||||
|
||||
<wizard
|
||||
id="wizard_sale_order_make_invoice"
|
||||
keyword="client_action_multi"
|
||||
model="sale.order"
|
||||
name="sale.order.make_invoice"
|
||||
multi="True"
|
||||
string="Make invoices"/>
|
||||
id="wizard_sale_order_make_invoice"
|
||||
keyword="client_action_multi"
|
||||
model="sale.order"
|
||||
name="sale.order.make_invoice"
|
||||
multi="True"
|
||||
string="Make invoices"/>
|
||||
|
||||
<wizard
|
||||
id="wizard_sale_order_line_invoice"
|
||||
keyword="client_action_multi"
|
||||
model="sale.order.line"
|
||||
name="sale.order.line.make_invoice"
|
||||
multi="True"
|
||||
string="Make invoices"/>
|
||||
id="wizard_sale_order_line_invoice"
|
||||
keyword="client_action_multi"
|
||||
model="sale.order.line"
|
||||
name="sale.order.line.make_invoice"
|
||||
multi="True"
|
||||
string="Make invoices"/>
|
||||
|
||||
<wizard string="Advance Payment"
|
||||
model="sale.order"
|
||||
name="sale.advance_payment_inv"
|
||||
id="sale.advance_payment"
|
||||
menu="True"/>
|
||||
<wizard string="Advance Payment"
|
||||
model="sale.order"
|
||||
name="sale.advance_payment_inv"
|
||||
id="sale.advance_payment"
|
||||
menu="True"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<report auto="False" id="report_product_history" model="product.product" name="stock.product.history" string="Future stock forecast"/>
|
||||
<report auto="False" id="report_product_history" model="product.product" name="stock.product.history" string="Future Stock Forecast"/>
|
||||
|
||||
|
||||
<!-- <report id="report_picking_list" model="stock.picking" name="stock.picking.list" string="Packing list" xml="stock/report/picking.xml" xsl="stock/report/picking.xsl"/>-->
|
||||
|
||||
@@ -857,7 +857,7 @@
|
||||
</record>
|
||||
|
||||
<record id="action_picking_tree" model="ir.actions.act_window">
|
||||
<field name="name">Sending Products</field>
|
||||
<field name="name">Outgoing Products</field>
|
||||
<field name="res_model">stock.picking</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
@@ -1038,7 +1038,7 @@
|
||||
|
||||
|
||||
<record id="action_picking_tree4" model="ir.actions.act_window">
|
||||
<field name="name">Getting Products</field>
|
||||
<field name="name">Incoming Products</field>
|
||||
<field name="res_model">stock.picking</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
@@ -1122,7 +1122,7 @@
|
||||
<menuitem action="action_picking_form" id="menu_action_picking_form" parent="menu_action_picking_tree4"/>
|
||||
|
||||
<record id="action_picking_tree6" model="ir.actions.act_window">
|
||||
<field name="name">Internal Packings</field>
|
||||
<field name="name">Internal Moves</field>
|
||||
<field name="res_model">stock.picking</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
|
||||
Reference in New Issue
Block a user