[CLEAN]: removed commented code, fixed proper indentation in dictionary and removed extra spaces at few places
bzr revid: rvo@tinyerp.co.in-20100813122005-qj1l1iumkfmocyvk
This commit is contained in:
parent
535e21cc06
commit
45a8d54f18
|
@ -36,8 +36,7 @@
|
|||
Credits: Sistheo Zeekom CrysaLEAD
|
||||
""",
|
||||
"depends" : ['base', 'account', 'account_chart', 'account_report', 'base_vat'],
|
||||
"init_xml" : [
|
||||
],
|
||||
"init_xml" : [],
|
||||
"update_xml" : [
|
||||
"report.xml",
|
||||
"pcg.xml",
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- <menuitem name="Compte de resultat" parent="l10n_fr.menu_l10n_fr_report_doc" id="menu_action_cdr" action="wizard_l10n_fr_pcg_cdr_report" type="wizard" />-->
|
||||
<!---->
|
||||
<!-- <menuitem name="Bilan" id="menu_action_bilan" parent="l10n_fr.menu_l10n_fr_report_doc" action="wizard_l10n_fr_pcg_bilan_report" type="wizard" />-->
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
<record id="account_type_dettes" model="account.account.type">
|
||||
<field name="name">Dettes long terme</field>
|
||||
<field name="code">dettes</field>
|
||||
<!-- <field name="report_type">?</field> -->
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
|
@ -35,7 +34,6 @@
|
|||
<record id="account_type_cloture" model="account.account.type">
|
||||
<field name="name">Cloture</field>
|
||||
<field name="code">cloture</field>
|
||||
<!-- <field name="report_type">?</field> -->
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
|
@ -76,7 +74,6 @@
|
|||
<record model="account.account.type" id="account_type_tax">
|
||||
<field name="name">Tax</field>
|
||||
<field name="code">tax</field>
|
||||
<!-- <field name="report_type">?</field> -->
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
|
||||
|
@ -104,14 +101,12 @@
|
|||
<record model="account.account.type" id="account_type_provision">
|
||||
<field name="name">Provisions</field>
|
||||
<field name="code">provision</field>
|
||||
<!-- <field name="report_type">?</field> -->
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="account_type_commitment">
|
||||
<field name="name">Engagements</field>
|
||||
<field name="code">commitment</field>
|
||||
<!-- <field name="report_type">?</field> -->
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
|
@ -125,7 +120,6 @@
|
|||
<record model="account.account.type" id="account_type_special">
|
||||
<field name="name">Comptes spéciaux</field>
|
||||
<field name="code">special</field>
|
||||
<!-- <field name="report_type">?</field> -->
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
|
@ -9255,49 +9249,5 @@
|
|||
<field name="parent_id" ref="pcg_89"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- <record model="ir.property" id="account.property_account_receivable">
|
||||
<field name="value" eval="'account.account,'+str(ref('account.a_recv'))"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.property" id="account.property_account_payable">
|
||||
<field name="value" eval="'account.account,'+str(ref('account.a_pay'))"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.property" id="account.property_account_expense_categ">
|
||||
<field name="value" eval="'account.account,'+str(ref('account.a_expense'))"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.property" id="account.property_account_income_categ">
|
||||
<field name="value" eval="'account.account,'+str(ref('account.a_sale'))"/>
|
||||
</record>
|
||||
|
||||
<record model="account.journal" id="l10n_fr.opening_journal">
|
||||
<field name="default_debit_account_id" ref="pcg_890"/>
|
||||
<field name="default_credit_account_id" ref="pcg_890"/>
|
||||
</record>
|
||||
|
||||
<record model="account.journal" id="l10n_fr.closing_journal">
|
||||
<field name="default_debit_account_id" ref="pcg_891"/>
|
||||
<field name="default_credit_account_id" ref="pcg_891"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="l10n_fr.pl_credit">
|
||||
<field name="name">pl_credit</field>
|
||||
<field name="key">default</field>
|
||||
<field name="key2" eval="None"/>
|
||||
<field name="object" eval="False"/>
|
||||
<field name="model">wizard.l10n.fr.fiscalyear.close</field>
|
||||
<field name="value" eval="'I'+str(ref('pcg_120'))+chr(10)+'.'"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="l10n_fr.pl_debit">
|
||||
<field name="name">pl_debit</field>
|
||||
<field name="key">default</field>
|
||||
<field name="key2" eval="None"/>
|
||||
<field name="object" eval="False"/>
|
||||
<field name="model">wizard.l10n.fr.fiscalyear.close</field>
|
||||
<field name="value" eval="'I'+str(ref('pcg_129'))+chr(10)+'.'"/>
|
||||
</record> -->
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -504,9 +504,6 @@
|
|||
|
||||
<record id="pcg_bpvar10" model="l10n.fr.line">
|
||||
<field name="name">Capitaux propres : Résultat de l'exercice</field>
|
||||
<!--
|
||||
<field name="definition">{'load':['-:120:S','-:129:S'], 'except':[]}</field>
|
||||
-->
|
||||
<field name="definition">{'load':['-:7:S','-:6:S'], 'except':[]}</field>
|
||||
<field name="code">bpvar10</field>
|
||||
<field name="report_id" ref="pcg_bilan"/>
|
||||
|
|
|
@ -62,7 +62,6 @@ class base_report(report_sxw.rml_parse):
|
|||
return self.localcontext[variable]
|
||||
|
||||
def _load_accounts(self,form,code,definition,fiscalyear,period_query_cond):
|
||||
#self.context.copy()
|
||||
accounts={}
|
||||
for x in definition['load']:
|
||||
p=x.split(":")
|
||||
|
|
|
@ -159,17 +159,6 @@
|
|||
<field name="parent_id" ref="IA_AC011"/>
|
||||
</record>
|
||||
|
||||
<!-- <record model="account.account.template" id="IA_AC0115">-->
|
||||
<!-- <field name="name">Stock In Hand Account</field>-->
|
||||
<!-- <field name="code">IA_AC0115</field>-->
|
||||
<!-- <field name="type">receivable</field>-->
|
||||
<!-- <field name="user_type" ref="account_type_asset1"/>
|
||||
-->
|
||||
<!-- <field name="reconcile" eval="False"/>-->
|
||||
<!-- -->
|
||||
<!-- <field name="parent_id" ref="IA_AC011"/>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record model="account.account.template" id="IA_AC0116">
|
||||
<field name="name">Total Sundry Debtors Account</field>
|
||||
<field name="code">IA_AC0116</field>
|
||||
|
@ -181,7 +170,6 @@
|
|||
<field name="parent_id" ref="IA_AC011"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="account.account.template" id="IA_AC01161">
|
||||
<field name="name">Sundry Debtors Account</field>
|
||||
<field name="code">IA_AC01161</field>
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
<record id="account_type_creances" model="account.account.type">
|
||||
<field name="name">Créances</field>
|
||||
<field name="code">creances</field>
|
||||
<!-- <field name="report_type">?</field> -->
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="account_type_cash_equity" model="account.account.type">
|
||||
|
|
|
@ -64,7 +64,7 @@ def extract_keys(lines):
|
|||
keys = []
|
||||
for line in lines:
|
||||
if line.startswith('/V'):
|
||||
pass #print 'value',line
|
||||
pass
|
||||
elif line.startswith('/T'):
|
||||
key = line[7:-2]
|
||||
key = ''.join(key.split('\x00'))
|
||||
|
@ -85,7 +85,6 @@ def write_fields(out, fields):
|
|||
for key in fields:
|
||||
value = fields[key]
|
||||
write_field(out, key, value)
|
||||
# write_field(out, key+"a", value) # pour copie-carbone sur autres pages
|
||||
out.write(TAIL)
|
||||
|
||||
def extract_keys_from_pdf(filename):
|
||||
|
|
|
@ -47,12 +47,9 @@
|
|||
'lunch_view.xml',
|
||||
'lunch_report.xml',
|
||||
'report/report_lunch_order_view.xml',
|
||||
#'process/lunch_process.xml'
|
||||
],
|
||||
"demo_xml": ['lunch_demo.xml',
|
||||
],
|
||||
"test": ['test/test_lunch.yml'
|
||||
],
|
||||
"demo_xml": ['lunch_demo.xml'],
|
||||
"test": ['test/test_lunch.yml'],
|
||||
"installable": True,
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,8 @@ class lunch_cashbox_clean(osv.osv_memory):
|
|||
and box IN %s" , (tuple(data),))
|
||||
|
||||
for (user_id, box_id, amount) in res:
|
||||
cashmove_ref.create(cr, uid, {'name': 'Summary for user' + str(user_id),
|
||||
cashmove_ref.create(cr, uid, {
|
||||
'name': 'Summary for user' + str(user_id),
|
||||
'amount': amount,
|
||||
'user_cashmove': user_id,
|
||||
'box': box_id,
|
||||
|
|
|
@ -6,4 +6,3 @@
|
|||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
<!--group_marketing_user-->
|
||||
|
|
|
@ -349,8 +349,6 @@ class marketing_campaign_activity(osv.osv):
|
|||
'from_ids': fields.one2many('marketing.campaign.transition',
|
||||
'activity_to_id',
|
||||
'Previous Activities'),
|
||||
#'subcampaign_id': fields.many2one('marketing.campaign', 'Sub-Campaign',
|
||||
# domain="[('object_id', '=', object_id)]"),
|
||||
'variable_cost': fields.float('Variable Cost'),
|
||||
'revenue': fields.float('Revenue'),
|
||||
'signal': fields.char('Signal', size=128,
|
||||
|
@ -430,9 +428,10 @@ class marketing_campaign_transition(osv.osv):
|
|||
_name = "marketing.campaign.transition"
|
||||
_description = "Campaign Transition"
|
||||
|
||||
_interval_units = [('hours', 'Hour(s)'), ('days', 'Day(s)'),
|
||||
('months', 'Month(s)'), ('years','Year(s)')]
|
||||
|
||||
_interval_units = [
|
||||
('hours', 'Hour(s)'), ('days', 'Day(s)'),
|
||||
('months', 'Month(s)'), ('years','Year(s)')
|
||||
]
|
||||
|
||||
def _get_name(self, cr, uid, ids, fn, args, context=None):
|
||||
result = dict.fromkeys(ids, False)
|
||||
|
@ -671,8 +670,10 @@ class marketing_campaign_workitem(osv.osv):
|
|||
}
|
||||
|
||||
elif wi_obj.activity_id.type == 'paper':
|
||||
datas = {'ids': [wi_obj.res_id],
|
||||
'model': wi_obj.object_id.model}
|
||||
datas = {
|
||||
'ids': [wi_obj.res_id],
|
||||
'model': wi_obj.object_id.model
|
||||
}
|
||||
res = {
|
||||
'type' : 'ir.actions.report.xml',
|
||||
'report_name': wi_obj.activity_id.report_id.report_name,
|
||||
|
|
|
@ -249,9 +249,6 @@
|
|||
<field name="report_directory_id" attrs="{'required':[('type','=','paper')]}" />
|
||||
</group>
|
||||
<field name="server_action_id" attrs="{'required':[('type','=','action')],'invisible':[('type','!=','action')]}" domain="[('model_id','=',object_id)]" />
|
||||
<!--
|
||||
<field name="subcampaign_id" attrs="{'required':[('type','=','subcampaign')], 'invisible':[('type','!=','subcampaign')]}" />
|
||||
-->
|
||||
</group>
|
||||
</group>
|
||||
<newline/>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
import tools
|
||||
from osv import fields, osv
|
||||
|
||||
class campaign_analysis(osv.osv): #{{{
|
||||
class campaign_analysis(osv.osv):
|
||||
_name = "campaign.analysis"
|
||||
_description = "Campaign Analysis"
|
||||
_auto = False
|
||||
|
@ -89,4 +89,4 @@ class campaign_analysis(osv.osv): #{{{
|
|||
wi.date::date
|
||||
)
|
||||
""")
|
||||
campaign_analysis() #}}}
|
||||
campaign_analysis()
|
||||
|
|
|
@ -5,9 +5,6 @@
|
|||
<record id="base.res_groups_email_template_admin" model="res.groups">
|
||||
<field name="name">Marketing / User</field>
|
||||
</record>
|
||||
<!--record id="res_groups_marketing_campaign" model="res.groups">
|
||||
<field name="name">Marketing / Campaign</field>
|
||||
</record-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -83,7 +83,8 @@ class mailchimp_account(osv.osv):
|
|||
def add_partner_list(self, cr, uid, account_id, list_id, partner_ids):
|
||||
vals = {} # just dictionary with partner_id and updated in list or not
|
||||
for partner in self.pool.get('res.partner').browse(cr, uid, partner_ids):
|
||||
params = {'id' : list_id,
|
||||
params = {
|
||||
'id' : list_id,
|
||||
'email_address' : partner.email,
|
||||
'email_type':'text',
|
||||
'merge_vars[FNAME]':partner.name ,
|
||||
|
@ -92,7 +93,8 @@ class mailchimp_account(osv.osv):
|
|||
'merge_vars[website]' : partner.website,
|
||||
'merge_vars[address][country]' : partner.country.code,
|
||||
'merge_vars[address][city]' : partner.city,
|
||||
'double_optin':False}
|
||||
'double_optin':False
|
||||
}
|
||||
vals[partner.id] = self.get_response(cr, uid, account_id,
|
||||
'listSubscribe', params)
|
||||
return vals
|
||||
|
@ -163,13 +165,15 @@ class marketing_campaign_activity(osv.osv):
|
|||
model_obj = self.pool.get(res_model).browse(cr, uid, res_id)
|
||||
params ={}
|
||||
if res_model == 'res.partner' :
|
||||
params.update({'email_address' : model_obj.email,
|
||||
params.update({
|
||||
'email_address' : model_obj.email,
|
||||
'merge_vars[FNAME]':model_obj.name and model_obj.name or '',
|
||||
'merge_vars[website]' : model_obj.website,
|
||||
'merge_vars[address][country]' : model_obj.country.code,
|
||||
})
|
||||
elif res_model == 'crm.lead' :
|
||||
params.update({'email_address' : model_obj.email_from,
|
||||
params.update({
|
||||
'email_address' : model_obj.email_from,
|
||||
'merge_vars[FNAME]':model_obj.partner_name and \
|
||||
model_obj.partner_name or '',
|
||||
'merge_vars[address][country]' : model_obj.country_id and \
|
||||
|
@ -177,14 +181,16 @@ class marketing_campaign_activity(osv.osv):
|
|||
})
|
||||
if params['email_address'] :
|
||||
user = mc_acc_obj.get_response(cr, uid, mailchimp_account_id,
|
||||
'listMemberInfo',
|
||||
{'id' : list_id,
|
||||
'email_address': params['email_address']})
|
||||
'listMemberInfo', {
|
||||
'id' : list_id,
|
||||
'email_address': params['email_address']
|
||||
})
|
||||
# if there s no user with the specify email it will return error code
|
||||
# and thus we add that user otherwise user is alredy subscribe and there
|
||||
# is no need to subscribe user again
|
||||
if 'error' in user:
|
||||
params.update({'id' : list_id,
|
||||
params.update({
|
||||
'id' : list_id,
|
||||
'email_type':'text',
|
||||
'double_optin':False,
|
||||
'merge_vars[date]' : time.strftime('%Y-%m-%d'),
|
||||
|
|
|
@ -8,4 +8,3 @@
|
|||
|
||||
</data>
|
||||
</openerp>
|
||||
<!--group_marketing_user-->
|
||||
|
|
|
@ -41,17 +41,14 @@ class create_list(osv.osv_memory):
|
|||
|
||||
def onchange_mailchimp_account_id(self, cr, uid, ids, mailchimp_account_id,
|
||||
action):
|
||||
print mailchimp_account_id,action,
|
||||
return {'value':{}}
|
||||
|
||||
def create_list(self, cr, uid, ids, context=None):
|
||||
create_list_obj = self.browse(cr, uid, ids[0])
|
||||
print create_list_obj.id
|
||||
mailchimp_account_obj = self.pool.get('mailchimp.account')
|
||||
account_id = create_list_obj.mailchimp_account_id
|
||||
lists = mailchimp_account_obj.get_response(cr, uid, account_id.id, 'lists')
|
||||
lists = dict([(l['name'],l['id']) for l in lists])
|
||||
print lists
|
||||
if create_list_obj.list_name not in lists.keys():
|
||||
raise osv.except_osv(_('UserError'),
|
||||
_('There is no list define in account %s') % (account_id.name))
|
||||
|
|
|
@ -11,9 +11,6 @@
|
|||
<newline/>
|
||||
<separator string="Partner" colspan="4"/>
|
||||
<field name="partner_ids" nolabel="1" colspan="4"/>
|
||||
<!--group ">
|
||||
<field name="mailchimp_list_id" />
|
||||
</group-->
|
||||
<group col="4" colspan="4">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="create_list" string="Update" type="object" icon="gtk-ok"/>
|
||||
|
|
|
@ -164,18 +164,4 @@ result = price_unit * 0.10"" name="python_compute"/>
|
|||
<field name="account_id" ref="account.a_sale"/>
|
||||
</record>
|
||||
</data>
|
||||
<!--
|
||||
<data>
|
||||
<workflow action="invoice_open" model="account.invoice" ref="account_invoice_2"/>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<workflow action="invoice_open" model="account.invoice" ref="account_invoice_1"/>
|
||||
</data>
|
||||
|
||||
|
||||
<data>
|
||||
<workflow action="invoice_open" model="account.invoice" ref="account_invoice_0"/>
|
||||
</data>
|
||||
-->
|
||||
</openerp>
|
||||
|
|
|
@ -454,7 +454,6 @@ class Product(osv.osv):
|
|||
'membership': fields.boolean('Membership', help='Specify if this product is a membership product'),
|
||||
'membership_date_from': fields.date('Date from', help='Active Membership since this date'),
|
||||
'membership_date_to': fields.date('Date to', help='Expired date of Membership'),
|
||||
# 'member_price':fields.float('Member Price'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
|
|
@ -167,16 +167,6 @@
|
|||
<menuitem name="Members" parent="menu_membership" id="menu_members" sequence="2" action="action_membership_members"/>
|
||||
|
||||
<!-- PARTNERS -->
|
||||
<!--
|
||||
<wizard
|
||||
string="Invoice Membership"
|
||||
model="res.partner"
|
||||
name="wizard_invoice_membership"
|
||||
id="wizard_invoice_membership"
|
||||
/>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_partner_tree">
|
||||
<field name="name">res.partner.tree.form.inherit</field>
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
'wizard/mrp_price_view.xml',
|
||||
'wizard/mrp_workcenter_load_view.xml',
|
||||
'wizard/mrp_change_standard_price_view.xml',
|
||||
# 'wizard/mrp_track_prod_view.xml',
|
||||
'mrp_view.xml',
|
||||
'mrp_report.xml',
|
||||
'company_view.xml',
|
||||
|
@ -84,7 +83,10 @@
|
|||
|
||||
|
||||
],
|
||||
'demo_xml': ['mrp_demo.xml', 'board_manufacturing_demo.xml'],
|
||||
'demo_xml': [
|
||||
'mrp_demo.xml',
|
||||
'board_manufacturing_demo.xml'
|
||||
],
|
||||
'test': [
|
||||
'test/mrp_packs.yml',
|
||||
'test/mrp_phantom_bom.yml',
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<!-- <record id="sc_manufacturing_dash" model="ir.ui.view_sc">
|
||||
<field name="name">Production dashboard</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="resource">ir.ui.menu</field>
|
||||
<field name="sequence">4</field>
|
||||
<field name="res_id" ref="menu_board_manufacturing"/>
|
||||
</record> -->
|
||||
<record id="base.user_root" model="res.users">
|
||||
<field name="action_id" ref="open_board_manufacturing"/>
|
||||
</record>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<menuitem id="menu_mrp_reordering" name="Automatic Procurements" parent="stock.menu_stock_root" sequence="5"/>
|
||||
<menuitem id="menu_mrp_manufacturing" name="Manufacturing" parent="base.menu_mrp_root" sequence="1"/>
|
||||
|
||||
<!-- <menuitem name="Control" id="menu_mrp_control" parent="base.menu_mrp_root" sequence="3" />-->
|
||||
<menuitem name="Master Data"
|
||||
id="menu_mrp_bom"
|
||||
parent="base.menu_mrp_root"
|
||||
|
@ -283,8 +282,6 @@
|
|||
<field name="view_id" ref="mrp_routing_tree_view"/>
|
||||
<field name="help">Routings define the assembly operations to be done in work centers for manufacturing a certain product. They are usually attached to bills of materials which will define the assembly of products required for manufacture or for finished products.</field>
|
||||
</record>
|
||||
<!-- <menuitem name="Routings" id="menu_mrp_routing_and_workcenters" parent="mrp.menu_mrp_bom" groups="base.group_extended"
|
||||
sequence="100" />-->
|
||||
<menuitem action="mrp_workcenter_action" id="menu_mrp_workcenter_action" parent="mrp.menu_mrp_property" groups="base.group_extended" sequence="40" />
|
||||
<menuitem action="mrp_routing_action" id="menu_mrp_routing_action" parent="mrp.menu_mrp_property" groups="base.group_extended" sequence="30"/>
|
||||
|
||||
|
@ -415,10 +412,6 @@
|
|||
|
||||
<!-- BOM menus -->
|
||||
|
||||
<!-- <menuitem name="Bill of Materials"
|
||||
id="menu_mrp_bom"
|
||||
parent="menu_mrp_bom"
|
||||
sequence="50" />-->
|
||||
<menuitem
|
||||
action="mrp_bom_form_action"
|
||||
id="menu_mrp_bom_form_action"
|
||||
|
@ -483,9 +476,6 @@
|
|||
|
||||
<menuitem action="procurement.procurement_action" id="menu_mrp_procurement_action"
|
||||
parent="mrp.menu_mrp_manufacturing" sequence="3" />
|
||||
<!-- <menuitem action="procurement.procurement_action5" id="menu_mrp_procurement_exception_action"-->
|
||||
<!-- parent="mrp.menu_mrp_control" sequence="1" />-->
|
||||
|
||||
<menuitem id="menu_mrp_scheduler" name="Schedulers" parent="base.menu_mrp_root" groups="base.group_system,mrp.group_mrp_user,mrp.group_mrp_manager" sequence="3"/>
|
||||
<menuitem action="procurement.action_compute_schedulers" id="mrp_Sched_all" parent="mrp.menu_mrp_scheduler" sequence="90" groups="base.group_system,mrp.group_mrp_user,mrp.group_mrp_manager"/>
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ import StringIO
|
|||
|
||||
|
||||
theme.use_color = 1
|
||||
#theme.scale = 2
|
||||
random.seed(0)
|
||||
|
||||
#
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
import mrp_product_produce
|
||||
import mrp_price
|
||||
import mrp_workcenter_load
|
||||
#import mrp_track_prod
|
||||
import change_production_qty
|
||||
import mrp_change_standard_price
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
</record>
|
||||
|
||||
<record id="process_node_workorder0" model="process.node">
|
||||
<!-- <field name="menu_id" ref="menu_mrp_production_operation_action"/>-->
|
||||
<field name="model_id" ref="mrp.model_mrp_production_workcenter_line"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Information from the routing definition."""" name="note"/>
|
||||
|
@ -39,7 +38,6 @@
|
|||
</record>
|
||||
|
||||
<record id="process_node_startoperation0" model="process.node">
|
||||
<!-- <field name="menu_id" ref="menu_mrp_production_operation_action"/>-->
|
||||
<field name="model_id" ref="mrp.model_mrp_production_workcenter_line"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Start the operation."""" name="note"/>
|
||||
|
@ -50,7 +48,6 @@
|
|||
</record>
|
||||
|
||||
<record id="process_node_doneoperation0" model="process.node">
|
||||
<!-- <field name="menu_id" ref="menu_mrp_production_operation_action"/>-->
|
||||
<field name="model_id" ref="mrp.model_mrp_production_workcenter_line"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Finish the operation."""" name="note"/>
|
||||
|
@ -61,7 +58,6 @@
|
|||
</record>
|
||||
|
||||
<record id="process_node_canceloperation0" model="process.node">
|
||||
<!-- <field name="menu_id" ref="menu_mrp_production_operation_action"/>-->
|
||||
<field name="model_id" ref="mrp.model_mrp_production_workcenter_line"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Cancel the operation."""" name="note"/>
|
||||
|
|
|
@ -50,13 +50,6 @@
|
|||
<field name="action">wkf_repair_done()</field>
|
||||
<field name="join_mode">XOR</field>
|
||||
</record>
|
||||
<!-- <record id="act_invoice" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf_repair"/>
|
||||
<field name="name">invoice</field>
|
||||
<field name="kind">subflow</field>
|
||||
<field name="subflow_id" search="[('name','=','account.invoice.basic')]"/>
|
||||
<field name="action">action_invoice_create()</field>
|
||||
</record> -->
|
||||
<record id="act_repair_start" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf_repair"/>
|
||||
<field name="name">Start Repair</field>
|
||||
|
@ -75,21 +68,6 @@
|
|||
<field name="kind">function</field>
|
||||
<field name="action">action_repair_end()</field>
|
||||
</record>
|
||||
|
||||
<!-- <record id="act_invoice_cancel" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf_repair"/>
|
||||
<field name="name">invoice_cancel</field>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="kind">stopall</field>
|
||||
<field name="action">action_cancel()</field>
|
||||
</record>
|
||||
<record id="act_invoice_except" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf_repair"/>
|
||||
<field name="name">invoice_except</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">action_invoice_cancel()</field>
|
||||
</record> -->
|
||||
|
||||
<record id="act_cancel" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf_repair"/>
|
||||
<field name="name">cancel</field>
|
||||
|
@ -133,12 +111,6 @@
|
|||
<field name="condition">(invoice_method=='after_repair' or invoice_method=='none')</field>
|
||||
</record>
|
||||
|
||||
<!-- <record id="trans_confirm_wait_invoice_shipping" model="workflow.transition">
|
||||
<field name="act_from" ref="act_wait_invoice"/>
|
||||
<field name="act_to" ref="act_invoice_end"/>
|
||||
<field name="condition">(invoice_method=='none')</field>
|
||||
</record> -->
|
||||
|
||||
<record id="trans_wait_invoice_invoice" model="workflow.transition">
|
||||
<field name="act_from" ref="act_wait_invoice"/>
|
||||
<field name="act_to" ref="act_invoice_end"/>
|
||||
|
|
|
@ -36,7 +36,10 @@ With this module:
|
|||
'website': 'http://www.openerp.com',
|
||||
'depends': ['base', 'mrp'],
|
||||
'init_xml': [],
|
||||
'update_xml': ['security/ir.model.access.csv', 'mrp_subproduct_view.xml'],
|
||||
'update_xml': [
|
||||
'security/ir.model.access.csv',
|
||||
'mrp_subproduct_view.xml'
|
||||
],
|
||||
'demo_xml': [],
|
||||
'test': ['test/mrp_subproduct.yml'],
|
||||
'installable': True,
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
'init_xml': [],
|
||||
'update_xml': [
|
||||
'res_company_view.xml'
|
||||
#'security/ir.model.access.csv',
|
||||
],
|
||||
'demo_xml': [
|
||||
'multi_company_demo.xml'
|
||||
|
|
|
@ -380,89 +380,6 @@
|
|||
<record id="base.res_partner_accent" model="res.partner">
|
||||
<field name="company_id" ref="res_company_oerp_be"/>
|
||||
</record>
|
||||
|
||||
<!-- CRM -->
|
||||
<!--
|
||||
<record id="crm.crm_case_claim01" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_be"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_claim02" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_us"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_claim03" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_be"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_claim04" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_in"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_claim05" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_be"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_claim06" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_us"/>
|
||||
</record>
|
||||
|
||||
<record id="crm.crm_case_construstazunits0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_be"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_rdroundfundingunits0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_be"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_mediapoleunits0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_us"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_abcfuelcounits0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_in"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_dirtminingltdunits0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_us"/>
|
||||
</record>
|
||||
-->
|
||||
<!--For Bug Tracking-->
|
||||
<!--
|
||||
<record id="crm.crm_case_buginaccountsmodule0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_be"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_programnotgivingproperoutput0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_us"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_outputincorrect0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_us"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_problemloadingpage0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_be"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_pagenotfound0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_in"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_programmingerror0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_be"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_logicalerrorinprogram0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_be"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_constrainterror0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_us"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_errorinprogram0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_be"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_newfeaturestobeadded0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_be"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_addmenustothemodule0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_be"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_includeattendancesheetinproject0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_be"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_createnewobject0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_be"/>
|
||||
</record>
|
||||
<record id="crm.crm_case_improvereportsinhrms0" model="crm.case">
|
||||
<field name="company_id" ref="res_company_oerp_in"/>
|
||||
</record>
|
||||
-->
|
||||
</data>
|
||||
<data noupdate="1">
|
||||
<record id="multi_company_default_productopenerpus0" model="multi_company.default">
|
||||
|
|
|
@ -46,8 +46,7 @@
|
|||
"data/olap_security.xml",
|
||||
'security/ir.model.access.csv'
|
||||
],
|
||||
"demo_xml" : ["data/olap_demo.xml"
|
||||
],
|
||||
"demo_xml" : ["data/olap_demo.xml"],
|
||||
"active": False,
|
||||
"installable": True
|
||||
}
|
||||
|
|
|
@ -83,7 +83,6 @@
|
|||
<newline/>
|
||||
<label align="0.0" string="This wizard will automatically configure the web client for Business Intelligence." width="200" colspan="2"/>
|
||||
</group>
|
||||
<!--separator string="" orientation="vertical" colspan="1" rowspan="12"/-->
|
||||
<group colspan="4">
|
||||
<separator string=" Business Intelligence Web Client" colspan="4"/>
|
||||
<field name="host_name" colspan="4"/>
|
||||
|
@ -99,18 +98,6 @@
|
|||
</group>
|
||||
</group>
|
||||
</form>
|
||||
<!--form string="Parameters Configure">
|
||||
<separator string="BI Web Client." colspan="4"/>
|
||||
<label string="This wizard will automatically configure the web client for BI." align="0.0" colspan="4"/>
|
||||
<field name="host_name" colspan="4"/>
|
||||
<field name="host_port" 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>
|
||||
</form-->
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
@ -389,11 +376,7 @@
|
|||
<field name="name" select="1" colspan="2"/>
|
||||
<field name="sequence" colspan="2"/>
|
||||
<field name="dimension_id" select="1" attrs="{'readonly':[('dimension_id','!=','')]}" colspan="4"/>
|
||||
<!-- <field name="field_name" select="2"/>-->
|
||||
|
||||
<field name="table_id" select="2" colspan="4" context="{'d_id':dimension_id}"/>
|
||||
<!-- <separator string="Levels" colspan="4"/>
|
||||
<field name="level_ids" colspan="4" nolabel="1"/>-->
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -41,16 +41,6 @@
|
|||
<field name="kind">function</field>
|
||||
<field name="action">action_dbready()</field>
|
||||
</record>
|
||||
<!--
|
||||
<record model="workflow.activity" id="act_dbdone">
|
||||
<field name="wkf_id" ref="wkf_schema"/>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="name">db_done</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">action_done()</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
|
||||
<record model="workflow.transition" id="trans_none_dbconnect">
|
||||
<field name="act_from" ref="act_none"/>
|
||||
|
@ -75,13 +65,6 @@
|
|||
<field name="act_to" ref="act_dbready"/>
|
||||
<field name="signal">dbready</field>
|
||||
</record>
|
||||
<!--
|
||||
<record model="workflow.transition" id="trans_dbready_done">
|
||||
<field name="act_from" ref="act_dbready"/>
|
||||
<field name="act_to" ref="act_dbdone"/>
|
||||
<field name="signal">dbdone</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -77,8 +77,6 @@
|
|||
<field name="fact_database_id" select="2"/>
|
||||
<field name="active"/>
|
||||
<field name="hide"/>
|
||||
<!-- <button name="show_col_view" string="Columns" type="object"/>-->
|
||||
|
||||
<button name="hide_col" string="Hide" type="object"/>
|
||||
<button name="show_col" string="Show" type="object"/>
|
||||
</tree>
|
||||
|
|
|
@ -10,16 +10,6 @@
|
|||
multi="True"
|
||||
id="bi_conf_cube_query_builder"/>
|
||||
|
||||
|
||||
<!-- <wizard
|
||||
string="Load Tables"
|
||||
model="olap.schema"
|
||||
name="olap.load.table"
|
||||
menu= "False"
|
||||
multi="True"
|
||||
id="bi_menu_olap_load_table"/>-->
|
||||
|
||||
|
||||
<wizard
|
||||
string="Load Tables"
|
||||
model="olap.schema"
|
||||
|
@ -50,6 +40,5 @@
|
|||
menu="False"
|
||||
id="bi_test_connection"/>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -33,12 +33,6 @@ import netsvc
|
|||
class wizard_load_configured_table(wizard.interface):
|
||||
def _get_table_data(self, cr, uid, data, context={}):
|
||||
pool_obj = pooler.get_pool(cr.dbname)
|
||||
|
||||
# vals={}
|
||||
# vals['configure']=True
|
||||
# vals['state']='dbconfigure'
|
||||
# pooler.get_pool(cr.dbname).get('olap.schema').write(cr,uid,data['id'],vals)
|
||||
|
||||
wf_service = netsvc.LocalService('workflow')
|
||||
wf_service.trg_validate(uid, 'olap.schema', data['id'], 'dbconfigure', cr)
|
||||
|
||||
|
|
|
@ -136,8 +136,6 @@ query_builder_form = """<?xml version="1.0"?>
|
|||
<field name="mdx_query_output" colspan="4" height="100" width="800"/>
|
||||
</form>"""
|
||||
query_builder_fields={
|
||||
|
||||
|
||||
'dimension':{'string':'Dimension','type':'text'},
|
||||
'hierarchy':{'string':'Hiearchy','type':'text'},
|
||||
'level':{'string':'Level','type':'text'},
|
||||
|
@ -185,10 +183,8 @@ def _execute_mdx(self, cr, uid, data, context):
|
|||
ok = True
|
||||
if not ok:
|
||||
continue
|
||||
#print ' '*COLSPAN,
|
||||
output =' '*COLSPAN
|
||||
log.add(output)
|
||||
# print (('%-'+str(ROWSPAN)+'s ' ) * len(axis[1])) % tuple(map(lambda x: str(len(x[0])==i and x[1] or ''),axis[1]))
|
||||
output=(('%-'+str(ROWSPAN)+'s ' ) * len(axis[1])) % tuple(map(lambda x: str(len(x[0])==i and x[1] or ''),axis[1]))
|
||||
log.add(output)
|
||||
|
||||
|
@ -197,23 +193,18 @@ def _execute_mdx(self, cr, uid, data, context):
|
|||
print "--------------------------------------",x
|
||||
temp=(axis[0].pop(0)[1])
|
||||
print "--------------------------------------",temp
|
||||
# print ('%-'+str(COLSPAN)+'s')% (' '*(len(axis[0][0][0])-1)*2 + (temp),),
|
||||
output =('%-'+str(COLSPAN)+'s')% (str(x)+str(temp))
|
||||
log.add("\n")
|
||||
log.add(output)
|
||||
#output=(temp)
|
||||
|
||||
for row in col:
|
||||
if row==[False]:
|
||||
# print ('%-'+str(ROWSPAN)+'s')%('',),
|
||||
output=('%-'+str(ROWSPAN)+'s')%('')
|
||||
log.add(output)
|
||||
|
||||
else:
|
||||
# print ('%-'+str(ROWSPAN)+'s')%(row,),
|
||||
output=('%-'+str(ROWSPAN)+'s')%(row)
|
||||
log.add(output)
|
||||
#print
|
||||
log.add("\n")
|
||||
return {'mdx_query_output':log()}
|
||||
|
||||
|
|
|
@ -456,7 +456,7 @@ Measures
|
|||
<field name="table_name">crm_case</field>
|
||||
<field name="agregator">sum</field>
|
||||
</record>
|
||||
d
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
|
|
@ -105,15 +105,7 @@ cube table and cube table line
|
|||
<field name="primary_key">True</field>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
<!-- <record model="olap.database.columns" id="columns_sale_order_line_product_id">
|
||||
<field name="name">product_id</field>
|
||||
<field name="column_db_name">id</field>
|
||||
<field name="type">int4</field>
|
||||
<field name="table_id" ref="table_sale_order_line"/>
|
||||
<field name="active">True</field>
|
||||
<field name="related_to" ref="table_product_product"/>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<record model="olap.database.columns" id="columns_product_template_id">
|
||||
<field name="name">id</field>
|
||||
<field name="column_db_name">id</field>
|
||||
|
@ -265,16 +257,6 @@ cube table and cube table line
|
|||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
<!-- <record model="olap.database.columns" id="columns_sale_order_line_product_id">
|
||||
<field name="name">product_id</field>
|
||||
<field name="column_db_name">product_id</field>
|
||||
<field name="type">int4</field>
|
||||
<field name="table_id" ref="table_sale_order_line"/>
|
||||
<field name="related_to" ref="table_product_product"/>
|
||||
<field name="active">True</field>
|
||||
|
||||
</record>
|
||||
-->
|
||||
<record model="olap.database.columns" id="columns_sale_order_line_order_id">
|
||||
<field name="name">order_id</field>
|
||||
<field name="column_db_name">order_id</field>
|
||||
|
@ -388,16 +370,6 @@ cube table and cube table line
|
|||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
<!-- <record model="olap.database.columns" id="columns_sale_order_line_product_id">
|
||||
<field name="name">product_id</field>
|
||||
<field name="column_db_name">product_id</field>
|
||||
<field name="type">int4</field>
|
||||
<field name="table_id" ref="table_sale_order_line"/>
|
||||
<field name="related_to" ref="table_product_product"/>
|
||||
<field name="active">True</field>
|
||||
|
||||
</record>
|
||||
-->
|
||||
<record model="olap.database.columns" id="columns_sale_order_line_product_uom_qty">
|
||||
<field name="name">product_uom_qty</field>
|
||||
<field name="column_db_name">product_uom_qty</field>
|
||||
|
|
|
@ -63,7 +63,6 @@ Main features :
|
|||
'wizard/pos_scan_product_view.xml',
|
||||
'wizard/pos_return_view.xml',
|
||||
'pos_report.xml',
|
||||
# 'pos_wizard.xml',
|
||||
'pos_view.xml',
|
||||
'report/report_pos_order_view.xml',
|
||||
'report/report_cash_register_view.xml',
|
||||
|
@ -76,7 +75,6 @@ Main features :
|
|||
'statement_data.xml',
|
||||
],
|
||||
'demo_xml': ['pos_demo.xml','singer_statement_demo.xml','multi_company_stock_data.xml'],
|
||||
# 'test':['test/pos_test.yml',],
|
||||
'installable': True,
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -310,7 +310,6 @@ class pos_order(osv.osv):
|
|||
'pickings': fields.one2many('stock.picking', 'pos_order', 'Picking', readonly=True),
|
||||
'picking_id': fields.many2one('stock.picking', 'Last Output Picking', readonly=True),
|
||||
'first_name': fields.char('First Name', size=64),
|
||||
# 'state_2': fields.function(_get_v,type='selection',selection=[('to_verify', 'To Verify'), ('accepted', 'Accepted'),('refused', 'Refused')], string='State', readonly=True, method=True, store=True),
|
||||
'note': fields.text('Internal Notes'),
|
||||
'nb_print': fields.integer('Number of Print', readonly=True),
|
||||
'sale_journal': fields.many2one('account.journal', 'Journal', required=True, states={'draft': [('readonly', False)]}, readonly=True, ),
|
||||
|
@ -353,7 +352,6 @@ class pos_order(osv.osv):
|
|||
'sale_manager': lambda self, cr, uid, context: uid,
|
||||
'state': lambda *a: 'draft',
|
||||
'price_type': lambda *a: 'tax_excluded',
|
||||
# 'state_2': lambda *a: 'to_verify',
|
||||
'name': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'pos.order'),
|
||||
'date_order': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'date_validity': lambda *a: (DateTime.now() + DateTime.RelativeDateTime(months=+6)).strftime('%Y-%m-%d'),
|
||||
|
@ -501,7 +499,6 @@ class pos_order(osv.osv):
|
|||
cr.execute("select s.id from stock_location s, stock_warehouse w where w.lot_stock_id=s.id and w.id= %d "%(order.shop_id.warehouse_id.id))
|
||||
res=cr.fetchone()
|
||||
location_id=res and res[0] or None
|
||||
# location_id = order and order.shop_id and order.shop_id.warehouse_id and order.shop_id.warehouse_id.lot_stock_id.id or None
|
||||
stock_dest_id = val.id
|
||||
if line.qty < 0:
|
||||
location_id, stock_dest_id = stock_dest_id, location_id
|
||||
|
@ -556,28 +553,6 @@ class pos_order(osv.osv):
|
|||
raise osv.except_osv(_('Error'), _('You don\'t have enough access to validate this sale!'))
|
||||
return True
|
||||
|
||||
# def button_validate(self, cr, uid, ids, *args):
|
||||
#
|
||||
# """ Check the access for the sale order and update the date_validation
|
||||
# @return: True
|
||||
# """
|
||||
# res_obj = self.pool.get('res.company')
|
||||
# try:
|
||||
# part_company=res_obj.browse(cr,uid,uid) and res_obj.browse(cr,uid,uid).parent_id and res_obj.browse######(cr,uid,uid).parent_id.id or None
|
||||
# except Exception, e:
|
||||
# raise osv.except_osv(_('Error'), _('You don\'t have enough access to validate this sale!'))
|
||||
# if part_company:
|
||||
# raise osv.except_osv(_('Error'), _('You don\'t have enough access to validate this sale!'))
|
||||
# for order in self.browse(cr, uid, ids):
|
||||
# if not order.date_validation:
|
||||
# cr.execute("select max(date) from account_bank_statement_line where pos_statement_id=%d"%(order.id))
|
||||
# val=cr.fetchone()
|
||||
# val=val and val[0] or None
|
||||
# if val:
|
||||
# cr.execute("Update pos_order set date_validation='%s', state_2 ='%s' where id = %d"%(val, 'accepted', order.id))
|
||||
# return True
|
||||
|
||||
|
||||
def cancel_order(self, cr, uid, ids, context=None):
|
||||
|
||||
""" Changes order state to cancel
|
||||
|
@ -601,8 +576,6 @@ class pos_order(osv.osv):
|
|||
if not order.num_sale and data['num_sale']:
|
||||
self.write(cr,uid,order_id,{'num_sale': data['num_sale']})
|
||||
ids_new=[]
|
||||
# if order.invoice_wanted and not order.partner_id:
|
||||
# raise osv.except_osv(_('Error'), _('Cannot create invoice without a partner.'))
|
||||
args = {
|
||||
'amount': data['amount'],
|
||||
}
|
||||
|
@ -954,9 +927,11 @@ class pos_order(osv.osv):
|
|||
for st in stat_l.move_ids:
|
||||
for s in st.line_id:
|
||||
if s.credit:
|
||||
account_move_line_obj.copy(cr, uid, s.id, { 'debit': s.credit,
|
||||
account_move_line_obj.copy(cr, uid, s.id, {
|
||||
'debit': s.credit,
|
||||
'statement_id': False,
|
||||
'credit': s.debit})
|
||||
'credit': s.debit
|
||||
})
|
||||
account_move_line_obj.copy(cr, uid, s.id, {
|
||||
'statement_id': False,
|
||||
'account_id':order_account
|
||||
|
@ -1180,17 +1155,6 @@ class pos_order_line(osv.osv):
|
|||
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
|
||||
}
|
||||
|
||||
# def _check_qty(self, cr, uid, ids):
|
||||
# lines = self.browse(cr, uid, ids)
|
||||
# for line in lines:
|
||||
# if line.qty <= 0:
|
||||
# return False
|
||||
# return True
|
||||
|
||||
# _constraints = [
|
||||
# (_check_qty, 'Order quantity cannot be negative or zero !', ['qty']),
|
||||
# ]
|
||||
|
||||
def create(self, cr, user, vals, context={}):
|
||||
if vals.get('product_id'):
|
||||
return super(pos_order_line, self).create(cr, user, vals, context)
|
||||
|
@ -1245,7 +1209,13 @@ class pos_order_line(osv.osv):
|
|||
line_id = order_line_id
|
||||
|
||||
price_line = float(qty)*float(price)
|
||||
return {'name': product_name, 'product_id': product_id[0], 'price': price, 'price_line': price_line ,'qty': qty }
|
||||
return {
|
||||
'name': product_name,
|
||||
'product_id': product_id[0],
|
||||
'price': price,
|
||||
'price_line': price_line ,
|
||||
'qty': qty
|
||||
}
|
||||
|
||||
pos_order_line()
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Sales Order POS">
|
||||
<group col="6" colspan="4">
|
||||
<!--field name="user_salesman_id" />
|
||||
<field name="partner_id" on_change="onchange_partner_pricelist(partner_id)"/>
|
||||
<field name="contract_number" groups="base.group_extended"/> -->
|
||||
|
||||
|
@ -23,13 +22,10 @@
|
|||
<tree string="Order lines" editable="bottom">
|
||||
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,qty,parent.partner_id)" width="275" />
|
||||
<field name="qty"/>
|
||||
<!--<field name="qty" on_change="onchange_qty(qty,price_unit)"/>-->
|
||||
<!--field name="qty_rfd" groups="base.group_extended"/-->
|
||||
<field name="price_ded" on_change="onchange_ded(price_ded, price_subtotal_incl,price_unit)" invisible="1"/>
|
||||
<field name="price_unit" readonly="1"/>
|
||||
<field name="discount" on_change="onchange_discount(discount,price_unit)" />
|
||||
<field name="notice" on_change="onchange_dis(qty,price_subtotal_incl,discount)"/>
|
||||
<!--field name="serial_number"/-->
|
||||
<field name="price_subtotal" />
|
||||
<field name="price_subtotal_incl" sum="Subtotal"/>
|
||||
</tree>
|
||||
|
@ -48,21 +44,8 @@
|
|||
<group colspan="4" col="7">
|
||||
<field name="amount_tax"/>
|
||||
<field name="amount_total"/>
|
||||
<!--button name="%(action_pos_discount)d" string="D_iscount" type="action" states="draft"/>
|
||||
<button name="dummy_button" string="Compute" type="object" /-->
|
||||
</group>
|
||||
|
||||
<!-- <group colspan="4" col="9" groups="base.group_extended">-->
|
||||
<!-- <separator colspan="4" string="Validation of the Sale"/>-->
|
||||
<!-- <newline/>-->
|
||||
<!-- <field name="state_2" />-->
|
||||
<!-- <button name="button_validate"-->
|
||||
<!-- string="Accept"-->
|
||||
<!-- type="object"-->
|
||||
<!-- icon="gtk-ok"-->
|
||||
<!-- states="paid, draft"-->
|
||||
<!-- attrs="{'invisible':[('state_2','=','accepted')]}"/>-->
|
||||
<!-- </group>-->
|
||||
<separator colspan="4" string="Actions"/>
|
||||
<group colspan="4" col="6">
|
||||
<field name="state" />
|
||||
|
@ -83,24 +66,17 @@
|
|||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="price_type" />
|
||||
<field name="user_id" string="Salesman" groups="base.group_extended"/>
|
||||
<!--field name="sale_manager" /-->
|
||||
</group>
|
||||
<group colspan="2" col="2" name="Type">
|
||||
<separator string="Dates" colspan="4"/>
|
||||
<field name="date_order"/>
|
||||
<field name="date_validation" />
|
||||
<field name="date_payment" groups="base.group_extended"/>
|
||||
<!-- <field name="type_rec" colspan="4"/>-->
|
||||
</group>
|
||||
<group colspan="4">
|
||||
<!-- <separator string="Invoicing" colspan="4"/>-->
|
||||
<field name="partner_id" on_change="onchange_partner_pricelist(partner_id)" invisible="1"/>
|
||||
<field name="sale_journal" domain="[('type','=','sale')]" widget="selection" invisible="1"/>
|
||||
<field name="pricelist_id" domain="[('type','=','sale')]" widget="selection" invisible="1"/>
|
||||
<!-- <field name="invoice_id"/>-->
|
||||
<!-- <group colspan="2" col="4">-->
|
||||
<!-- <button name="invoice" icon="gtk-execute" string="Create _Invoice" states="paid"/>-->
|
||||
<!-- </group>-->
|
||||
</group>
|
||||
|
||||
<field name="statement_ids" colspan="4" nolabel="1">
|
||||
|
@ -800,8 +776,6 @@
|
|||
id="products_for_output_operations"
|
||||
groups="base.group_system"/>
|
||||
|
||||
<!-- <menuitem name="Register Management" parent="menu_point_root"-->
|
||||
<!-- id="menu_point_config" sequence="4"/>-->
|
||||
<menuitem
|
||||
name="Input Operations" parent="menu_point_of_sale"
|
||||
string="Refloat"
|
||||
|
@ -866,40 +840,6 @@
|
|||
|
||||
<!-- Miscelleanous Operations/Reporting -->
|
||||
<menuitem name="Reporting" parent="menu_point_root" id="menu_point_rep" sequence="20" groups="group_pos_manager,base.group_system"/>
|
||||
<!-- <menuitem name="Registers" parent="menu_point_rep" id="menu_point_report_register" sequence="0" />
|
||||
<menuitem name="Sales" parent="menu_point_rep" id="menu_point_report_sale" sequence="1" />
|
||||
|
||||
<menuitem name="Details Of Operations" parent="menu_point_report_sale" id="menu_details_of_oper" sequence="1" groups="base.group_extended,group_pos_manager,base.group_system"/>
|
||||
<menuitem name="All Sales" parent="menu_details_of_oper"
|
||||
id="menu_action_all_sales_tree3" action="action_pos_order_tree3" sequence="1" groups="base.group_extended,base.group_system,group_pos_manager"/>
|
||||
<menuitem name="Sales of the day" parent="menu_action_all_sales_tree3"
|
||||
id="menu_action_sale_of_day_tree2" action="action_trans_pos_tree_today"/>
|
||||
<menuitem name="Accepted Sales" parent="menu_action_all_sales_tree3"
|
||||
id="menu_action_sale_of_day_accept" action="action_pos_order_accepted"/>
|
||||
|
||||
<menuitem name="Sales Reports" parent="menu_point_report_sale" id="menu_sales_report" sequence="2"/>
|
||||
|
||||
<menuitem name="Sales of the day" parent="menu_sales_report"
|
||||
action="action_trans_pos_tree_today" id="menu_trans_pos_tree_today"/>
|
||||
|
||||
<menuitem name="Sales of the month" parent="menu_sales_report"
|
||||
action="action_trans_pos_tree_month" id="menu_trans_pos_tree_month"/>
|
||||
|
||||
<menuitem name="All the sales" parent="menu_sales_report"
|
||||
action="action_trans_pos_tree" id="menu_trans_pos_tree"/>
|
||||
|
||||
<menuitem name="Sales by User" parent="menu_sales_report"
|
||||
action="action_report_sales_by_user_pos_today" id="menu_report_sales_by_user_pos_tree"/>
|
||||
|
||||
<menuitem name="Sales by User Monthly" parent="menu_sales_report"
|
||||
action="action_report_sales_by_user_pos_month" id="menu_report_sales_by_user_pos_month_tree"/>
|
||||
|
||||
<menuitem name="Sales by User Daily Margin" parent="menu_sales_report"
|
||||
action="action_report_sales_by_margin_pos_today" id="menu_report_sales_by_user_margin_daily_pos_tree"/>
|
||||
|
||||
<menuitem name="Sales by User Monthly Margin" parent="menu_sales_report"
|
||||
action="action_report_sales_by_margin_pos_month" id="menu_report_sales_by_user_pos_month_margin_tree"/>
|
||||
-->
|
||||
<!-- Invoice -->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_pos_invoice">
|
||||
|
@ -910,41 +850,9 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('origin','like','POS')]</field>
|
||||
</record>
|
||||
<!-- <menuitem name="All Invoices" parent="menu_details_of_oper"
|
||||
action="action_pos_invoice" id="menu_pos_invoice_tree"/>
|
||||
|
||||
<menuitem name="Payments and Sales" parent="menu_point_report_sale"
|
||||
id="menu_cashboxes_closing_tree" sequence="1"/>
|
||||
<menuitem name="Today" parent="menu_cashboxes_closing_tree"
|
||||
id="menu_cashboxes_by_day" sequence="1"/>
|
||||
|
||||
<menuitem name="All Sales Lines" parent="menu_details_of_oper"
|
||||
id="menu_action_pos_order_line" action="action_pos_order_line" sequence="2"/>
|
||||
|
||||
<menuitem name="Sales Lines of the day" parent="menu_action_pos_order_line"
|
||||
id="menu_action_pos_order_line_day" action="action_pos_order_line_day"/>
|
||||
|
||||
|
||||
<menuitem icon="STOCK_PRINT" action="action_report_pos_sale_user"
|
||||
id="menu_pos_sales_user" parent="menu_trans_pos_tree" sequence="3" groups="base.group_extended" />
|
||||
-->
|
||||
|
||||
<menuitem icon="STOCK_PRINT" action="action_report_pos_payment_repport_date"
|
||||
id="menu_pos_payment_report_date" parent="menu_point_rep" sequence="8" groups="base.group_extended"/>
|
||||
<!--
|
||||
<menuitem icon="STOCK_PRINT" action="action_report_pos_payment_report_user"
|
||||
id="menu_pos_payment_report_user" parent="menu_trans_pos_tree_today" sequence="6" groups="base.group_extended"/>
|
||||
<menuitem icon="STOCK_PRINT" action="action_pos_sales_user_today"
|
||||
id="menu_pos_sales_user_today" parent="menu_trans_pos_tree_today" sequence="2" groups="base.group_extended"/>
|
||||
|
||||
<menuitem icon="STOCK_PRINT" action="action_report_pos_payment_repport_date"
|
||||
id="menu_pos_payment_report_date" parent="menu_trans_pos_tree" sequence="5" groups="base.group_extended"/>
|
||||
|
||||
<menuitem icon="STOCK_PRINT" action="action_report_pos_payment_report_user"
|
||||
id="menu_pos_payment_report_user" parent="menu_trans_pos_tree_today" sequence="6" groups="base.group_extended"/>
|
||||
<menuitem icon="STOCK_PRINT" action="action_report_pos_sales_user_today_current_user"
|
||||
id="menu_pos_sales_user_today_current_user" parent="menu_cashboxes_by_day" sequence="7"/>
|
||||
-->
|
||||
<menuitem icon="STOCK_PRINT" action="action_report_pos_details"
|
||||
id="menu_pos_details" parent="menu_point_rep" sequence="6" />
|
||||
|
||||
|
|
|
@ -219,7 +219,6 @@
|
|||
<field name="act_from" ref="act_paid"/>
|
||||
<field name="act_to" ref="act_done"/>
|
||||
<field name="signal">done</field>
|
||||
<!-- <field name="role_id" ref="role_pos"/-->
|
||||
</record>
|
||||
|
||||
<record model="workflow.transition" id="trans_paid_invoice">
|
||||
|
|
|
@ -148,10 +148,8 @@ class report_sales_by_margin_pos(osv.osv):
|
|||
_description = "Sales by margin"
|
||||
_auto = False
|
||||
_columns = {
|
||||
# 'pos_name': fields.char('POS Order', size=64, readonly=True),
|
||||
'product_name':fields.char('Product Name', size=64, readonly=True),
|
||||
'date_order': fields.date('Order Date',required=True, select=True),
|
||||
# 'amount': fields.float('Total', readonly=True, select=True),
|
||||
'user_id': fields.many2one('res.users', 'User', readonly=True, select=True),
|
||||
'qty': fields.float('Qty', readonly=True, select=True),
|
||||
'net_margin_per_qty':fields.float('Net margin per Qty', readonly=True, select=True),
|
||||
|
@ -197,14 +195,12 @@ class report_sales_by_margin_pos_month(osv.osv):
|
|||
_description = "Sales by margin monthly"
|
||||
_auto = False
|
||||
_columns = {
|
||||
|
||||
'product_name':fields.char('Product Name', size=64, readonly=True),
|
||||
'date_order': fields.date('Order Date',required=True, select=True),
|
||||
'user_id': fields.many2one('res.users', 'User', readonly=True, select=True),
|
||||
'qty': fields.float('Qty', readonly=True, select=True),
|
||||
'net_margin_per_qty':fields.float('Net margin per Qty', readonly=True, select=True),
|
||||
'total':fields.float('Margin', readonly=True, select=True),
|
||||
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
|
|
|
@ -96,17 +96,6 @@ class pos_details(report_sxw.rml_parse):
|
|||
self.total_paid=res3[0]
|
||||
return res3[0] or False
|
||||
|
||||
# def _get_qty_total(self, objects):
|
||||
# #code for the sum of qty_total
|
||||
# return reduce(lambda acc, object:
|
||||
# acc + reduce(
|
||||
# lambda sum_qty, line:
|
||||
# sum_qty + line.qty,
|
||||
# object.lines,
|
||||
# 0),
|
||||
# objects,
|
||||
# 0)
|
||||
|
||||
def _get_sum_discount(self, objects):
|
||||
#code for the sum of discount value
|
||||
return reduce(lambda acc, object:
|
||||
|
@ -119,18 +108,6 @@ class pos_details(report_sxw.rml_parse):
|
|||
0.0)
|
||||
|
||||
def _get_payments(self, form,user, ignore_gift=False):
|
||||
# gift_journal_id = None
|
||||
# if ignore_gift:
|
||||
# config_journal_ids = self.pool.get("pos.config.journal").search(self.cr, self.uid, [('code', '=', 'GIFT')])
|
||||
# if len(config_journal_ids):
|
||||
# config_journal = self.pool.get("pos.config.journal").browse(self.cr, self.uid, config_journal_ids, {})[0]
|
||||
# gift_journal_id = config_journal.journal_id.id
|
||||
#
|
||||
# result = {}
|
||||
# for obj in objects:
|
||||
# for payment in obj.statement_ids:
|
||||
# result[payment.journal_id] = result.get(payment.journal_id, 0.0) + payment.amount
|
||||
# return result
|
||||
statement_line_obj = self.pool.get("account.bank.statement.line")
|
||||
gift_journal_id = None
|
||||
if ignore_gift:
|
||||
|
@ -200,13 +177,6 @@ class pos_details(report_sxw.rml_parse):
|
|||
temp.update({'amount':temp2})
|
||||
return [temp] or False
|
||||
|
||||
# def _get_period(self, form):
|
||||
# min_date = form['date_start']
|
||||
# max_date = form['date_end']
|
||||
# if min_date == max_date:
|
||||
# return '%s' % min_date
|
||||
# else:
|
||||
# return '%s - %s' % (min_date, max_date)
|
||||
def _get_period(self, form):
|
||||
return form['date_start']
|
||||
|
||||
|
|
|
@ -58,12 +58,6 @@ class pos_payment_report(report_sxw.rml_parse):
|
|||
|
||||
|
||||
def _pos_payment_total(self,o):
|
||||
# res=[]
|
||||
# self.cr.execute ("select sum(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) " \
|
||||
# "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \
|
||||
# "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
|
||||
# "and po.state='paid' and po.date_order = current_date and po.id=%d"%(o.id))
|
||||
# res=self.cr.fetchone()[0]
|
||||
return self.total
|
||||
|
||||
|
||||
|
|
|
@ -58,15 +58,6 @@ class pos_sales_user_today_current_user(report_sxw.rml_parse):
|
|||
return data
|
||||
|
||||
def _get_data_current_user_tot(self, user):
|
||||
# res={}
|
||||
# self.cr.execute("select sum(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) " \
|
||||
# "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt ,res_users as ru,res_company as rc " \
|
||||
# "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
|
||||
# "and po.date_order = current_date and po.user_id = ru.id and rc.id = %s and ru.id = %s " \
|
||||
# ,(str(self.uid),str(user.company_id.id)))
|
||||
#
|
||||
# res=self.cr.dictfetchone()
|
||||
# return res['sum']
|
||||
return self.total
|
||||
|
||||
def _get_data_current_user_qty(self, user):
|
||||
|
|
|
@ -39,8 +39,6 @@ class report_pos_order(osv.osv):
|
|||
('advance','Advance'),
|
||||
('paid', 'Paid'), ('done', 'Done'), ('invoiced', 'Invoiced'), ('cancel', 'Cancel')],
|
||||
'State'),
|
||||
# 'state_2': fields.function([('to_verify', 'To Verify'), ('accepted', 'Accepted'),
|
||||
# ('refused', 'Refused')], string='State'),
|
||||
'user_id':fields.many2one('res.users', 'Salesman', readonly=True),
|
||||
'price_total':fields.float('Total Price', readonly=True),
|
||||
'total_discount':fields.float('Total Discount', readonly=True),
|
||||
|
|
|
@ -78,9 +78,7 @@
|
|||
<filter string="Customer" icon="terp-personal" context="{'group_by':'partner_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
|
||||
<!--<filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>-->
|
||||
<separator orientation="vertical"/>
|
||||
<!--<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>-->
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
|
|
|
@ -1,21 +1,6 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- <wizard
|
||||
id="close_statement"
|
||||
model="account.bank.statement"
|
||||
menu="True"
|
||||
name="statement.close"
|
||||
string="Close Statements"/>
|
||||
<menuitem
|
||||
name="Close Register" parent="point_of_sale.menu_point_config"
|
||||
string="Close Register"
|
||||
action="close_statement"
|
||||
type="wizard"
|
||||
id="menu_close_statement" sequence="4" />
|
||||
|
||||
-->
|
||||
|
||||
<menuitem icon="STOCK_PRINT"
|
||||
action="action_report_all_closed_cashbox_of_the_day"
|
||||
id="menu_all_closed_cashbox_of_the_day"
|
||||
|
|
|
@ -109,7 +109,8 @@ class pos_box_entries(osv.osv_memory):
|
|||
if statement_id:
|
||||
statement_id = statement_id[0]
|
||||
if not statement_id:
|
||||
statement_id = statement_obj.create(cr, uid, {'date': time.strftime('%Y-%m-%d 00:00:00'),
|
||||
statement_id = statement_obj.create(cr, uid, {
|
||||
'date': time.strftime('%Y-%m-%d 00:00:00'),
|
||||
'journal_id': data['journal_id'],
|
||||
'company_id': curr_company,
|
||||
'user_id': uid,
|
||||
|
|
|
@ -102,7 +102,8 @@ class pos_box_out(osv.osv_memory):
|
|||
if statement_id:
|
||||
statement_id = statement_id[0]
|
||||
if not statement_id:
|
||||
statement_id = statement_obj.create(cr, uid, {'date': time.strftime('%Y-%m-%d 00:00:00'),
|
||||
statement_id = statement_obj.create(cr, uid, {
|
||||
'date': time.strftime('%Y-%m-%d 00:00:00'),
|
||||
'journal_id': data['journal_id'],
|
||||
'company_id': curr_company,
|
||||
'user_id': uid,
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
<field name="journal_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="amount"/>
|
||||
<!-- <field name="ref"/>-->
|
||||
<group colspan="4" col="2">
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Close" />
|
||||
|
|
|
@ -67,7 +67,8 @@ class pos_close_statement(osv.osv_memory):
|
|||
'view_mode': 'tree,form',
|
||||
'res_model': 'account.bank.statement',
|
||||
'views': [(id2, 'tree'),(id3, 'form')],
|
||||
'type': 'ir.actions.act_window'}
|
||||
'type': 'ir.actions.act_window'
|
||||
}
|
||||
|
||||
pos_close_statement()
|
||||
|
||||
|
|
|
@ -101,29 +101,6 @@ class pos_discount(osv.osv_memory):
|
|||
order_line_ref.write(cr, uid, [line.id], res_new, context=context)
|
||||
return {}
|
||||
|
||||
# def check_discount(self, cr, uid, record_id, discount, context):
|
||||
# """
|
||||
# Check the discount of define by company .
|
||||
# @param self: The object pointer.
|
||||
# @param cr: A database cursor
|
||||
# @param uid: ID of the user currently logged in
|
||||
# @param record_id:Current Order id
|
||||
# @param discount:Select Discount
|
||||
# @param context: A standard dictionary
|
||||
# @return : retrun to apply and used the company discount base on condition
|
||||
# """
|
||||
|
||||
# order_ref = self.pool.get('pos.order')
|
||||
#
|
||||
# for order in order_ref.browse(cr, uid, record_id, context=context):
|
||||
# company_disc = order.company_id.company_discount
|
||||
# for line in order.lines :
|
||||
# prod_disc = discount
|
||||
# if prod_disc <= company_disc :
|
||||
# return 'apply_discount'
|
||||
# else :
|
||||
# return 'disc_discount'
|
||||
|
||||
pos_discount()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -137,11 +137,6 @@ class pos_make_payment(osv.osv_memory):
|
|||
invoice_wanted = data['invoice_wanted']
|
||||
# Todo need to check ...
|
||||
|
||||
# if amount <= 0.0:
|
||||
# context.update({'flag':True})
|
||||
# order_obj.action_paid(cr, uid, [active_id], context)
|
||||
# return self.print_report(cr, uid, ids, context)
|
||||
|
||||
if amount != 0.0:
|
||||
order_obj.write(cr, uid, [active_id], {'invoice_wanted': invoice_wanted, 'partner_id': data['partner_id']})
|
||||
order_obj.add_payment(cr, uid, active_id, data, context=context)
|
||||
|
|
|
@ -28,13 +28,6 @@
|
|||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<!-- <act_window name="POS Details"
|
||||
res_model="pos.details"
|
||||
src_model="pos.order"
|
||||
view_mode="form"
|
||||
target="new"
|
||||
key2="client_action_multi"
|
||||
id="action_report_pos_details"/> -->
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -40,10 +40,6 @@ class pos_receipt(osv.osv_memory):
|
|||
@return: New arch of view with new columns.
|
||||
"""
|
||||
order_lst = self. pool.get('pos.order').browse(cr, uid, context['active_id'])
|
||||
# for order in order_lst:
|
||||
# if order.state_2 in ('to_verify'):
|
||||
# raise osv.except_osv(_('Error!', 'Can not print the receipt because of discount and/or payment '))
|
||||
# True
|
||||
|
||||
def print_report(self, cr, uid, ids, context=None):
|
||||
|
||||
|
|
|
@ -207,7 +207,8 @@ class pos_return(osv.osv_memory):
|
|||
'location_dest_id': stock_dest_id,
|
||||
'name': '%s (return)' %order_id.name,
|
||||
'date': date_cur,
|
||||
'date_planned': date_cur,})
|
||||
'date_planned': date_cur
|
||||
})
|
||||
line_obj.copy(cr, uid, line.id, {'qty': -qty, 'order_id': new_order})
|
||||
order_obj.write(cr,uid, [active_id,new_order], {'state': 'done'})
|
||||
wf_service.trg_validate(uid, 'stock.picking', new_picking, 'button_confirm', cr)
|
||||
|
@ -276,7 +277,8 @@ class add_product(osv.osv_memory):
|
|||
'move_lines':[],
|
||||
'state':'draft',
|
||||
'type':'out',
|
||||
'date':date_cur, })
|
||||
'date':date_cur
|
||||
})
|
||||
new_move=stock_move_obj.create(cr, uid, {
|
||||
'product_qty': qty,
|
||||
'product_uos_qty': uom_obj._compute_qty(cr, uid, prod_id.uom_id.id, qty, prod_id.uom_id.id),
|
||||
|
@ -287,7 +289,8 @@ class add_product(osv.osv_memory):
|
|||
'location_dest_id':stock_dest_id,
|
||||
'name':'%s (return)' %order_id.name,
|
||||
'date':date_cur,
|
||||
'date_planned':date_cur,})
|
||||
'date_planned':date_cur
|
||||
})
|
||||
|
||||
wf_service.trg_validate(uid, 'stock.picking', new_picking, 'button_confirm', cr)
|
||||
picking_obj.force_assign(cr, uid, [new_picking], context)
|
||||
|
@ -338,7 +341,8 @@ class add_product(osv.osv_memory):
|
|||
'name':'%s (return)' %order_id.name,
|
||||
'move_lines':[], 'state':'draft',
|
||||
'type':'in',
|
||||
'date':date_cur})
|
||||
'date':date_cur
|
||||
})
|
||||
for line in order_id.lines:
|
||||
key=('return%s') %line.id
|
||||
if line.id and data.has_key(key):
|
||||
|
@ -352,8 +356,10 @@ class add_product(osv.osv_memory):
|
|||
'location_dest_id':stock_dest_id,
|
||||
'name':'%s (return)' %order_id.name,
|
||||
'date':date_cur,
|
||||
'date_planned':date_cur,})
|
||||
lines_obj.write(cr,uid,[line.id],{'qty_rfd':(line.qty or 0.0) + data['return%s' %line.id],
|
||||
'date_planned':date_cur
|
||||
})
|
||||
lines_obj.write(cr,uid,[line.id], {
|
||||
'qty_rfd':(line.qty or 0.0) + data['return%s' %line.id],
|
||||
'qty':line.qty-(data['return%s' %line.id] or 0.0)
|
||||
})
|
||||
wf_service.trg_validate(uid, 'stock.picking',new_picking,'button_confirm', cr)
|
||||
|
@ -372,7 +378,6 @@ class add_product(osv.osv_memory):
|
|||
'target': 'new',
|
||||
'views': False,
|
||||
'type': 'ir.actions.act_window',
|
||||
|
||||
}
|
||||
return True
|
||||
|
||||
|
|
|
@ -31,13 +31,6 @@
|
|||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<!-- <act_window name="POS Details"
|
||||
res_model="pos.details"
|
||||
src_model="pos.order"
|
||||
view_mode="form"
|
||||
target="new"
|
||||
key2="client_action_multi"
|
||||
id="action_report_pos_details"/> -->
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -37,7 +37,10 @@
|
|||
'website': 'http://www.openerp.com',
|
||||
'depends': ['base'],
|
||||
'init_xml': [],
|
||||
'update_xml': ['security/ir.model.access.csv', 'process_view.xml'],
|
||||
'update_xml': [
|
||||
'security/ir.model.access.csv',
|
||||
'process_view.xml'
|
||||
],
|
||||
'demo_xml': [],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
|
|
|
@ -263,12 +263,5 @@
|
|||
res_model="stock.warehouse.orderpoint"
|
||||
src_model="procurement.order"/>
|
||||
|
||||
<!-- <act_window-->
|
||||
<!-- domain="[('id', '=', product_id)]"-->
|
||||
<!-- id="act_product_product_2_stock_warehouse_orderpoint"-->
|
||||
<!-- name="Product"-->
|
||||
<!-- res_model="product.product"-->
|
||||
<!-- src_model="procurement.order"/>-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -32,7 +32,6 @@ class procurement_compute(osv.osv_memory):
|
|||
proc_obj._procure_confirm(cr, uid, use_new_cursor=cr.dbname, context=context)
|
||||
finally:
|
||||
pass
|
||||
#cr.close()
|
||||
return {}
|
||||
|
||||
def procure_calculation(self, cr, uid, ids, context):
|
||||
|
|
|
@ -22,13 +22,5 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- <act_window name="Compute Procurements" -->
|
||||
<!-- res_model="procurement.order.compute"-->
|
||||
<!-- src_model="procurement.order"-->
|
||||
<!-- view_mode="form"-->
|
||||
<!-- target="new" -->
|
||||
<!-- key2="client_action_multi" -->
|
||||
<!-- id="act_compute_procurement"/> -->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
from osv import fields, osv
|
||||
|
||||
#from tools.misc import currency
|
||||
from _common import rounding
|
||||
import time
|
||||
from tools import config
|
||||
|
@ -93,8 +92,7 @@ class product_pricelist(osv.osv):
|
|||
res.append((type['key'],type['name']))
|
||||
|
||||
return res
|
||||
# cr.execute('select key,name from product_pricelist_type order by name')
|
||||
# return cr.fetchall()
|
||||
|
||||
_name = "product.pricelist"
|
||||
_description = "Pricelist"
|
||||
_columns = {
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
-->
|
||||
|
||||
<record id="process_node_product0" model="process.node">
|
||||
<!-- <field name="menu_id" ref="product.menu_products"/>-->
|
||||
<field name="model_id" ref="product.model_product_product"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Product"""" name="name"/>
|
||||
|
@ -28,7 +27,6 @@
|
|||
</record>
|
||||
|
||||
<record id="process_node_supplier0" model="process.node">
|
||||
<!-- <field name="menu_id" ref="product.menu_products"/>-->
|
||||
<field name="model_id" ref="product.model_product_supplierinfo"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Supplier Information"""" name="name"/>
|
||||
|
|
|
@ -289,7 +289,6 @@ class product_template(osv.osv):
|
|||
|
||||
_defaults = {
|
||||
'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'product.template', context=c),
|
||||
# 'company_id': lambda self, cr, uid, context: False, # Visible by all
|
||||
'type': lambda *a: 'product',
|
||||
'list_price': lambda *a: 1,
|
||||
'cost_method': lambda *a: 'standard',
|
||||
|
@ -476,8 +475,6 @@ class product_product(osv.osv):
|
|||
if not len(ids):
|
||||
return []
|
||||
def _name_get(d):
|
||||
#name = self._product_partner_ref(cr, user, [d['id']], '', '', context)[d['id']]
|
||||
#code = self._product_code(cr, user, [d['id']], '', '', context)[d['id']]
|
||||
name = d.get('name','')
|
||||
code = d.get('default_code',False)
|
||||
if code:
|
||||
|
|
|
@ -638,10 +638,6 @@
|
|||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="res_id" ref="product.menu_products"/>
|
||||
</record>
|
||||
<!--
|
||||
<menuitem action="product_template_action_tree" id="menu_templates" parent="product.menu_products" sequence="2"
|
||||
groups="product.group_product_variant" />
|
||||
-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -96,14 +96,11 @@ class report_custom(report_rml):
|
|||
else:
|
||||
res = pool.get('product.product').read(cr, uid, [x['id']])
|
||||
price = res[0]['list_price']
|
||||
# temp.append('<price name="%s %s" />'%(price_list[i][x['id']]*q[2]['name'],currency['currency_id'][1]))
|
||||
|
||||
temp.append('<price name="%.2f" />'%(price))
|
||||
i+=1
|
||||
pro.extend(temp)
|
||||
pro.append('</pro>')
|
||||
# categ.extend(pro)
|
||||
# categ.append('</categ>')
|
||||
product_xml.extend(pro)
|
||||
|
||||
product_xml.append('</product>')
|
||||
|
|
|
@ -44,7 +44,6 @@ class product_pricelist(report_sxw.rml_parse):
|
|||
qtys = 1
|
||||
|
||||
for i in range(1,6):
|
||||
# if form['qty'+str(i)] > 0 and form['qty'+str(i)] not in vals.values():
|
||||
vals['qty'+str(qtys)] = form['qty'+str(i)]
|
||||
qtys += 1
|
||||
lst.append(vals)
|
||||
|
|
|
@ -26,7 +26,10 @@
|
|||
"init_xml" : [],
|
||||
"demo_xml" : [],
|
||||
"description": "A module that add manufacturers and attributes on the product form",
|
||||
"update_xml" : ["security/ir.model.access.csv","product_manufacturer_view.xml"],
|
||||
"update_xml" : [
|
||||
"security/ir.model.access.csv",
|
||||
"product_manufacturer_view.xml"
|
||||
],
|
||||
"active": False,
|
||||
"installable": True
|
||||
}
|
||||
|
|
|
@ -34,7 +34,8 @@ the report has several options to help you get the data you need.
|
|||
'update_xml': [
|
||||
'security/ir.model.access.csv',
|
||||
'wizard/product_margin_view.xml',
|
||||
'product_margin_view.xml'],
|
||||
'product_margin_view.xml'
|
||||
],
|
||||
'demo_xml': [],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
|
|
|
@ -81,19 +81,12 @@ class sale_order_line(osv.osv):
|
|||
return res
|
||||
|
||||
product = product_obj.browse(cr, uid, product, context)
|
||||
# product_tmpl_id = product.product_tmpl_id.id
|
||||
# pricetype_id = pricelist_obj.browse(cr, uid, pricelist).version_id[0].items_id[0].base
|
||||
# field_name = 'list_price'
|
||||
# product_read = self.pool.get('product.template').read(cr, uid, product_tmpl_id, [field_name], context)
|
||||
# list_price = product_read[field_name]
|
||||
list_price = pricelist_obj.price_get(cr, uid, [pricelist],
|
||||
product.id, qty or 1.0, partner_id, {'uom': uom,'date': date_order })
|
||||
|
||||
pricelists = pricelist_obj.read(cr,uid,[pricelist],['visible_discount'])
|
||||
|
||||
old_uom = product.uos_id or product.uom_id
|
||||
# new_list_price = product_uom_obj._compute_price(cr,
|
||||
# uid, old_uom.id, list_price, uom)
|
||||
new_list_price = get_real_price(list_price, product.id, pricelist)
|
||||
if(len(pricelists)>0 and pricelists[0]['visible_discount'] and list_price[pricelist] != 0):
|
||||
discount = (new_list_price - price) / new_list_price * 100
|
||||
|
|
|
@ -25,7 +25,6 @@ class misc_tools_installer(osv.osv_memory):
|
|||
_inherit = 'res.config.installer'
|
||||
|
||||
_columns = {
|
||||
# Tools
|
||||
'lunch':fields.boolean('Lunch Orders',help='Installs tools for lunch module'),
|
||||
'subscription':fields.boolean('Recurring Documents',help='Installs tools for subscription module'),
|
||||
'survey':fields.boolean('Survey',help='Installs tools for survey module'),
|
||||
|
|
|
@ -6,14 +6,6 @@
|
|||
Administrator shortcut
|
||||
Demo user startup menu
|
||||
-->
|
||||
<!--record id="sc_account_dash" model="ir.ui.view_sc">
|
||||
<field name="name">project dashboard</field>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field name="resource">ir.ui.menu</field>
|
||||
<field name="sequence">3</field>
|
||||
<field name="res_id" ref="menu_board_project"/>
|
||||
</record-->
|
||||
|
||||
<record id="base.user_root" model="res.users">
|
||||
<field name="action_id" ref="open_board_project"/>
|
||||
</record>
|
||||
|
|
|
@ -89,15 +89,6 @@
|
|||
<field name="view_id" ref="project.view_project_message_tree"/>
|
||||
</record>
|
||||
|
||||
<!-- <record id="action_view_project_member_tree" model="ir.actions.act_window">
|
||||
<field name="name">Project's Members</field>
|
||||
<field name="res_model">resource.resource</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('resource_type','=','user')]</field>
|
||||
<field name="view_id" ref="resource.resource_resource_tree"/>
|
||||
</record>-->
|
||||
|
||||
<record id="board_project_form" model="ir.ui.view">
|
||||
<field name="name">board.project.form</field>
|
||||
<field name="model">board.board</field>
|
||||
|
|
|
@ -373,10 +373,6 @@ class task(osv.osv):
|
|||
return int(context['project_id'])
|
||||
return False
|
||||
|
||||
#_sql_constraints = [
|
||||
# ('remaining_hours', 'CHECK (remaining_hours>=0)', 'Please increase and review remaining hours ! It can not be smaller than 0.'),
|
||||
#]
|
||||
|
||||
def copy_data(self, cr, uid, id, default={}, context=None):
|
||||
default = default or {}
|
||||
default.update({'work_ids':[], 'date_start': False, 'date_end': False, 'date_deadline': False})
|
||||
|
|
|
@ -159,8 +159,6 @@
|
|||
<field name="domain">[('state','=','template')]</field>
|
||||
<field name="view_id" ref="view_project"/>
|
||||
</record>
|
||||
<!-- <menuitem id="menu_template_project_specification" parent="project.menu_definitions" name="Specification" sequence="1"/>-->
|
||||
<!-- <menuitem action="open_view_template_project" id="menu_template_project" parent="project.menu_template_project_specification" name="Specification Template"/>-->
|
||||
|
||||
<record id="view_task_work_form" model="ir.ui.view">
|
||||
<field name="name">project.task.work.form</field>
|
||||
|
|
|
@ -35,7 +35,8 @@ class project_task_delegate(osv.osv_memory):
|
|||
'new_task_description': fields.text('New Task Description', help="Reinclude the description of the task in the task of the user"),
|
||||
'planned_hours': fields.float('Planned Hours', help="Estimated time to close this task by the delegated user"),
|
||||
'planned_hours_me': fields.float('Hours to Validate', required=True, help="Estimated time for you to validate the work done by the user to whom you delegate this task"),
|
||||
'state': fields.selection([('pending','Pending'), ('done','Done'), ], 'Validation State', required=True, help="New state of your own task. Pending will be reopened automatically when the delegated task is closed"), }
|
||||
'state': fields.selection([('pending','Pending'), ('done','Done'), ], 'Validation State', required=True, help="New state of your own task. Pending will be reopened automatically when the delegated task is closed")
|
||||
}
|
||||
|
||||
def _get_name(self, cr, uid, context=None):
|
||||
if context is None:
|
||||
|
|
|
@ -51,18 +51,6 @@
|
|||
<field name="fn">field</field>
|
||||
</record>
|
||||
|
||||
<!-- Sequence is not impemented right.
|
||||
See http://tools.ietf.org/html/rfc5545#section-3.8.7.4
|
||||
Disabling..
|
||||
|
||||
<record model="basic.calendar.fields" id="map_todo_6">
|
||||
<field name="name" ref="caldav.field_todo_seq"/>
|
||||
<field name="type_id" ref="caldav.calendar_lines_todo" />
|
||||
<field name="field_id" search="[('name','=','sequence'),('model_id.model','=','calendar.todo')]" />
|
||||
<field name="fn">field</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<record model="basic.calendar.fields" id="map_todo_7">
|
||||
<field name="name" ref="caldav.field_todo_url"/>
|
||||
<field name="type_id" ref="caldav.calendar_lines_todo" />
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
<field name="res_model">project.gtd.context</field>
|
||||
</record>
|
||||
|
||||
<!-- <menuitem name="Time Management" id="menu_open_gtd_time" parent="project.menu_definitions" groups="group_project_getting"/>-->
|
||||
<menuitem name="Contexts" id="menu_open_gtd_time_contexts" groups="group_project_getting,base.group_system"
|
||||
parent="project.menu_tasks_config" action="open_gtd_context_tree"/>
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
view_mode="tree,form,calendar,graph"
|
||||
view_type="form"/>
|
||||
|
||||
<!--<menuitem id="menu_aftertask" name="Bug" parent="project.menu_main" visible="False"/>-->
|
||||
<menuitem name="Issues" id="menu_project_issue_track" parent="project.menu_project_management"
|
||||
action="project_issue_categ_act0" sequence="3"/>
|
||||
</data>
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
"project_long_term_workflow.xml",
|
||||
"wizard/project_compute_phases_view.xml",
|
||||
"wizard/project_compute_tasks_view.xml",
|
||||
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
|
|
|
@ -120,8 +120,6 @@ class project_phase(osv.osv):
|
|||
_constraints = [
|
||||
(_check_recursion,'Loops in phases not allowed',['next_phase_ids', 'previous_phase_ids']),
|
||||
(_check_dates, 'Phase start-date must be lower than phase end-date.', ['date_start', 'date_end']),
|
||||
#(_check_constraint_start, 'Phase must start-after constraint start Date.', ['date_start', 'constraint_date_start']),
|
||||
#(_check_constraint_end, 'Phase must end-before constraint end Date.', ['date_end', 'constraint_date_end']),
|
||||
]
|
||||
|
||||
def onchange_project(self, cr, uid, ids, project, context=None):
|
||||
|
@ -145,7 +143,6 @@ class project_phase(osv.osv):
|
|||
calendar_id = phase.project_id.resource_calendar_id and phase.project_id.resource_calendar_id.id or False
|
||||
resource_id = resource_obj.search(cr, uid, [('user_id', '=', phase.responsible_id.id)])
|
||||
if resource_id:
|
||||
# cal_id = resource_obj.browse(cr, uid, resource_id[0], context=context).calendar_id.id
|
||||
res = resource_obj.read(cr, uid, resource_id, ['calendar_id'], context=context)[0]
|
||||
cal_id = res.get('calendar_id', False) and res.get('calendar_id')[0] or False
|
||||
if cal_id:
|
||||
|
@ -168,7 +165,6 @@ class project_phase(osv.osv):
|
|||
calendar_id = phase.project_id.resource_calendar_id and phase.project_id.resource_calendar_id.id or False
|
||||
resource_id = resource_obj.search(cr, uid, [('user_id', '=', phase.responsible_id.id)], context=context)
|
||||
if resource_id:
|
||||
# cal_id = resource_obj.browse(cr, uid, resource_id[0], context=context).calendar_id.id
|
||||
res = resource_obj.read(cr, uid, resource_id, ['calendar_id'], context=context)[0]
|
||||
cal_id = res.get('calendar_id', False) and res.get('calendar_id')[0] or False
|
||||
if cal_id:
|
||||
|
|
|
@ -319,7 +319,6 @@
|
|||
<menuitem id="menu_resouce_allocation" action="act_resouce_allocation"
|
||||
name="Resource Allocations" parent="base.menu_project_long_term" sequence="2"/>
|
||||
|
||||
<!--<menuitem icon="terp-project" id="base.menu_main_pm" name="Project" sequence="10"/>-->
|
||||
<menuitem id="menu_pm_resources_project1"
|
||||
groups="base.group_extended,base.group_system"
|
||||
name="Resources" parent="project.menu_definitions" sequence="3"/>
|
||||
|
|
|
@ -76,8 +76,8 @@ class project_compute_phases(osv.osv_memory):
|
|||
leaves = wkcal.compute_leaves(cr, uid, calendar_id , resource.id, resource.calendar_id.id)
|
||||
if not phase.responsible_id:
|
||||
raise osv.except_osv(_('No responsible person assigned !'),_("You must assign a responsible person for phase '%s' !") % (phase.name,))
|
||||
phase_resource_obj = classobj((phase.responsible_id.name.encode('utf8')), (Resource,),
|
||||
{'__doc__': phase.responsible_id.name,
|
||||
phase_resource_obj = classobj((phase.responsible_id.name.encode('utf8')), (Resource,),{
|
||||
'__doc__': phase.responsible_id.name,
|
||||
'__name__': phase.responsible_id.name,
|
||||
'vacation': tuple(leaves),
|
||||
'efficiency': time_efficiency
|
||||
|
@ -117,9 +117,11 @@ class project_compute_phases(osv.osv_memory):
|
|||
# Write the calculated dates back
|
||||
ctx = context.copy()
|
||||
ctx.update({'scheduler': True})
|
||||
phase_obj.write(cr, uid, [phase.id], {'date_start': start_date.strftime('%Y-%m-%d'),
|
||||
'date_end': end_date.strftime('%Y-%m-%d')},
|
||||
context=ctx)
|
||||
phase_obj.write(cr, uid, [phase.id], {
|
||||
'date_start': start_date.strftime('%Y-%m-%d'),
|
||||
'date_end': end_date.strftime('%Y-%m-%d')
|
||||
}, context=ctx)
|
||||
|
||||
# Recursive call till all the next phases scheduled
|
||||
for phase in phase.next_phase_ids:
|
||||
if phase.state in ['draft', 'open', 'pending']:
|
||||
|
|
|
@ -74,7 +74,8 @@ class project_compute_tasks(osv.osv_memory):
|
|||
if resource.get('calendar_id', False):
|
||||
leaves = wkcal.compute_leaves(cr, uid, calendar_id , resource_id[0], resource['calendar_id'] and resource['calendar_id'][0] or False)
|
||||
time_efficiency = resource.get('time_efficiency')
|
||||
resources.append(classobj((user.name.encode('utf8')), (Resource,), {'__doc__': user.name,
|
||||
resources.append(classobj((user.name.encode('utf8')), (Resource,), {
|
||||
'__doc__': user.name,
|
||||
'__name__': user.name,
|
||||
'vacation': tuple(leaves),
|
||||
'efficiency': time_efficiency
|
||||
|
@ -132,10 +133,12 @@ class project_compute_tasks(osv.osv_memory):
|
|||
ctx = context.copy()
|
||||
ctx.update({'scheduler': True})
|
||||
user_id = user_obj.search(cr, uid, [('name', '=', t.booked_resource[0].__name__)])
|
||||
task_pool.write(cr, uid, [tasks[loop_no-1].id], {'date_start': s_date.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
task_pool.write(cr, uid, [tasks[loop_no-1].id], {
|
||||
'date_start': s_date.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'date_end': e_date.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'user_id': user_id[0]},
|
||||
context=ctx)
|
||||
'user_id': user_id[0]
|
||||
}, context=ctx)
|
||||
|
||||
loop_no +=1
|
||||
return {}
|
||||
|
||||
|
|
|
@ -64,8 +64,8 @@ class project_schedule_task(osv.osv_memory):
|
|||
if resource_cal:
|
||||
cal_id = phase.project_id.resource_calendar_id and phase.project_id.resource_calendar_id.id or False
|
||||
leaves = wkcal.compute_leaves(cr, uid, cal_id, res.id, resource_cal, context=context)
|
||||
resource_objs.append(classobj(res.user_id.name.encode('utf8'), (Resource,),
|
||||
{'__doc__': res.user_id.name,
|
||||
resource_objs.append(classobj(res.user_id.name.encode('utf8'), (Resource,),{
|
||||
'__doc__': res.user_id.name,
|
||||
'__name__': res.user_id.name,
|
||||
'vacation': tuple(leaves),
|
||||
'efficiency': resource_eff,
|
||||
|
@ -153,10 +153,12 @@ class project_schedule_task(osv.osv_memory):
|
|||
ctx = context.copy()
|
||||
ctx.update({'scheduler': True})
|
||||
user_id = user_obj.search(cr, uid, [('name', '=', t.booked_resource[0].__name__)])
|
||||
task_obj.write(cr, uid, [tasks[loop_no-1].id], {'date_start': s_date.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
task_obj.write(cr, uid, [tasks[loop_no-1].id], {
|
||||
'date_start': s_date.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'date_end': e_date.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'user_id': user_id[0]},
|
||||
context=ctx)
|
||||
'user_id': user_id[0]
|
||||
}, context=ctx)
|
||||
|
||||
loop_no += 1
|
||||
return {}
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ automatically created via sale orders.
|
|||
'depends': ['project', 'procurement', 'sale', 'mrp_jit'],
|
||||
'init_xml': [],
|
||||
'update_xml': ['project_mrp_workflow.xml',
|
||||
#'process/project_mrp_process.xml',
|
||||
'project_mrp_view.xml'
|
||||
],
|
||||
'demo_xml': [],
|
||||
|
|
|
@ -81,8 +81,6 @@
|
|||
<field name="account_id"/>
|
||||
<field name="amount" />
|
||||
<field name="amount_unit" />
|
||||
<!-- WIDGET MANY2MANY GIVES ERROR-->
|
||||
<!-- <field name="task_ids" colspan="4" nolabel="1" widget="many2many"/>-->
|
||||
<field name="task_ids" colspan="4" nolabel="1" mode="tree,form">
|
||||
<form string="Tasks">
|
||||
<group colspan="4" col="2">
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
-->
|
||||
|
||||
<record id="process_node_timesheettask0" model="process.node">
|
||||
<!-- <field name="menu_id" ref="hr_timesheet.menu_act_hr_timesheet_line_evry1_all_form"/>-->
|
||||
<field name="model_id" ref="hr_timesheet.model_hr_analytic_timesheet"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Timesheet task"""" name="name"/>
|
||||
|
|
|
@ -23,68 +23,6 @@ import mx.DateTime
|
|||
from osv import fields,osv
|
||||
import tools
|
||||
|
||||
#class task_report(osv.osv):
|
||||
# _name = "task.report"
|
||||
# _description = "Project task report"
|
||||
# _auto = False
|
||||
# _columns = {
|
||||
# 'name': fields.char('Task',size=64,required=False, readonly=True),
|
||||
# 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
|
||||
# ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
|
||||
# 'user_id':fields.many2one('res.users', 'User', readonly=True),
|
||||
# 'task_nbr': fields.float('Task Number', readonly=True),
|
||||
# 'task_hrs': fields.float('Task Hours', readonly=True),
|
||||
# 'task_progress': fields.float('Task Progress', readonly=True),
|
||||
# 'company_id' : fields.many2one('res.company', 'Company'),
|
||||
# 'task_state': fields.selection([('draft', 'Draft'),('open', 'Open'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done'),('no','No Task')], 'Status', readonly=True),
|
||||
# 'project_id':fields.many2one('project.project', 'Project'),
|
||||
# 'year': fields.char('Year',size=64,required=False, readonly=True),
|
||||
# 'date_start': fields.datetime('Starting Date',readonly=True),
|
||||
# 'date_end': fields.datetime('Ending Date',readonly=True),
|
||||
# 'date_deadline': fields.date('Deadline',readonly=True),
|
||||
# 'type': fields.many2one('project.task.type', 'Stage'),
|
||||
# 'priority' : fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Importance'),
|
||||
# 'assign_to': fields.many2one('res.users', 'Assigned to', readonly=True),
|
||||
# 'remaining_hrs': fields.float('Remaining Hours', readonly=True),
|
||||
# }
|
||||
#
|
||||
# def init(self, cr):
|
||||
# tools.sql.drop_view_if_exists(cr, 'task_report')
|
||||
# cr.execute('''
|
||||
# create or replace view task_report as (
|
||||
# select
|
||||
# min(t.id) as id,
|
||||
# to_char(t.create_date, 'YYYY') as year,
|
||||
# to_char(t.create_date,'MM') as month,
|
||||
# u.id as user_id,
|
||||
# u.company_id as company_id,
|
||||
# t.name as name,
|
||||
# t.project_id as project_id,
|
||||
# to_char(t.date_start,'YYYY/mm/dd') as date_start,
|
||||
# to_char(t.date_end,'YYYY/mm/dd') as date_end,
|
||||
# to_char(t.date_deadline,'YYYY/mm/dd') as date_deadline,
|
||||
# t.type as type,
|
||||
# t.priority as priority,
|
||||
# t.user_id as assign_to,
|
||||
# t.remaining_hours as remaining_hrs,
|
||||
# count(t.*) as task_nbr,
|
||||
# sum(t.planned_hours) as task_hrs,
|
||||
# sum(t.planned_hours * (100 - t.progress) / 100) as task_progress,
|
||||
# case when t.state is null then 'no' else t.state end as task_state
|
||||
# from
|
||||
# res_users u
|
||||
# left join
|
||||
# project_task t on (u.id = t.user_id)
|
||||
# where
|
||||
# u.active
|
||||
# group by
|
||||
# to_char(t.create_date, 'YYYY'),to_char(t.create_date,'MM'),u.id, u.company_id, t.state
|
||||
# ,t.name,t.project_id,t.type,t.priority,
|
||||
# t.user_id,t.remaining_hours,to_char(t.date_start,'YYYY/mm/dd'),to_char(t.date_end,'YYYY/mm/dd'),to_char(t.date_deadline,'YYYY/mm/dd')
|
||||
# )
|
||||
# ''')
|
||||
#task_report()
|
||||
|
||||
class report_timesheet_task_user(osv.osv):
|
||||
_name = "report.timesheet.task.user"
|
||||
_auto = False
|
||||
|
@ -125,7 +63,6 @@ class report_timesheet_task_user(osv.osv):
|
|||
'user_id': fields.many2one('res.users', 'User',readonly=True),
|
||||
'timesheet_hrs': fields.function(get_hrs_timesheet, method=True, string="Timesheet Hours"),
|
||||
'task_hrs': fields.function(_get_task_hours, method=True, string="Task Hours"),
|
||||
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
|
|
|
@ -7,122 +7,6 @@
|
|||
parent="hr.menu_hr_root"
|
||||
sequence="40" />
|
||||
|
||||
<!-- Tasks by projects and users
|
||||
|
||||
<record id="view_task_project_form" model="ir.ui.view">
|
||||
<field name="name">task.report.form</field>
|
||||
<field name="model">task.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Tasks by User">
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/>
|
||||
<field name="task_nbr" select="2"/>
|
||||
<field name="task_hrs" select="2"/>
|
||||
<field name="task_progress" select="2"/>
|
||||
<field name="task_state" select="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_task_project_graph" model="ir.ui.view">
|
||||
<field name="name">task.report.graph</field>
|
||||
<field name="model">task.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Tasks by User" type="bar">
|
||||
<field name="user_id"/>
|
||||
<field name="task_progress" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_task_project_tree" model="ir.ui.view">
|
||||
<field name="name">task.report.tree</field>
|
||||
<field name="model">task.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Tasks by User">
|
||||
<field name="date_start" select="1" invisible="1"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="project_id" select="1"/>
|
||||
<field name="assign_to" select="1"/>
|
||||
<field name="type" select="1" invisible="1"/>
|
||||
<field name="priority" select="1" invisible="1"/>
|
||||
<field name="date_end" select="1" invisible="1"/>
|
||||
<field name="month" select="1" invisible="1"/>
|
||||
<field name="year" select="1" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="remaining_hrs"/>
|
||||
<field name="date_deadline" invisible="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="task_nbr"/>
|
||||
<field name="task_hrs"/>
|
||||
<field name="task_progress"/>
|
||||
<field name="task_state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_report_task_search" model="ir.ui.view">
|
||||
<field name="name">task.report.search</field>
|
||||
<field name="model">task.report</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Tasks by User">
|
||||
<group col="10" colspan="4">
|
||||
<filter icon="terp-project" string="This Year" domain="[('year','=',time.strftime('%%Y'))]" help="Tasks performed in this year"/>
|
||||
<filter icon="terp-project" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Tasks performed in this month"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="project_id" select="1"/>
|
||||
<field name="user_id" select="1" widget="selection"/>
|
||||
<newline/>
|
||||
<group expand="1" string="Extended filters..." colspan="10" col="12" groups="base.group_extended">
|
||||
<filter icon="terp-project"
|
||||
string="Very urgent"
|
||||
domain="[('priority','=','0')]"/>
|
||||
<filter icon="terp-project"
|
||||
string="Urgent"
|
||||
domain="[('priority','=','1')]"/>
|
||||
<filter icon="terp-project"
|
||||
string="Medium"
|
||||
domain="[('priority','=','2')]"/>
|
||||
<filter icon="terp-project"
|
||||
string="Low"
|
||||
domain="[('priority','=','3')]"/>
|
||||
<filter icon="terp-project"
|
||||
string="Very Low"
|
||||
domain="[('priority','=','4')]"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="10" col="11" groups="base.group_extended">
|
||||
<filter string="User" icon="terp-project" context="{'group_by':'user_id'}" />
|
||||
<filter string="Project" icon="terp-project" context="{'group_by':'project_id'}" />
|
||||
<filter string="Company" icon="terp-project" context="{'group_by':'company_id'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" icon="terp-project" context="{'group_by':'task_state'}"/>
|
||||
<filter string="Stage" icon="terp-project" context="{'group_by':'type'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Month" icon="terp-project" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-project" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_project_task" model="ir.actions.act_window">
|
||||
<field name="name">Tasks</field>
|
||||
<field name="res_model">task.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="domain">[]</field>
|
||||
<field name="context">{"search_default_user_id":uid}</field>
|
||||
<field name="search_view_id" ref="view_report_task_search"/>
|
||||
</record>
|
||||
<menuitem id="base.menu_project_report" name="Reporting" parent="base.menu_main_pm" sequence="50"/>
|
||||
<menuitem action="action_project_task" id="menu_project_task_user_tree" parent="base.menu_project_report"/>
|
||||
-->
|
||||
<!-- Report for Users' Timesheet and Task Hours per Month -->
|
||||
|
||||
<record id="view_report_timesheet_task_user_tree" model="ir.ui.view">
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
-->
|
||||
|
||||
<record id="process_node_packinginvoice0" model="process.node">
|
||||
<!-- <field name="menu_id" ref="stock.menu_action_picking_tree"/>-->
|
||||
<field name="model_id" ref="stock.model_stock_picking"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Outgoing Products"""" name="name"/>
|
||||
|
@ -119,7 +118,6 @@
|
|||
</record>
|
||||
|
||||
<record id="process_node_productrecept0" model="process.node">
|
||||
<!-- <field name="menu_id" ref="stock.menu_action_picking_tree"/>-->
|
||||
<field name="model_id" ref="stock.model_stock_picking"/>
|
||||
<field eval=""""subflow"""" name="kind"/>
|
||||
<field eval=""""Incoming Products"""" name="name"/>
|
||||
|
|
|
@ -294,8 +294,8 @@ class purchase_order(osv.osv):
|
|||
if manager and not (manager.id in managers):
|
||||
managers.append(manager.id)
|
||||
for manager_id in managers:
|
||||
request.create(cr, uid,
|
||||
{'name' : "Purchase amount over the limit",
|
||||
request.create(cr, uid,{
|
||||
'name' : "Purchase amount over the limit",
|
||||
'act_from' : uid,
|
||||
'act_to' : manager_id,
|
||||
'body': 'Somebody has just confirmed a purchase with an amount over the defined limit',
|
||||
|
|
|
@ -51,10 +51,6 @@
|
|||
</assert>
|
||||
|
||||
<assert model="purchase.order" id="test_purchase_1" string="Test purchase's invoice has the same amount and is currently a draft">
|
||||
<!--
|
||||
<test expr="invoice_id.amount_untaxed == amount_untaxed" />
|
||||
<test expr="invoice_id.amount_total == amount_total" />
|
||||
-->
|
||||
<test expr="invoice_id.state">draft</test>
|
||||
</assert>
|
||||
|
||||
|
|
|
@ -33,11 +33,10 @@
|
|||
"demo_xml" : [],
|
||||
"update_xml" : ["wizard/purchase_requisition_partner_view.xml",
|
||||
"purchase_requisition_view.xml",
|
||||
"security/ir.model.access.csv","purchase_requisition_sequence.xml"],
|
||||
"active": False,
|
||||
"test":[
|
||||
# 'test/purchase_requisition.yml','test/purchase_requisition_exclusive.yml'
|
||||
"security/ir.model.access.csv","purchase_requisition_sequence.xml"
|
||||
],
|
||||
"active": False,
|
||||
"test":[],
|
||||
"installable": True
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
'depends': ['base', 'process'],
|
||||
'init_xml': [],
|
||||
'update_xml': [
|
||||
#'security/resource_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'resource_view.xml',
|
||||
],
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue