[MERGE] changes from atp branch.

bzr revid: abo@openerp.com-20120503150250-e510o4c2k0m606zz
This commit is contained in:
Antonin Bourguignon 2012-05-03 17:02:50 +02:00
commit d74b5a0962
15 changed files with 59 additions and 58 deletions

View File

@ -8,15 +8,15 @@
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<notebook position="inside">
<page string="Accounting">
<page string="Accounting" groups="base.group_user">
<group name="properties">
<separator string="Sales Properties" colspan="2"/>
<separator string="Purchase Properties" colspan="2"/>
<field name="property_account_income" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" attrs="{'readonly':[('sale_ok','=',0)]}"/>
<field name="property_account_expense" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" attrs="{'readonly':[('purchase_ok','=',0)]}"/>
</group>
<newline/>
<group colspan="2">
</group>
<newline/>
<group colspan="2">
<separator string="Sale Taxes" colspan="2"/>
<separator string="Purchase Taxes" colspan="2"/>
<field name="taxes_id" nolabel="1" colspan="2" attrs="{'readonly':[('sale_ok','=',0)]}"/>

View File

@ -76,8 +76,8 @@
<field name="section_id" widget="selection" />
<group colspan="2" col="4">
<field name="stage_id" domain="[('section_ids','=',section_id)]"/>
<button name="stage_previous" string="" type="object" icon="gtk-go-back" />
<button name="stage_next" string="" type="object" icon="gtk-go-forward" />
<button name="stage_previous" string="" type="object" icon="gtk-go-back" groups="base.group_user"/>
<button name="stage_next" string="" type="object" icon="gtk-go-forward" groups="base.group_user"/>
</group>
<newline />
<field name="priority"/>
@ -86,7 +86,7 @@
<group colspan="4" col="4">
<notebook>
<page string="Claim Description">
<group colspan="2" col="2">
<group colspan="2" col="2" groups="base.group_user">
<separator colspan="2" string="Claim Reporter"/>
<field name="partner_id" string="Partner"
on_change="onchange_partner_id(partner_id)" />

View File

@ -98,8 +98,8 @@
</field>
<field name="state" select="1" widget="statusbar" statusbar_visible="draft,confirm,done"/>
<group col="4" colspan="2">
<button string="Cancel Event" name="button_cancel" states="draft,confirm" type="object" icon="gtk-cancel"/>
<button string="Confirm Event" name="button_confirm" states="draft" type="object" icon="gtk-apply"/>
<button string="Cancel Event" name="button_cancel" states="draft,confirm" type="object" icon="gtk-cancel" groups="base.group_user"/>
<button string="Confirm Event" name="button_confirm" states="draft" type="object" icon="gtk-apply" groups="base.group_user"/>
<button string="Event Done" name="button_done" states="confirm" type="object" icon="gtk-jump-to"/>
<button string="Set To Draft" name="button_draft" states="cancel,done" type="object" icon="gtk-convert"/>
</group>
@ -120,8 +120,8 @@
<field name="register_attended"/>
</group>
<group col="2" colspan="2">
<separator string="Emails" colspan="2"/>
<field name="reply_to"/>
<separator string="Emails" colspan="2" groups="base.group_user"/>
<field name="reply_to" groups="base.group_user"/>
<field name="email_registration_id" domain="[('model_id.model','=','event.registration')]"/>
<field name="email_confirmation_id" domain="[('model_id.model','=','event.registration')]"/>
</group>

View File

@ -5,7 +5,7 @@
<!-- toplevel menu -->
<menuitem id="mail_feeds_main" name="Feeds" sequence="0"
web_icon="static/src/img/feeds.png"
web_icon_hover="static/src/img/feeds-hover.png" />
web_icon_hover="static/src/img/feeds-hover.png" groups="base.group_user"/>
<record id="mail_feeds_main" model="ir.ui.menu">
<field name="action" ref="action_mail_all_feeds"/>
</record>

View File

@ -91,12 +91,22 @@ class wizard(osv.osv_memory):
def _default_user_ids(self, cr, uid, context):
""" determine default user_ids from the active records """
def create_user_from_address(address):
return { # a user config based on a contact (address)
'name': address.name,
'user_email': extract_email(address.email),
'lang': address.parent_id and address.parent_id.lang or 'en_US',
'partner_id': address.parent_id and address.parent_id.id,
}
if isinstance(address, int):
res_partner_obj = self.pool.get('res.partner')
address = res_partner_obj.browse(cr, uid, address, context=context)
lang = address.id and address.lang or 'en_US'
partner_id = address.id
else:
lang = address.parent_id and address.parent_id.lang or 'en_US'
partner_id = address.parent_id and address.parent_id.id
return{
'name': address.name,
'user_email': extract_email(address.email),
'lang': lang,
'partner_id': partner_id,
}
user_ids = []
if context.get('active_model') == 'res.partner':
@ -107,6 +117,8 @@ class wizard(osv.osv_memory):
# add one user per contact, or one user if no contact
if p.child_ids:
user_ids.extend(map(create_user_from_address, p.child_ids))
elif p.is_company == False and p.customer == True:
user_ids.extend(map(create_user_from_address, [p.id]))
else:
user_ids.append({'lang': p.lang or 'en_US', 'parent_id': p.id})

View File

@ -2,15 +2,6 @@
<openerp>
<data>
<!-- <record model="ir.actions.act_window" id="action_event_view_main">
<field name="name">Events</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">event.event</field>
<field name="view_type">tree</field>
<field name="view_mode">kanban</field>
<field name="view_id" ref="event.view_event_kanban"/>
<field name="context">{"search_default_upcoming":1}</field>
</record> -->
<record id="action_mail_my_feeds" model="ir.actions.client">
<field name="name">My Feeds</field>
@ -25,10 +16,10 @@
<form string="DashBoard">
<board style="2-1">
<column>
<action name="%(board.action_res_widgets_tweets)d" string="Latest News" />
<action name="%(mail.action_mail_my_feeds)d" string="My Wall"/>
</column>
<column>
<action name="%(mail.action_mail_my_feeds)d" string="My Wall"/>
</column>
</board>
</form>

View File

@ -5,24 +5,18 @@
<menuitem name="Customer Portal" id="customer_portal"/>
<menuitem name="Address Book" id="customer_portal_address_book_main" parent="customer_portal" groups="group_sales_portal"/>
<menuitem name="Contacts" id="customer_portal_address_book" parent="customer_portal_address_book_main" action="base.action_partner_form"/>
<menuitem name="Track Orders" id="customer_portal_track_orders" parent="customer_portal" groups="group_sales_portal"/>
<menuitem name="Quotation" id="customer_portal_quotation" parent="customer_portal_track_orders" action="sale.action_order_tree5"/>
<menuitem name="Sales Orders" id="customer_portal_sales_orders" parent="customer_portal_track_orders" action="sale.action_order_form"/>
<menuitem name="Delivery Orders" id="customer_portal_delivery" parent="customer_portal_track_orders" action="action_picking_tree"/>
<menuitem name="Invoice and Payments" id="customer_portal_invoice_payements" parent="customer_portal" groups="group_sales_portal"/>
<menuitem name="Invoice" id="customer_portal_invoice" parent="customer_portal_invoice_payements" action="account.action_invoice_tree1"/>
<menuitem name="Payments" id="customer_portal_payments" parent="customer_portal_invoice_payements" action="account_voucher.action_vendor_receipt"/>
<menuitem name="Services" id="customer_portal_services" parent="customer_portal" groups="group_sales_portal"/>
<menuitem name="Products" id="customer_portal_products" parent="customer_portal_services" action="product_normal_action"/>
<menuitem name="After Sales Services" id="customer_portal_after_sales" parent="customer_portal" groups="group_sales_portal"/>
<menuitem name="Contact Us" id="customer_portal_contact" parent="customer_portal" groups="group_sales_portal"/>
<menuitem name="Contact Us" id="customer_portal_contact1" parent="customer_portal_contact" groups="group_sales_portal" action="action_contact_us" />
<menuitem name="Contact Us" id="customer_portal_contact1" parent="customer_portal_contact" groups="group_sales_portal" action="action_contact_us"/>
</data>
</openerp>

View File

@ -3,6 +3,6 @@
<data>
<menuitem name="Registration" id="customer_portal_registration" parent="portal_customer.customer_portal_track_orders" action="event.action_registration"/>
<menuitem name="Events" id="customer_portal_events" parent="portal_customer.customer_portal_services" action="event.action_event_view" />
<menuitem name="Events" id="event.menu_event_event" action="event.action_event_view" parent="base.menu_event_main" groups="base.group_sale_salesman"/>
<menuitem name="Events" id="event.menu_event_event" action="event.action_event_view" parent="base.menu_event_main" groups="base.group_user"/>
</data>
</openerp>

View File

@ -5,7 +5,7 @@
<record id="portal_event_rule" model="ir.rule">
<field name="name">Personal Events</field>
<field ref="event.model_event_event" name="model_id"/>
<field name="domain_force">[('registration_ids.email','=',user.login)]</field>
<field name="domain_force">[]</field>
<field name="groups" eval="[(4, ref('portal_customer.group_sales_portal'))]"/>
</record>

View File

@ -8,3 +8,5 @@ access_survey_history,survey_history,survey.model_survey_history,portal_customer
access_survey_question_column_heading,survey_question_column_heading,survey.model_survey_question_column_heading,portal_customer.group_sales_portal,1,0,0,0
access_survey_response_line,survey_response_line,survey.model_survey_response_line,portal_customer.group_sales_portal,1,1,1,0
access_survey_response_answer,survey_response_answer,survey.model_survey_response_answer,portal_customer.group_sales_portal,1,1,1,0
access_ir_attachment,ir.attachment,base.model_ir_attachment,portal_customer.group_sales_portal,1,0,1,0
access_mail_message,mail.message,mail.model_mail_message,portal_customer.group_sales_portal,1,1,1,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
8 access_survey_question_column_heading survey_question_column_heading survey.model_survey_question_column_heading portal_customer.group_sales_portal 1 0 0 0
9 access_survey_response_line survey_response_line survey.model_survey_response_line portal_customer.group_sales_portal 1 1 1 0
10 access_survey_response_answer survey_response_answer survey.model_survey_response_answer portal_customer.group_sales_portal 1 1 1 0
11 access_ir_attachment ir.attachment base.model_ir_attachment portal_customer.group_sales_portal 1 0 1 0
12 access_mail_message mail.message mail.model_mail_message portal_customer.group_sales_portal 1 1 1 0

View File

@ -283,7 +283,7 @@
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<group name="misc" position="after">
<group col="2" colspan="2" attrs="{'invisible':[('type', '=', 'service')]}">
<group col="2" colspan="2" attrs="{'invisible':[('type', '=', 'service')]}" groups="base.group_user">
<separator string="Minimum Stock Rules" colspan="2"/>
<field name="orderpoint_ids" context="{'default_product_uom': uom_id}" nolabel="1">
<tree string="Minimum Stock Rule" editable="bottom">

View File

@ -80,7 +80,7 @@
<field name="default_code"/>
<field name="ean13"/>
</group>
<group colspan="1" col="2">
<group colspan="1" col="2" groups="base.group_user">
<separator string="Characteristics" colspan="2"/>
<field name="sale_ok"/>
<field name="purchase_ok"/>
@ -95,7 +95,7 @@
<separator string="Procurement" colspan="2"/>
<field name="type"/>
<field name="procure_method"/>
<field name="supply_method"/>
<field name="supply_method" groups="base.group_user"/>
</group>
<group colspan="2" col="2">
<separator string="Base Prices" colspan="2"/>
@ -142,7 +142,7 @@
<field name="produce_delay"/>
<field name="warranty"/>
</group>
<group colspan="2" col="2" name="store">
<group colspan="2" col="2" name="store" groups="base.group_user">
<separator string="Storage Localisation" colspan="2"/>
<field name="loc_rack" attrs="{'readonly':[('type','=','service')]}" />
<field name="loc_row" attrs="{'readonly':[('type','=','service')]}"/>
@ -156,16 +156,16 @@
</group>
</page>
<page string="Suppliers">
<page string="Suppliers" groups="base.group_user">
<field colspan="4" name="seller_ids" nolabel="1" context="{'uom_id': uom_id}"/>
</page>
<page string="Descriptions">
<separator string="Description"/>
<field colspan="4" name="description" nolabel="1"/>
<separator string="Description" groups="base.group_user"/>
<field colspan="4" name="description" nolabel="1" groups="base.group_user"/>
<separator string="Sale Description"/>
<field colspan="4" name="description_sale" nolabel="1"/>
<separator string="Purchase Description"/>
<field colspan="4" name="description_purchase" nolabel="1"/>
<separator string="Purchase Description" groups="base.group_user"/>
<field colspan="4" name="description_purchase" nolabel="1" groups="base.group_user"/>
</page>
<page groups="product.group_stock_packaging" string="Packaging">
<field colspan="4" name="packaging" nolabel="1">

View File

@ -64,15 +64,15 @@
<field name="version_id" colspan="2" widget="selection"/>
<group colspan="2" col="4">
<field name="type_id" string="Stages" />
<button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
<button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
<button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage" groups="base.group_user"/>
<button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage" groups="base.group_user"/>
</group>
</group>
<notebook colspan="4">
<page string="General">
<group col="2" colspan="2">
<separator colspan="2" string="Contact Information"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)"/>
<group col="2" colspan="2" groups="base.group_user">
<separator colspan="2" string="Contact Information" groups="base.group_user"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)" />
<field name="email_from"/>
</group>
<group col="3" colspan="2">
@ -80,7 +80,7 @@
<field name="priority" colspan="3"/>
<field name="task_id" on_change="onchange_task_id(task_id)"/>
<button string="Convert To Task" name="convert_issue_task" icon="gtk-index" type="object"
attrs="{'invisible':[('task_id','!=',False)]}" />
attrs="{'invisible':[('task_id','!=',False)]}" groups="base.group_user"/>
<field name="progress" colspan="3" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
</group>
<separator string= "Description" colspan="4"/>
@ -260,7 +260,7 @@
<a string="Send New Email" name="%(mail.action_email_compose_message_wizard)d" icon="terp-mail-message-new" type="action"/>
<a string="Add Internal Note" name="%(crm.action_crm_add_note)d" context="{'model': 'crm.lead' }" icon="terp-document-new" type="action"/>
<a string="Escalate" name="case_escalate" icon="gtk-go-up" type="object"/>
<a string="Convert To Task" name="convert_issue_task" icon="gtk-index" type="object"/>
<a string="Convert To Task" name="convert_issue_task" icon="gtk-index" type="object" />
</div>
<div class="oe_kanban_right">
<a name="case_open" string="Open" states="draft,pending" type="object" icon="kanban-apply" />

View File

@ -132,7 +132,7 @@
</group>
<notebook colspan="5">
<page string="Sales Order">
<field name="partner_id" on_change="onchange_partner_id(partner_id)" domain="[('customer','=',True)]" context="{'search_default_customer':1}" required="1" groups="base.group_user"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id)" domain="[('customer','=',True)]" context="{'search_default_customer':1}" required="1" />
<field domain="[('parent_id','=',partner_id)]" name="partner_invoice_id" groups="sale.group_delivery_invoice_address" options='{"quick_create": false}'/>
<field domain="[('parent_id','=',partner_id)]" name="partner_shipping_id" groups="sale.group_delivery_invoice_address" options='{"quick_create": false}'/>
<field domain="[('type','=','sale')]" name="pricelist_id" groups="product.group_sale_pricelist" on_change="onchange_pricelist_id(pricelist_id,order_line)"/>

View File

@ -61,8 +61,10 @@
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<field name="standard_price" position="replace">
<label string="Cost Price :" align="1.0"/>
<group col="2" colspan="1">
<group groups="base.group_user">
<label string="Cost Price :" align="1.0"/>
</group>
<group col="2" colspan="1" groups="base.group_user">
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}" nolabel="1"/>
<button name="%(action_view_change_standard_price)d" string="Update"
type="action" icon="gtk-execute" attrs="{'invisible':[('cost_method','&lt;&gt;','average')]}"/>