Skip to content

Commit

Permalink
Merge remote-tracking branch 'odoo/master' into master-inline-searchv…
Browse files Browse the repository at this point in the history
…iew-ged
  • Loading branch information
ged-odoo committed May 30, 2014
2 parents 6f436a2 + 2f4984b commit 6b4a227
Show file tree
Hide file tree
Showing 131 changed files with 1,843 additions and 7,757 deletions.
File renamed without changes.
75 changes: 27 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,52 @@
About Odoo
==========
Odoo
----

Odoo is a suite of open source Business apps. More info at http://www.odoo.com
Odoo is a suite of web based open source business apps. More info at http://www.odoo.com

Installation
============
The easiest way to play with it is the <a href="https://www.odoo.com/page/start">Odoo free trial</a>, email registration is NOT required, use the "skip this step" link on the registration page to skip it.

[Setup/migration guide for employees](https://github.com/odoo/odoo/blob/master/doc/git.rst)

Getting started with Odoo developement
--------------------------------------

Migration from bazaar
=====================
If you are a developer type the following command at your terminal [1]:

If you have existing bazaar branches and want to move them to a git repository,
there are several options:
wget -O- https://raw.githubusercontent.com/odoo/odoo/master/odoo.py | python

* download http://nightly.openerp.com/move-branch.zip and run it with
`python move-branch.zip -h` (for the help). It should be able to convert
simple-enough branches for you (even if they have merge commits &al)
* Extract the branch contents as patches and use `git apply` or `git am` to
rebuild a branch from them
* Replay the branch by hand
Then follow <a href="https://doc.openerp.com/trunk/server/howto/howto_website/">the developer tutorial</a>

[1] You may want to check the content of the <a href="https://raw.githubusercontent.com/odoo/odoo/master/odoo.py">odoo.py file</a> before executing it.

System Requirements
-------------------

The dependencies are listed in setup.py
Packages, tarballs and installers
---------------------------------

* Debian packages

Debian/Ubuntu
-------------
Add this apt repository to your /etc/apt/sources.list file

Add the apt repository
deb http://nightly.openerp.com/8.0/deb/ ./

deb http://nightly.openerp.com/7.0/deb/ ./
Then type:

in your source.list and type:
$ sudo apt-get update
$ sudo apt-get install odoo

$ sudo apt-get update
$ sudo apt-get install openerp
* <a href="http://nightly.openerp.com/">Source tarballs</a>

Or download the deb file and type:
* <a href="http://nightly.openerp.com/">Windows installer</a>

$ sudo dpkg -i <openerp-deb-filename>
$ sudo apt-get install -f
* <a href="http://nightly.openerp.com/">RPM package</a>

RedHat, Fedora, CentOS
----------------------

Install the required dependencies:
For Odoo employees
------------------

$ yum install python
$ easy_install pip
$ pip install .....
To add the odoo-dev remote use this command:

Install the openerp rpm
$ ./odoo.py setup_git_dev

$ rpm -i openerp-VERSION.rpm
To fetch odoo merge pull requests refs use this command:

Windows
-------

Check the notes in setup.py


Setting up your database
------------------------

Point your browser to http://localhost:8069/ and click "Manage Databases", the
default master password is "admin".
$ ./odoo.py setup_git_review

2 changes: 1 addition & 1 deletion addons/crm_partner_assign/crm_partner_assign.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class res_partner(osv.osv):
'date_review_next' : fields.date('Next Partner Review'),
# customer implementation
'assigned_partner_id': fields.many2one(
'res.partner', 'Implementedy by',
'res.partner', 'Implemented by',
),
'implemented_partner_ids': fields.one2many(
'res.partner', 'assigned_partner_id',
Expand Down
1 change: 1 addition & 0 deletions addons/event_sale/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
'data': [
'event_sale_view.xml',
'event_sale_data.xml',
'security/ir.model.access.csv',
],
'demo': ['event_demo.xml'],
'test': ['test/confirm.yml'],
Expand Down
3 changes: 3 additions & 0 deletions addons/event_sale/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_event_event_ticket_user,event.event.ticket.user,event_sale.model_event_event_ticket,event.group_event_user,1,0,0,0
access_event_event_ticket_admin,event.event.ticket.admin,event_sale.model_event_event_ticket,event.group_event_manager,1,1,1,1
7 changes: 5 additions & 2 deletions addons/payment_paypal/models/paypal.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,12 @@ def paypal_compute_fees(self, cr, uid, id, amount, currency_id, country_id, cont
return 0.0
country = self.pool['res.country'].browse(cr, uid, country_id, context=context)
if country and acquirer.company_id.country_id.id == country.id:
fees = amount * (1 + acquirer.fees_dom_var / 100.0) + acquirer.fees_dom_fixed - amount
percentage = acquirer.fees_dom_var
fixed = acquirer.fees_dom_fixed
else:
fees = amount * (1 + acquirer.fees_int_var / 100.0) + acquirer.fees_int_fixed - amount
percentage = acquirer.fees_int_var
fixed = acquirer.fees_int_fixed
fees = (percentage / 100.0 * amount + fixed ) / (1 - percentage / 100.0)
return fees

def paypal_form_generate_values(self, cr, uid, id, partner_values, tx_values, context=None):
Expand Down
2 changes: 1 addition & 1 deletion addons/payment_paypal/tests/test_paypal.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def test_11_paypal_form_with_fees(self):
for form_input in tree.input:
if form_input.get('name') in ['handling']:
handling_found = True
self.assertEqual(form_input.get('value'), '1.56', 'paypal: wrong computed fees')
self.assertEqual(form_input.get('value'), '1.57', 'paypal: wrong computed fees')
self.assertTrue(handling_found, 'paypal: fees_active did not add handling input in rendered form')

@mute_logger('openerp.addons.payment_paypal.models.paypal', 'ValidationError')
Expand Down
25 changes: 14 additions & 11 deletions addons/web/static/src/js/views.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,16 +437,6 @@ instance.web.ActionManager = instance.web.Widget.extend({
ir_actions_act_window: function (action, options) {
var self = this;

if (action.target === 'current'){
action.context['active_model'] = action.res_model;
if (action.res_id){
action.context['active_id'] = action.res_id;
action.context['active_ids'] = [action.res_id];
} else{
delete action.context['active_id'];
delete action.context['active_ids'];
}
}
return this.ir_actions_common({
widget: function () { return new instance.web.ViewManagerAction(self, action); },
action: action,
Expand Down Expand Up @@ -898,7 +888,20 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
this._super(parent, null, action.views, flags);
this.session = parent.session;
this.action = action;
var dataset = new instance.web.DataSetSearch(this, action.res_model, action.context, action.domain);
var context = action.context;
if (action.target === 'current'){
var active_context = {
active_model: action.res_model,
};
context = new instance.web.CompoundContext(context, active_context).eval();
delete context['active_id'];
delete context['active_ids'];
if (action.res_id){
context['active_id'] = action.res_id;
context['active_ids'] = [action.res_id];
}
}
var dataset = new instance.web.DataSetSearch(this, action.res_model, context, action.domain);
if (action.res_id) {
dataset.ids.push(action.res_id);
dataset.index = 0;
Expand Down
4 changes: 4 additions & 0 deletions addons/website_blog/static/src/css/website_blog.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,7 @@ div#blog_angle_down a:hover {
mark + .popover {
cursor: pointer;
}

.discussion_scroll_post {
overflow-x: auto;
}
3 changes: 3 additions & 0 deletions addons/website_blog/static/src/css/website_blog.sass
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,6 @@ div#blog_angle_down

mark + .popover
cursor: pointer

.discussion_scroll_post
overflow-x: auto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<button class="btn btn-danger btn-xs js_publish_btn">Not Published</button>
<button class="btn btn-success btn-xs js_publish_btn">Published</button>
</div>
<div class="media-body">
<div class="media-body discussion_scroll_post">
<div t-esc='res.body'/>
<small class="text-muted">
by
Expand Down
2 changes: 1 addition & 1 deletion addons/website_blog/views/website_blog_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
"fields": ["name"]
}'/>
<span class="text-muted">on <span t-field="message.date"/></span>
<div t-field="message.body"/>
<div t-field="message.body" class="discussion_scroll_post"/>
</div>
</li>
</ul>
Expand Down
3 changes: 3 additions & 0 deletions addons/website_crm_partner_assign/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
'views/partner_grade.xml',
'views/website_crm_partner_assign.xml',
],
'demo': [
'data/res_partner_grade_demo.xml',
],
'qweb': ['static/src/xml/*.xml'],
'installable': True,
}
17 changes: 17 additions & 0 deletions addons/website_crm_partner_assign/data/res_partner_grade_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data noupdate="1">
<record id="crm_partner_assign.res_partner_grade_platinium" model="res.partner.grade">
<field name="website_published" eval="True" />
</record>
<record id="crm_partner_assign.res_partner_grade_gold" model="res.partner.grade">
<field name="website_published" eval="True" />
</record>
<record id="crm_partner_assign.res_partner_grade_silver" model="res.partner.grade">
<field name="website_published" eval="True" />
</record>
<record id="crm_partner_assign.res_partner_grade_bronze" model="res.partner.grade">
<field name="website_published" eval="True" />
</record>
</data>
</openerp>
21 changes: 10 additions & 11 deletions addons/website_event/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,22 @@
#
##############################################################################

from openerp import SUPERUSER_ID
from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp.tools.translate import _
from openerp.addons.website.controllers.main import Website as controllers
controllers = controllers()

import logging
_logger = logging.getLogger(__name__)

from datetime import datetime, timedelta
import time
from datetime import datetime, timedelta
from dateutil.relativedelta import relativedelta
from openerp import tools

import werkzeug.urls

from openerp import SUPERUSER_ID
from openerp import http
from openerp import tools
from openerp.http import request
from openerp.tools.translate import _
from openerp.addons.website.models.website import slug

_logger = logging.getLogger(__name__)

try:
import GeoIP
except ImportError:
Expand Down
1 change: 0 additions & 1 deletion addons/website_event_sale/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_event_event_ticket_public,event.event.ticket.public,event_sale.model_event_event_ticket,,1,0,0,0
access_event_event_ticket_admin,event.event.ticket.admin,event_sale.model_event_event_ticket,event.group_event_manager,1,1,1,1
access_event_product_product_public,event.product.product.public,product.model_product_product,base.group_public,1,0,0,0
access_event_product_template_public,event.product.template.public,product.model_product_template,base.group_public,1,0,0,0
4 changes: 1 addition & 3 deletions addons/website_mail/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def call(self, model, id, **post):
'is_user': uid != public_id,
'email': email,
'is_follower': False,
'alias_name': False,
}

if not obj:
Expand All @@ -95,8 +96,5 @@ def call(self, model, id, **post):
('res_id', '=', obj_ids[0]),
('partner_id', '=', partner_id.id)
], context=context)) == 1
if post.get('fields'):
record = obj.read(cr, SUPERUSER_ID, obj_ids[0], fields=post.get('fields'), context=context)
values.update(record)

return values
48 changes: 0 additions & 48 deletions addons/website_mail/views/snippets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -493,53 +493,5 @@

</template>


<template id="subscribe" inherit_id="website.snippets" name="Snippet Subscribe">

<xpath expr="//div[@id='snippet_content']" position="inside">
<div>
<div class="oe_snippet_thumbnail">
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_button.png"/>
<span class="oe_snippet_thumbnail_title">Subscribe Button</span>
</div>

<div class="oe_snippet_body js_follow"
data-id="0"
data-object="mail.group"
data-follow="off">
<div class="input-group js_mg_follow_form">
<input
type="email"
name="email"
class="js_follow_email form-control"
placeholder="your email..."/>
<span class="input-group-btn">
<button href="#" class="btn btn-primary js_follow_btn">Subscribe</button>
</span>
</div>
<p class="js_mg_details hidden well well-sm">
<i class="fa fa-envelope-o"/><a href="#" class="js_mg_email"> send mail</a> -
<i class="fa fa-file-o"/><a href="#" class="js_mg_link"> archives</a> -
<i class="fa fa-times"/><a href="#" class="js_unfollow_btn"> unsubscribe</a>
</p>
</div>

</div>
</xpath>


<xpath expr="//div[@id='snippet_options']" position="inside">
<div data-snippet-option-id='subscribe'
data-selector=".js_follow"
data-selector-siblings="p, h1, h2, h3, blockquote, .well, .panel"
>
<li>
<a href="#" class="button js_mailing_list">Change mailing list</a>
</li>
</div>
</xpath>

</template>

</data>
</openerp>
6 changes: 0 additions & 6 deletions addons/website_mail/views/website_mail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,9 @@

<template id="head" inherit_id="website.assets_frontend" name="Mail customization">
<xpath expr="/t" position="inside">
<script type="text/javascript" src="/website_mail/static/src/js/website_mail.js"></script>
<link rel='stylesheet' href='/website_mail/static/src/css/website_mail.css'/>
</xpath>
</template>
<template id="editor" inherit_id="website.assets_editor" name="Mail snippet">
<xpath expr="/t" position="inside">
<script type="text/javascript" src="/website_mail/static/src/js/website_mail.editor.js"></script>
</xpath>
</template>

</data>
</openerp>
3 changes: 2 additions & 1 deletion addons/website_mail_group/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
'author': 'OpenERP SA',
'depends': ['website_mail'],
'data': [
'views/website_mail_group.xml'
'views/website_mail_group.xml',
'views/snippets.xml',
],
'qweb': [],
'installable': True,
Expand Down
6 changes: 6 additions & 0 deletions addons/website_mail_group/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,9 @@ def render_messages(self, group, message, **post):
'replies_per_page': self._replies_per_page,
}
return request.registry['ir.ui.view'].render(request.cr, request.uid, 'website_mail_group.messages_short', values, engine='ir.qweb', context=request.context)

@http.route("/groups/<model('mail.group'):group>/get_alias_info", type='json', auth='public', website=True)
def get_alias_info(self, group, **post):
return {
'alias_name': group.alias_id and group.alias_id.alias_name and group.alias_id.alias_domain and '%s@%s' % (group.alias_id.alias_name, group.alias_id.alias_domain) or False
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6b4a227

Please sign in to comment.