[MERGE] merge with lp:openobject-addons

bzr revid: cha@tinyerp.com-20121105051224-8utjcmre8p0qsc30
This commit is contained in:
Ajay Chauhan (OpenERP)
2012-11-05 10:42:24 +05:30
107 changed files with 1731 additions and 526 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ class account_bank_statement(osv.osv):
return res
def _get_period(self, cr, uid, context=None):
periods = self.pool.get('account.period').find(cr, uid)
periods = self.pool.get('account.period').find(cr, uid,context=context)
if periods:
return periods[0]
return False
+3 -3
View File
@@ -78,7 +78,7 @@ class account_cash_statement(osv.osv):
"""
res = {}
for statement in self.browse(cr, uid, ids, context=context):
if statement.journal_id.type not in ('cash',):
if (statement.journal_id.type not in ('cash',)) or (not statement.journal_id.cash_control):
continue
start = end = 0
for line in statement.details_ids:
@@ -289,13 +289,13 @@ class account_cash_statement(osv.osv):
super(account_cash_statement, self).button_confirm_bank(cr, uid, ids, context=context)
absl_proxy = self.pool.get('account.bank.statement.line')
TABLES = (('Profit', 'profit_account_id'), ('Loss', 'loss_account_id'),)
TABLES = ((_('Profit'), 'profit_account_id'), (_('Loss'), 'loss_account_id'),)
for obj in self.browse(cr, uid, ids, context=context):
if obj.difference == 0.0:
continue
for item_label, item_account in TALBES:
for item_label, item_account in TABLES:
if getattr(obj.journal_id, item_account):
raise osv.except_osv(_('Error!'),
_('There is no %s Account on the journal %s.') % (item_label, obj.journal_id.name,))
+1 -1
View File
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-31 04:40+0000\n"
"X-Launchpad-Export-Date: 2012-11-03 05:03+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-11-01 04:36+0000\n"
"X-Launchpad-Export-Date: 2012-11-03 05:03+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-11-02 05:09+0000\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-11-02 05:09+0000\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account
+1 -1
View File
@@ -209,7 +209,7 @@ class res_partner(osv.osv):
relation='account.fiscal.position',
string="Fiscal Position",
view_load=True,
help="The fiscal position will determine taxes and the accounts used for the partner.",
help="The fiscal position will determine taxes and accounts used for the partner.",
),
'property_payment_term': fields.property(
'account.payment.term',
+5 -5
View File
@@ -30,14 +30,14 @@ class product_category(osv.osv):
relation='account.account',
string="Income Account",
view_load=True,
help="This account will be used for invoices to value sales for the current product category"),
help="This account will be used for invoices to value sales."),
'property_account_expense_categ': fields.property(
'account.account',
'account.account',
type='many2one',
relation='account.account',
string="Expense Account",
view_load=True,
help="This account will be used for invoices to value expenses for the current product category"),
help="This account will be used for invoices to value expenses."),
}
product_category()
@@ -60,14 +60,14 @@ class product_template(osv.osv):
relation='account.account',
string="Income Account",
view_load=True,
help="This account will be used for invoices instead of the default one to value sales for the current product"),
help="This account will be used for invoices instead of the default one to value sales for the current product."),
'property_account_expense': fields.property(
'account.account',
type='many2one',
relation='account.account',
string="Expense Account",
view_load=True,
help="This account will be used for invoices instead of the default one to value expenses for the current product"),
help="This account will be used for invoices instead of the default one to value expenses for the current product."),
}
product_template()
+5 -3
View File
@@ -49,9 +49,11 @@
<field name="inherit_id" ref="product.product_category_form_view"/>
<field name="arch" type="xml">
<data>
<xpath expr="/form/sheet//group[@name='account_property']" position="inside">
<field name="property_account_income_categ" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="property_account_expense_categ" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<xpath expr="//group[@name='parent']" position="inside">
<group name="account_property" string="Account Properties" colspan="2">
<field name="property_account_income_categ" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="property_account_expense_categ" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
</group>
</xpath>
</data>
</field>
@@ -94,8 +94,8 @@
<field name="state">open</field>
<field name="partner_id" ref="base.res_partner_19"/>
</record>
<record id="analytic_magasin_bml_1" model="account.analytic.account">
<field name="name">Magasin BML 1</field>
<record id="analytic_millennium_industries" model="account.analytic.account">
<field name="name">Millennium Industries</field>
<field name="parent_id" ref="analytic_integration"/>
<field name="type">normal</field>
<field name="partner_id" ref="base.res_partner_15"/>
@@ -121,8 +121,8 @@
<field name="parent_id" ref="analytic_customers"/>
<field name="partner_id" ref="base.res_partner_1"/>
</record>
<record id="analytic_distripc" model="account.analytic.account">
<field name="name">DistriPC</field>
<record id="analytic_deltapc" model="account.analytic.account">
<field name="name">Delta PC</field>
<field name="parent_id" ref="analytic_customers"/>
<field name="type">normal</field>
<field name="partner_id" ref="base.res_partner_4"/>
@@ -145,8 +145,8 @@
<field name="partner_id" ref="base.res_partner_17"/>
<field name="state">open</field>
</record>
<record id="analytic_leclerc" model="account.analytic.account">
<field name="name">Leclerc</field>
<record id="analytic_luminous_technologies" model="account.analytic.account">
<field name="name">Luminous Technologies</field>
<field eval="time.strftime('%Y-04-24')" name="date_start"/>
<field eval="str(time.localtime()[0] + 1) + '-04-24'" name="date"/>
<field name="type">normal</field>
@@ -161,8 +161,8 @@
<field name="parent_id" ref="analytic_partners"/>
<field name="partner_id" ref="base.res_partner_12"/>
</record>
<record id="analytic_tiny_at_work" model="account.analytic.account">
<field name="name">OpenERP SA AT Work</field>
<record id="analytic_think_big_systems" model="account.analytic.account">
<field name="name">Think Big Systems</field>
<field name="type">normal</field>
<field name="parent_id" ref="analytic_partners"/>
<field name="partner_id" ref="base.res_partner_18"/>
-1
View File
@@ -35,7 +35,6 @@
<field name="partner_id"/>
<field name="user_id"/>
<group expand="0" string="Group By...">
<filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Associated Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Parent Account" icon="terp-folder-green" domain="[]" context="{'group_by':'parent_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" groups="base.group_no_one"/>
@@ -277,7 +277,7 @@
<font color="white"> </font>
</para>
<section>
<para style="terp_default_Bold_9">[[ getLines(o) and removeParentNode('section')]]There is nothing due with this customer</para>
<para style="terp_default_Bold_9">[[ getLines(o) and removeParentNode('section')]]There is nothing due with this customer.</para>
</section>
<para style="terp_default_9">
<font color="white"> </font>
@@ -3,7 +3,7 @@
<menuitem id="base.menu_invoiced" name="Invoicing" parent="base.menu_base_partner" sequence="5"/>
<record id="action_hr_tree_invoiced_all" model="ir.actions.act_window">
<field name="name">Time &amp; Costs to Invoice</field>
<field name="name">Time &amp; Materials to Invoice</field>
<field name="res_model">account.analytic.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@@ -12,8 +12,10 @@
<field name="search_view_id" ref="account.view_account_analytic_line_filter"/>
<field name="help" type="html">
<p>
You will find here timesheets and purchases you did for contracts that can be reinvoiced to the customer.
If you want to record new jobs to invoice, you should use the timesheet menu instead.
You will find here timesheets and purchases you did for
contracts that can be reinvoiced to the customer. If you want
to record new activities to invoice, you should use the timesheet
menu instead.
</p>
</field>
</record>
+4 -4
View File
@@ -38,14 +38,14 @@ class product_category(osv.osv):
relation='account.account',
string="Income Account",
view_load=True,
help="This account will be used to value outgoing stock for the current product category using sale price"),
help="This account will be used to value outgoing stock using sale price."),
'property_account_expense_categ': fields.property(
'account.account',
type='many2one',
relation='account.account',
string="Expense Account",
view_load=True,
help="This account will be used to value outgoing stock for the current product category using cost price"),
help="This account will be used to value outgoing stock using cost price."),
}
product_category()
@@ -68,14 +68,14 @@ class product_template(osv.osv):
relation='account.account',
string="Income Account",
view_load=True,
help="This account will be used to value outgoing stock for the current product category using sale price"),
help="This account will be used to value outgoing stock using sale price."),
'property_account_expense': fields.property(
'account.account',
type='many2one',
relation='account.account',
string="Expense Account",
view_load=True,
help="This account will be used to value outgoing stock for the current product category using cost price"),
help="This account will be used to value outgoing stock using cost price."),
}
product_template()
+2 -2
View File
@@ -29,10 +29,10 @@
<record id="view_category_property_form" model="ir.ui.view">
<field name="name">product.category.property.form.inherit.stock</field>
<field name="model">product.category</field>
<field name="inherit_id" ref="product.product_category_form_view"/>
<field name="inherit_id" ref="account.view_category_property_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="/form/sheet//group[@name='account_property']" position="inside">
<xpath expr="//field[@name='property_account_income_categ']" position="before">
<field name="property_account_creditor_price_difference_categ" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
</xpath>
</data>
+15 -5
View File
@@ -134,10 +134,11 @@ class account_asset_asset(osv.osv):
def compute_depreciation_board(self, cr, uid, ids, context=None):
depreciation_lin_obj = self.pool.get('account.asset.depreciation.line')
currency_obj = self.pool.get('res.currency')
for asset in self.browse(cr, uid, ids, context=context):
if asset.value_residual == 0.0:
continue
posted_depreciation_line_ids = depreciation_lin_obj.search(cr, uid, [('asset_id', '=', asset.id), ('move_check', '=', True)])
posted_depreciation_line_ids = depreciation_lin_obj.search(cr, uid, [('asset_id', '=', asset.id), ('move_check', '=', True)],order='depreciation_date desc')
old_depreciation_line_ids = depreciation_lin_obj.search(cr, uid, [('asset_id', '=', asset.id), ('move_id', '=', False)])
if old_depreciation_line_ids:
depreciation_lin_obj.unlink(cr, uid, old_depreciation_line_ids, context=context)
@@ -148,7 +149,12 @@ class account_asset_asset(osv.osv):
else:
# depreciation_date = 1st January of purchase year
purchase_date = datetime.strptime(asset.purchase_date, '%Y-%m-%d')
depreciation_date = datetime(purchase_date.year, 1, 1)
#if we already have some previous validated entries, starting date isn't 1st January but last entry + method period
if (len(posted_depreciation_line_ids)>0):
last_depreciation_date = datetime.strptime(depreciation_lin_obj.browse(cr,uid,posted_depreciation_line_ids[0],context=context).depreciation_date, '%Y-%m-%d')
depreciation_date = (last_depreciation_date+relativedelta(months=+asset.method_period))
else:
depreciation_date = datetime(purchase_date.year, 1, 1)
day = depreciation_date.day
month = depreciation_date.month
year = depreciation_date.year
@@ -158,6 +164,10 @@ class account_asset_asset(osv.osv):
for x in range(len(posted_depreciation_line_ids), undone_dotation_number):
i = x + 1
amount = self._compute_board_amount(cr, uid, asset, i, residual_amount, amount_to_depr, undone_dotation_number, posted_depreciation_line_ids, total_days, depreciation_date, context=context)
company_currency = asset.company_id.currency_id.id
current_currency = asset.currency_id.id
# compute amount into company currency
amount = currency_obj.compute(cr, uid, current_currency, company_currency, amount, context=context)
residual_amount -= amount
vals = {
'amount': amount,
@@ -191,7 +201,7 @@ class account_asset_asset(osv.osv):
def _amount_residual(self, cr, uid, ids, name, args, context=None):
cr.execute("""SELECT
l.asset_id as id, round(SUM(abs(l.debit-l.credit))) AS amount
l.asset_id as id, SUM(abs(l.debit-l.credit)) AS amount
FROM
account_move_line l
WHERE
@@ -349,8 +359,8 @@ class account_asset_depreciation_line(osv.osv):
'sequence': fields.integer('Sequence', required=True),
'asset_id': fields.many2one('account.asset.asset', 'Asset', required=True),
'parent_state': fields.related('asset_id', 'state', type='char', string='State of Asset'),
'amount': fields.float('Depreciation Amount', required=True),
'remaining_value': fields.float('Amount to Depreciate', required=True),
'amount': fields.float('Depreciation Amount', digits_compute=dp.get_precision('Account'), required=True),
'remaining_value': fields.float('Amount to Depreciate', digits_compute=dp.get_precision('Account'),required=True),
'depreciated_value': fields.float('Amount Already Depreciated', required=True),
'depreciation_date': fields.date('Depreciation Date', select=1),
'move_id': fields.many2one('account.move', 'Depreciation Entry'),
@@ -284,7 +284,7 @@
<record model="ir.ui.view" id="view_account_analytic_account_form_inherit_budget">
<field name="name">account.analytic.account.form.inherot.budget</field>
<field name="name">account.analytic.account.form.inherit.budget</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
<field name="arch" type="xml">
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-31 04:40+0000\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account_payment
+4 -1
View File
@@ -305,7 +305,10 @@ class account_analytic_account(osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_post(cr, uid, [obj.id], body=_("Contract for <em>%s</em> has been <b>created</b>.") % (obj.partner_id.name),
message = _("Contract <b>created</b>.")
if obj.partner_id:
message = _("Contract for <em>%s</em> has been <b>created</b>.") % (obj.partner_id.name,)
self.message_post(cr, uid, [obj.id], body=message,
subtype="analytic.mt_account_status", context=context)
account_analytic_account()
+2 -2
View File
@@ -23,11 +23,11 @@
<group>
<field name="partner_id" on_change="on_change_partner_id(partner_id, name)"/>
<field name="manager_id"/>
<field name="code"/>
<field name="currency_id" attrs="{'invisible': ['|',('type', '&lt;&gt;', 'view'), ('company_id', '&lt;&gt;', False)]}"/>
</group>
<group>
<field name="type"/>
<field name="code"/>
<field name="type" invisible="context.get('default_type', False)"/>
<field name="parent_id" on_change="on_change_parent(parent_id)" attrs="{'invisible': [('type','in',['contract','template'])]}"/>
<field name="template_id" on_change="on_change_template(template_id,context)" domain="[('type','=','template')]" attrs="{'invisible': [('type','in',['view', 'normal','template'])]}" context="{'default_type' : 'template'}"/>
<field name="company_id" on_change="on_change_company(company_id)" widget="selection" groups="base.group_multi_company" attrs="{'required': [('type','&lt;&gt;','view')]}"/>
+12 -17
View File
@@ -20,11 +20,10 @@
##############################################################################
import logging
import werkzeug
import openerp
from openerp.modules.registry import RegistryManager
from openerp.addons.web.controllers.main import login_and_redirect
from ..res_users import SignupError
_logger = logging.getLogger(__name__)
@@ -41,22 +40,18 @@ class Controller(openerp.addons.web.http.Controller):
user_info = res_partner.signup_retrieve_info(cr, openerp.SUPERUSER_ID, token)
return user_info
@openerp.addons.web.http.httprequest
def signup(self, req, dbname, token, name, login, password, state=''):
""" sign up a user (new or existing), and log it in """
url = '/'
@openerp.addons.web.http.jsonrequest
def signup(self, req, dbname, token, name, login, password):
""" sign up a user (new or existing)"""
registry = RegistryManager.get(dbname)
with registry.cursor() as cr:
res_users = registry.get('res.users')
values = {'name': name, 'login': login, 'password': password}
try:
res_users = registry.get('res.users')
values = {'name': name, 'login': login, 'password': password}
credentials = res_users.signup(cr, openerp.SUPERUSER_ID, values, token)
cr.commit()
return login_and_redirect(req, *credentials, redirect_url='/#%s'%state)
except Exception as e:
# signup error
_logger.exception('error when signup')
url = "/#action=login&error_message=%s" % werkzeug.urls.url_quote(e.message)
return werkzeug.utils.redirect(url)
res_users.signup(cr, openerp.SUPERUSER_ID, values, token)
except SignupError, e:
return {'error': openerp.tools.exception_to_unicode(e)}
cr.commit()
return {}
# vim:expandtab:tabstop=4:softtabstop=4:shiftwidth=4:
+6 -3
View File
@@ -29,6 +29,9 @@ from openerp import SUPERUSER_ID
from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
from openerp.tools.safe_eval import safe_eval
class SignupError(Exception):
pass
def random_token():
# the token has an entropy of about 120 bits (6 bits/char * 20 chars)
chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
@@ -101,12 +104,12 @@ class res_partner(osv.Model):
partner_ids = self.search(cr, uid, [('signup_token', '=', token)], context=context)
if not partner_ids:
if raise_exception:
raise Exception("Signup token '%s' is not valid" % token)
raise SignupError("Signup token '%s' is not valid" % token)
return False
partner = self.browse(cr, uid, partner_ids[0], context)
if check_validity and not partner.signup_valid:
if raise_exception:
raise Exception("Signup token '%s' is no longer valid" % token)
raise SignupError("Signup token '%s' is no longer valid" % token)
return False
return partner
@@ -194,7 +197,7 @@ class res_users(osv.Model):
# check that uninvited users may sign up
if 'partner_id' not in values:
if not safe_eval(ir_config_parameter.get_param(cr, uid, 'auth_signup.allow_uninvited', 'False')):
raise Exception('Signup is not allowed for uninvited users')
raise SignupError('Signup is not allowed for uninvited users')
# create a copy of the template user (attached to a specific partner_id if given)
values['active'] = True
@@ -8,12 +8,20 @@ openerp.auth_signup = function(instance) {
var d = this._super();
// to switch between the signup and regular login form
this.$('a.oe_signup_signup').click(function() {
this.$('a.oe_signup_signup').click(function(ev) {
if (ev) {
ev.preventDefault();
}
self.$el.addClass("oe_login_signup");
return false;
});
this.$('a.oe_signup_back').click(function() {
this.$('a.oe_signup_back').click(function(ev) {
if (ev) {
ev.preventDefault();
}
self.$el.removeClass("oe_login_signup");
delete self.params.token;
return false;
});
// if there is an error message in params, show it then forget it
@@ -90,10 +98,19 @@ openerp.auth_signup = function(instance) {
name: name,
login: login,
password: password,
state: $.param(this.params)
//state: $.param(this.params)
};
var url = "/auth_signup/signup?" + $.param(params);
window.location = url;
var self = this,
super_ = this._super;
this.rpc('/auth_signup/signup', params)
.done(function(result) {
if (result.error) {
self.show_error(result.error);
} else {
super_.apply(self, [ev]);
}
});
} else {
// regular login
this._super(ev);
+1 -1
View File
@@ -26,7 +26,7 @@ Re-implement openerp's file import system:
'author': 'OpenERP SA',
'depends': ['base'],
'installable': True,
'auto_install': True,
'auto_install': False,
'css': [
'static/lib/select2/select2.css',
'static/src/css/import.css',
@@ -0,0 +1,6 @@
External ID,Name,Parent Category/External ID
a1,Expenses,product.product_category_all
a2,Other Products,product.product_category_all
a3,Sellable Products,product.product_category_all
a4,Tables,a1
a5,Seating furniture,a2
1 External ID Name Parent Category/External ID
2 a1 Expenses product.product_category_all
3 a2 Other Products product.product_category_all
4 a3 Sellable Products product.product_category_all
5 a4 Tables a1
6 a5 Seating furniture a2
@@ -0,0 +1,6 @@
External ID,Name,Internal Reference,Category/External ID,Can be Expensed,Can be Purchased,Can be Sold,Sale Price,Cost,Supply Method,Product Type,Procurement Method
a6,Aluminum Stool,ALS,a5,False,True,True,49.00,25.00,Buy,Stockable Product,Make to Stock
a7,Chair,CHR,a5,False,True,True,89.00,40.00,Buy,Stockable Product,Make to Stock
a8,Table,TBL,a4,False,True,True,169.00,100.00,Buy,Stockable Product,Make to Stock
a9,Software Book Tutorial,SBT,a2,False,True,False,19.00,8.00,Buy,Consumable,Make to Stock
a10,Fuel,FL,a1,True,False,False,0.30,0.25,Buy,Service,Make to Stock
1 External ID Name Internal Reference Category/External ID Can be Expensed Can be Purchased Can be Sold Sale Price Cost Supply Method Product Type Procurement Method
2 a6 Aluminum Stool ALS a5 False True True 49.00 25.00 Buy Stockable Product Make to Stock
3 a7 Chair CHR a5 False True True 89.00 40.00 Buy Stockable Product Make to Stock
4 a8 Table TBL a4 False True True 169.00 100.00 Buy Stockable Product Make to Stock
5 a9 Software Book Tutorial SBT a2 False True False 19.00 8.00 Buy Consumable Make to Stock
6 a10 Fuel FL a1 True False False 0.30 0.25 Buy Service Make to Stock
@@ -0,0 +1,6 @@
Name,Internal Reference,Can be Expensed,Can be Purchased,Can be Sold,Sale Price,Cost,Supply Method,Product Type,Procurement Method
Aluminum Stool,ALS,False,True,True,49.00,25.00,Buy,Stockable Product,Make to Stock
Chair,CHR,False,True,True,89.00,40.00,Buy,Stockable Product,Make to Stock
Table,TBL,False,True,True,169.00,100.00,Buy,Stockable Product,Make to Stock
Software Book Tutorial,SBT,False,True,False,19.00,8.00,Buy,Consumable,Make to Stock
Fuel,FL,True,False,False,0.30,0.25,Buy,Service,Make to Stock
1 Name Internal Reference Can be Expensed Can be Purchased Can be Sold Sale Price Cost Supply Method Product Type Procurement Method
2 Aluminum Stool ALS False True True 49.00 25.00 Buy Stockable Product Make to Stock
3 Chair CHR False True True 89.00 40.00 Buy Stockable Product Make to Stock
4 Table TBL False True True 169.00 100.00 Buy Stockable Product Make to Stock
5 Software Book Tutorial SBT False True False 19.00 8.00 Buy Consumable Make to Stock
6 Fuel FL True False False 0.30 0.25 Buy Service Make to Stock
@@ -0,0 +1,155 @@
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: companies; Type: TABLE; Schema: public; Owner: fp; Tablespace:
--
CREATE TABLE companies (
id integer NOT NULL,
company_name character varying
);
ALTER TABLE public.companies OWNER TO fp;
--
-- Name: companies_id_seq; Type: SEQUENCE; Schema: public; Owner: fp
--
CREATE SEQUENCE companies_id_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public.companies_id_seq OWNER TO fp;
--
-- Name: companies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: fp
--
ALTER SEQUENCE companies_id_seq OWNED BY companies.id;
--
-- Name: companies_id_seq; Type: SEQUENCE SET; Schema: public; Owner: fp
--
SELECT pg_catalog.setval('companies_id_seq', 3, true);
--
-- Name: persons; Type: TABLE; Schema: public; Owner: fp; Tablespace:
--
CREATE TABLE persons (
id integer NOT NULL,
company_id integer,
person_name character varying
);
ALTER TABLE public.persons OWNER TO fp;
--
-- Name: persons_id_seq; Type: SEQUENCE; Schema: public; Owner: fp
--
CREATE SEQUENCE persons_id_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public.persons_id_seq OWNER TO fp;
--
-- Name: persons_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: fp
--
ALTER SEQUENCE persons_id_seq OWNED BY persons.id;
--
-- Name: persons_id_seq; Type: SEQUENCE SET; Schema: public; Owner: fp
--
SELECT pg_catalog.setval('persons_id_seq', 4, true);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: fp
--
ALTER TABLE ONLY companies ALTER COLUMN id SET DEFAULT nextval('companies_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: fp
--
ALTER TABLE ONLY persons ALTER COLUMN id SET DEFAULT nextval('persons_id_seq'::regclass);
--
-- Data for Name: companies; Type: TABLE DATA; Schema: public; Owner: fp
--
COPY companies (id, company_name) FROM stdin;
1 Bigees
2 Organi
3 Boum
\.
--
-- Data for Name: persons; Type: TABLE DATA; Schema: public; Owner: fp
--
COPY persons (id, company_id, person_name) FROM stdin;
1 1 Fabien
2 1 Laurence
3 2 Eric
4 3 Ramsy
\.
--
-- Name: companies_pkey; Type: CONSTRAINT; Schema: public; Owner: fp; Tablespace:
--
ALTER TABLE ONLY companies
ADD CONSTRAINT companies_pkey PRIMARY KEY (id);
--
-- Name: persons_company_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: fp
--
ALTER TABLE ONLY persons
ADD CONSTRAINT persons_company_id_fkey FOREIGN KEY (company_id) REFERENCES companies(id);
--
-- PostgreSQL database dump complete
--
@@ -0,0 +1,6 @@
Name,Reference,Tags,Customer,Street,City,Country
Credit & Leasing,3,Services,True,Central Avenue 814,Johannesburg,South Africa
Services & Finance,5,"Consultancy Services,IT Services",True,Grove Road 5,London,United Kingdom
Hydra Supplies,6,"Manufacturer,Retailer",True,Palm Street 9,Los Angeles,United States
Bolts & Screws,8,"Wholesaler,Components Buyer",True,Rua Américo 1000,Campinas,Brazil
National Parts & Supplies,18,"Manufacturer,Wholesaler",True,Guangdong Way 20,Shenzen,China
1 Name Reference Tags Customer Street City Country
2 Credit & Leasing 3 Services True Central Avenue 814 Johannesburg South Africa
3 Services & Finance 5 Consultancy Services,IT Services True Grove Road 5 London United Kingdom
4 Hydra Supplies 6 Manufacturer,Retailer True Palm Street 9 Los Angeles United States
5 Bolts & Screws 8 Wholesaler,Components Buyer True Rua Américo 1000 Campinas Brazil
6 National Parts & Supplies 18 Manufacturer,Wholesaler True Guangdong Way 20 Shenzen China
@@ -0,0 +1,10 @@
Order Date,Order Reference,Supplier,Destination,Pricelist,Order Lines / Product,Order Lines / Quantity
2012-12-15,PO00008,ASUSTeK,Stock,Default Purchase Pricelist,ADPT,20
,,,,,CARD,30
,,,,,C-Case,40
2012-12-15,PO00009,Axelor,Stock,Default Purchase Pricelist,CD,5
,,,,,CPUa8,15
2012-12-15,PO000010,China Export,Stock,Default Purchase Pricelist,HDD SH-1,10
,,,,,HDD SH-2,20
,,,,,LAP-CUS,35
,,,,,LAP-E5,40
1 Order Date Order Reference Supplier Destination Pricelist Order Lines / Product Order Lines / Quantity
2 2012-12-15 PO00008 ASUSTeK Stock Default Purchase Pricelist ADPT 20
3 CARD 30
4 C-Case 40
5 2012-12-15 PO00009 Axelor Stock Default Purchase Pricelist CD 5
6 CPUa8 15
7 2012-12-15 PO000010 China Export Stock Default Purchase Pricelist HDD SH-1 10
8 HDD SH-2 20
9 LAP-CUS 35
10 LAP-E5 40
@@ -0,0 +1,8 @@
Name,Address type,Street,City,Country,Tags,Supplier,Customer,Is a company,Companies that refers to partner / Parent company
Wood y Wood Pecker,,"Snow Street, 25",Kainuu,Finland,Supplier,1,0,1,
Roger Pecker,Default,"Snow Street, 27",Kainuu,Finland,Supplier,1,0,0,Wood y Wood Pecker
Sharon Pecker,Delivery,"Snow Street, 28",Kainuu,Finland,Supplier,1,0,0,Wood y Wood Pecker
Thomas Pecker,Contact,"Snow Street, 27",Kainuu,Finland,Supplier,1,0,0,Wood y Wood Pecker
Vicking Direct,,"Atonium Street, 45a",Brussels,Belgium,Supplier,1,0,1,
Yvan Holiday,Invoice,"Atonium Street, 45b",Brussels,Belgium,Supplier,1,0,0,Vicking Direct
Jack Unsworth,Contact,"Atonium Street, 45a",Brussels,Belgium,Supplier,1,0,0,Vicking Direct
1 Name Address type Street City Country Tags Supplier Customer Is a company Companies that refers to partner / Parent company
2 Wood y Wood Pecker Snow Street, 25 Kainuu Finland Supplier 1 0 1
3 Roger Pecker Default Snow Street, 27 Kainuu Finland Supplier 1 0 0 Wood y Wood Pecker
4 Sharon Pecker Delivery Snow Street, 28 Kainuu Finland Supplier 1 0 0 Wood y Wood Pecker
5 Thomas Pecker Contact Snow Street, 27 Kainuu Finland Supplier 1 0 0 Wood y Wood Pecker
6 Vicking Direct Atonium Street, 45a Brussels Belgium Supplier 1 0 1
7 Yvan Holiday Invoice Atonium Street, 45b Brussels Belgium Supplier 1 0 0 Vicking Direct
8 Jack Unsworth Contact Atonium Street, 45a Brussels Belgium Supplier 1 0 0 Vicking Direct
@@ -0,0 +1,6 @@
"Order Reference","Supplier","Destination","Pricelist","Order Lines / Product","Order Lines / Quantity"
"PO000020","ASUSTeK","Stock","Default Purchase Pricelist","ADPT",20
,,,,"CARD",30
,,,,"C-Case",40
"PO000021","Axelor","Stock","Default Purchase Pricelist","CD",5
,,,,"CPUa8",15
1 Order Reference Supplier Destination Pricelist Order Lines / Product Order Lines / Quantity
2 PO000020 ASUSTeK Stock Default Purchase Pricelist ADPT 20
3 CARD 30
4 C-Case 40
5 PO000021 Axelor Stock Default Purchase Pricelist CD 5
6 CPUa8 15
+9 -5
View File
@@ -1,14 +1,17 @@
.oe_import{
display: inline-block;
width: 600px;
padding: 16px;
}
.oe_import > p {
margin-left: 8px;
margin-right: 8px;
text-align: justify
}
.oe_import h2 {
margin-top: 0;
margin-bottom: 5px;
}
.oe_padding {
padding: 13px;
}
/* ----------- IMPORT BOX ----------- */
.oe_import .oe_import_box{
@@ -17,6 +20,7 @@
background: #F0EEEE;
border-radius: 3px;
border: solid 1px #dddddd;
width: 600px;
}
.oe_import .oe_import_toggle{
margin-top: 8px;
+272 -16
View File
@@ -2,20 +2,25 @@
<t t-name="ImportView">
<t t-set="_id" t-value="_.uniqueId('export')"/>
<form action="" method="post" enctype="multipart/form-data" class="oe_import">
<header>
<button type="button" disabled="disabled"
class="oe_button oe_import_button oe_import_validate oe_highlight"
>Validate</button>
<button type="button" disabled="disabled"
class="oe_button oe_import_button oe_import_import"
>Import</button>
<span class="oe_fade">or</span>
<a class="oe_import_cancel" href="#">Cancel</a>
</header>
<input type="hidden" name="session_id"
t-att-value="widget.session.session_id"/>
<input type="hidden" name="import_id"/>
<h2>Upload your file</h2>
<div class="oe_view_manager oe_view_manager_current">
<div class="oe_view_manager_header oe_padding">
<h2>
Import a CSV File
</h2>
<input type="hidden" name="session_id"
t-att-value="widget.session.session_id"/>
<input type="hidden" name="import_id"/>
<button type="button" disabled="disabled"
class="oe_button oe_import_button oe_import_validate oe_highlight"
>Validate</button>
<button type="button" disabled="disabled"
class="oe_button oe_import_button oe_import_import"
>Import</button>
<span class="oe_fade">or</span>
<a class="oe_import_cancel" href="#">Cancel</a>
</div>
</div>
<p>Select the <a
href="http://en.wikipedia.org/wiki/Comma-separated_values"
class="oe_import_csv" target="_blank">.CSV</a>
@@ -25,7 +30,7 @@
<label t-attf-for="file_#{_id}" autofocus="autofocus">CSV File:</label>
<input type="file" id-attf-id="file_#{_id}"
name="file" class="oe_import_file"/>
<button type="button" class="oe_import_file_reload">
<button type="button" class="oe_import_file_reload" title="Reload data to check changes.">
<img src="/web/static/src/img/icons/gtk-refresh.png"/>
</button>
<div class="oe_import_with_file">
@@ -44,7 +49,7 @@
</div>
</div>
<div class="oe_import_with_file">
<div class="oe_import_with_file oe_padding">
<h2>Map your data to OpenERP</h2>
<input type="checkbox" class="oe_import_has_header"
id="oe_import_has_header" checked="checked"/>
@@ -59,6 +64,7 @@
<table class="oe_import_grid" />
<h2>Frequently Asked Questions</h2>
<dl>
<dt><a href="#" class="oe_import_toggle">
Need to import data from an other application?</a></dt>
@@ -78,9 +84,259 @@
whenever possible</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
What can I do when the Import preview table isn't
displayed correctly?</a></dt>
<dd>
<p>By default the Import preview is set on commas as
field separators and quotation marks as text
delimiters. If your csv file does not have these
settings, you can modify the File Format Options
(displayed under the Browse CSV file bar after you
select your file).</p> <p>Note that if your CSV file
has a tabulation as separator, OpenERP will not
detect the separations. You will need to change the
file format options in your spreadsheet application.
See the following question.</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
How can I change the CSV file format options when
saving in my spreadsheet application?</a></dt>
<dd>
<p>If you edit and save CSV files in speadsheet
applications, your computer's regional settings will
be applied for the separator and delimiter.
We suggest you use OpenOffice or LibreOffice Calc
as they will allow you to modify all three options
(in 'Save As' dialog box > Check the box 'Edit filter
settings' > Save).</p> <p>Microsoft Excel will allow
you to modify only the encoding when saving
(in 'Save As' dialog box > click 'Tools' dropdown
list > Encoding tab).</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
What's the difference between Database ID and
External ID?</a></dt>
<dd>
<p>Some fields define a relationship with another
object. For example, the country of a contact is a
link to a record of the 'Country' object. When you
want to import such fields, OpenERP will have to
recreate links between the different records.
To help you import such fields, OpenERP provides 3
mechanisms. You must use one and only one mechanism
per field you want to import.</p> <p>For example, to
reference the country of a contact, OpenERP proposes
you 3 different fields to import: <ul>
<li>Country: the name or code of the country</li>
<li>Country/Database ID: the unique OpenERP ID for a
record, defined by the ID postgresql column</li>
<li>Country/External ID: the ID of this record
referenced in another application (or the .XML file
that imported it)</li> </ul></p> <p>For the country
Belgium, you can use one of these 3 ways to import:
<ul> <li>Country: Belgium</li> <li>Country/Database
ID: 21</li> <li>Country/External ID: base.be</li>
</ul></p> <p>According to your need, you should use
one of these 3 ways to reference records in relations.
Here is when you should use one or the other,
according to your need: <ul> <li>Use Country: This is
the easiest way when your data come from CSV files
that have been created manually.</li> <li>Use
Country/Database ID: You should rarely use this
notation. It's mostly used by developers as it's main
advantage is to never have conflicts (you may have
several records with the same name, but they always
have a unique Database ID)</li> <li>Use
Country/External ID: Use External ID when you import
data from a third party application.</li> </ul></p>
<p>When you use External IDs, you can import CSV files
with the "External ID" column to define the External
ID of each record you import. Then, you will be able
to make a reference to that record with columns like
"Field/External ID". The following two CSV files give
you an example for Products and their Categories.</p>
<a href="/base_import/static/csv/External_id_3rd_party_application_product_categories.csv">CSV file for categories</a><br/>
<a href="/base_import/static/csv/External_id_3rd_party_application_products.csv">CSV file for Products</a>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
What can I do if I have multiple matches for a field?
</a></dt>
<dd>
<p>If for example you have two product categories
with the child name "Sellable" (ie. "Misc.
Products/Sellable" &amp; "Other Products/Sellable"),
your validation is halted but you may still import
your data. However, we recommend you do not import the
data because they will all be linked to the first
'Sellable' category found in the Product Category list
("Misc. Products/Sellable"). We recommend you modify
one of the duplicates' values or your product category
hierarchy.<br/>
However if you do not wish to change your
configuration of product categories, we recommend you
use make use of the external ID for this field
'Category'.</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
How can I import a many2many relationship field
(e.g. a customer that has multiple tags)?</a></dt>
<dd>
<p>The tags should be separated by a comma without any
spacing. For example, if you want you customer to be
lined to both tags 'Manufacturer' and 'Retailer'
then you will encode it as follow "Manufacturer,
Retailer" in the same column of your CSV file.</p>
<a href="/base_import/static/csv/m2m_customers_tags.csv">
CSV file for Manufacturer, Retailer</a><br/>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
How can I import a one2many relationship (e.g. several
Order Lines of a Sale Order)?</a></dt>
<dd>
<p>If you want to import sales order having several
order lines; for each order line, you need to reserve
a specific row in the CSV file. The first order line
will be imported on the same row as the information
relative to order. Any additional lines will need an
addtional row that does not have any information in
the fields relative to the order.</p>
<p>As an example, here is
purchase.order_functional_error_line_cant_adpat.CSV
file of some quotations you can import, based on demo
data.</p>
<a href="/base_import/static/csv/purchase.order_functional_error_line_cant_adpat.csv">File for some Quotations</a>
<p>The following CSV file shows how to import purchase
orders with their respective purchase order lines:</p>
<a href="/base_import/static/csv/o2m_purchase_order_lines.csv">Purchase orders with their respective purchase order lines</a>
<p>The following CSV file shows how to import
suppliers and their respective contacts</p>
<a href="/base_import/static/csv/o2m_suppliers_contacts.csv">Suppliers and their respective contacts</a>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
Can I import several times the same record?</a></dt>
<dd>
<p>If you import a file that contains one of the
column "External ID" or "Database ID", records that
have already been imported will be modified instead of
being created. This is very usefull as it allows you
to import several times the same CSV file while having
made some changes in between two imports. OpenERP will
take care of creating or modifying each record
depending if it's new or not.</p> <p> This feature
allows you to use the Import/Export tool of OpenERP to
modify a batch of records in your favorite spreadsheet
application.</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
What happens if I do not provide a value for a
specific field?</a></dt>
<dd>
<p>If you do not set all fields in your CSV file,
OpenERP will assign the default value for every non
defined fields. But if you
set fields with empty values in your CSV file, OpenERP
will set the EMPTY value in the field, instead of
assigning the default value.</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
How to export/import different tables from an SQL
application to OpenERP?</a></dt>
<dd>
<p>If you need to import data from different tables,
you will have to recreate relations between records
belonging to different tables. (e.g. if you import
companies and persons, you will have to recreate the
link between each person and the company they work
for).</p> <p>To manage relations between tables,
you can use the "External ID" facilities of OpenERP.
The "External ID" of a record is the unique identifier
of this record in another application. This "External
ID" must be unique accoss all the records of all
objects, so it's a good practice to prefix this
"External ID" with the name of the application or
table. (like 'company_1', 'person_1' instead of '1')
</p> <p>As an example, suppose you have a SQL database
with two tables you want to import: companies and
persons. Each person belong to one company, so you
will have to recreate the link between a person and
the company he work for. (If you want to test this
example, here is a <a href="/base_import/static/csv/database_import_test.sql">
dump of such a PostgreSQL database</a>).</p>
<p>We will first export all companies and their
"External ID". In PSQL, write the following command:
</p> <p>&#160;&#160;&#160;&#160;copy
(select 'company_'||id as "External ID",company_name
as "Name",'True' as "Is a Company" from companies) TO
'/tmp/company.csv' with CSV HEADER;</p>
<p>This SQL command will create the following CSV file:
<br/>&#160;&#160;&#160;&#160;External ID,Name,Is a Company
<br/>&#160;&#160;&#160;&#160;company_1,Bigees,True
<br/>&#160;&#160;&#160;&#160;company_2,Organi,True
<br/>&#160;&#160;&#160;&#160;company_3,Boum,True</p>
<p>To create the CSV file for persons, linked to
companies, we will use the following SQL command in
PSQL:</p> <p>&#160;&#160;&#160;&#160;copy (select
'person_'||id as "External ID",person_name as
"Name",'False' as "Is a Company",'company_'||company_id
as "Related Company/External ID" from persons) TO
'/tmp/person.csv' with CSV</p>
<p>It will produce the following CSV file:
<br/>&#160;&#160;&#160;&#160;External ID,Name,Is a
Company,Related Company/External ID
<br/>&#160;&#160;&#160;&#160;person_1,Fabien,False,company_1
<br/>&#160;&#160;&#160;&#160;person_2,Laurence,False,company_1
<br/>&#160;&#160;&#160;&#160;person_3,Eric,False,company_2
<br/>&#160;&#160;&#160;&#160;person_4,Ramsy,False,company_3</p>
<p>As you can see in this file, Fabien and Laurence
are working for the Bigees company (company_1) and
Eric is working for the Organi company. The relation
between persons and companies is done using the
External ID of the companies. We had to prefix the
"External ID" by the name of the table to avoid a
conflict of ID between persons and companies (person_1
and company_1 who shared the same ID 1 in the orignial
database).</p>
<p>The two files produced are ready to be imported in
OpenERP without any modifications. After having
imported these two CSV files, you will have 4 contacts
and 3 companies. (the firsts two contacts are linked
to the first company). You must first import the
companies and then the persons.</p>
</dd>
</dl>
</div>
</form>
</t>
<t t-name="ImportView.preview">
<tr t-if="headers" class="oe_import_grid-header">
<td t-foreach="headers" t-as="header" class="oe_import_grid-cell"
+1 -1
View File
@@ -9,7 +9,7 @@
<field name="arch" type="xml">
<field name="property_account_position" position="after" version="7.0">
<label for="vat"/>
<div>
<div name="vat_info">
<field name="vat" on_change="vat_change(vat)" placeholder="e.g. BE0477472701" class="oe_inline"/>
<button colspan="2" name="button_check_vat" string="Check Validity" type="object" icon="gtk-execute" class="oe_inline"/>
<field name="vat_subjected" class="oe_inline"/>
+2 -2
View File
@@ -188,7 +188,7 @@ class crm_lead(base_stage, format_address, osv.osv):
_columns = {
'partner_id': fields.many2one('res.partner', 'Partner', ondelete='set null',
select=True, help="Optional linked partner, usually after conversion of the lead"),
select=True, help="Linked partner (optional). Usually created when converting the lead."),
'id': fields.integer('ID', readonly=True),
'name': fields.char('Subject', size=64, required=True, select=1),
@@ -236,7 +236,7 @@ class crm_lead(base_stage, format_address, osv.osv):
'ref': fields.reference('Reference', selection=crm._links_get, size=128),
'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128),
'phone': fields.char("Phone", size=64),
'date_deadline': fields.date('Expected Closing'),
'date_deadline': fields.date('Expected Closing', help="Estimate of the date on which the opportunity will be won."),
'date_action': fields.date('Next Action Date', select=True),
'title_action': fields.char('Next Action', size=64),
'color': fields.integer('Color Index'),
+3 -3
View File
@@ -96,13 +96,13 @@ class crm_claim(base_stage, osv.osv):
'user_id': fields.many2one('res.users', 'Responsible'),
'user_fault': fields.char('Trouble Responsible', size=64),
'section_id': fields.many2one('crm.case.section', 'Sales Team', \
select=True, help="Sales team to which Case belongs to."\
"Define Responsible user and Email account for"\
select=True, help="Responsible sales team."\
" Define Responsible user and Email account for"\
" mail gateway."),
'company_id': fields.many2one('res.company', 'Company'),
'partner_id': fields.many2one('res.partner', 'Partner'),
'email_cc': fields.text('Watchers Emails', size=252, help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"),
'email_from': fields.char('Email', size=128, help="These people will receive email."),
'email_from': fields.char('Email', size=128, help="Destination email for email gateway."),
'partner_phone': fields.char('Phone', size=32),
'stage_id': fields.many2one ('crm.claim.stage', 'Stage',
domain="['|', ('section_ids', '=', section_id), ('case_default', '=', True)]"),
+2 -3
View File
@@ -53,13 +53,12 @@ class crm_helpdesk(base_state, base_stage, osv.osv):
'date_deadline': fields.date('Deadline'),
'user_id': fields.many2one('res.users', 'Responsible'),
'section_id': fields.many2one('crm.case.section', 'Sales Team', \
select=True, help='Sales team to which Case belongs to.\
Define Responsible user and Email account for mail gateway.'),
select=True, help='Responsible sales team. Define Responsible user and Email account for mail gateway.'),
'company_id': fields.many2one('res.company', 'Company'),
'date_closed': fields.datetime('Closed', readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner'),
'email_cc': fields.text('Watchers Emails', size=252 , help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"),
'email_from': fields.char('Email', size=128, help="These people will receive email."),
'email_from': fields.char('Email', size=128, help="Destination email for email gateway"),
'date': fields.datetime('Date'),
'ref' : fields.reference('Reference', selection=crm._links_get, size=128),
'ref2' : fields.reference('Reference 2', selection=crm._links_get, size=128),
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-11-02 05:09+0000\n"
"X-Launchpad-Export-Date: 2012-11-03 05:03+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: delivery
+15 -2
View File
@@ -5,6 +5,19 @@ openerp.document = function (instance) {
this._super.apply(this, arguments);
this.sections.splice(1, 0, { 'name' : 'files', 'label' : _t('Attachment(s)'), });
this.items['files'] = [];
}
},
on_attachments_loaded: function(attachments) {
//to display number in name if more then one attachment which has same name.
var self = this;
_.chain(attachments.reverse())
.groupBy(function(attachment) { return attachment.name})
.each(function(attachment){
if(attachment.length > 1)
_.map(attachment, function(attachment, i){
attachment.name = _.str.sprintf(_t("%s (%s)"), attachment.name, i+1)
})
})
self._super(attachments);
},
});
};
};
+1 -1
View File
@@ -338,7 +338,7 @@ class event_registration(osv.osv):
'date_closed': fields.datetime('Attended Date', readonly=True),
'date_open': fields.datetime('Registration Date', readonly=True),
'reply_to': fields.related('event_id','reply_to',string='Reply-to Email', type='char', size=128, readonly=True,),
'log_ids': fields.one2many('mail.message', 'res_id', 'Logs', domain=[('email_from', '=', False),('model','=',_name)]),
'log_ids': fields.one2many('mail.message', 'res_id', 'Logs', domain=[('model','=',_name)]),
'event_end_date': fields.related('event_id','date_end', type='datetime', string="Event End Date", readonly=True),
'event_begin_date': fields.related('event_id', 'date_begin', type='datetime', string="Event Start Date", readonly=True),
'user_id': fields.many2one('res.users', 'User', states={'done': [('readonly', True)]}),
+1 -1
View File
@@ -25,7 +25,7 @@ class res_partner(osv.osv):
_inherit = 'res.partner'
_columns = {
'speaker': fields.boolean('Speaker'),
'speaker': fields.boolean('Speaker', help="Check this box if this contact is a speaker."),
'event_ids': fields.one2many('event.event','main_speaker_id', readonly=True),
'event_registration_ids': fields.one2many('event.registration','partner_id', readonly=True),
}
+121
View File
@@ -0,0 +1,121 @@
# Polish translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-11-02 14:30+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Polish <pl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: google_base_account
#: field:res.users,gmail_user:0
msgid "Username"
msgstr ""
#. module: google_base_account
#: model:ir.actions.act_window,name:google_base_account.act_google_login_form
msgid "Google Login"
msgstr ""
#. module: google_base_account
#: code:addons/google_base_account/wizard/google_login.py:29
#, python-format
msgid "Google Contacts Import Error!"
msgstr ""
#. module: google_base_account
#: view:res.users:0
msgid " Synchronization "
msgstr ""
#. module: google_base_account
#: sql_constraint:res.users:0
msgid "You can not have two users with the same login !"
msgstr ""
#. module: google_base_account
#: code:addons/google_base_account/wizard/google_login.py:75
#, python-format
msgid "Error"
msgstr ""
#. module: google_base_account
#: view:google.login:0
msgid "Google login"
msgstr ""
#. module: google_base_account
#: model:ir.model,name:google_base_account.model_res_users
msgid "res.users"
msgstr "res.users"
#. module: google_base_account
#: field:google.login,password:0
msgid "Google Password"
msgstr ""
#. module: google_base_account
#: view:google.login:0
msgid "_Cancel"
msgstr ""
#. module: google_base_account
#: view:res.users:0
msgid "Google Account"
msgstr ""
#. module: google_base_account
#: field:google.login,user:0
msgid "Google Username"
msgstr ""
#. module: google_base_account
#: code:addons/google_base_account/wizard/google_login.py:29
#, python-format
msgid ""
"Please install gdata-python-client from http://code.google.com/p/gdata-"
"python-client/downloads/list"
msgstr ""
"Zainstaluj gdata-python-client z http://code.google.com/p/gdata-python-"
"client/downloads/list"
#. module: google_base_account
#: model:ir.model,name:google_base_account.model_google_login
msgid "Google Contact"
msgstr ""
#. module: google_base_account
#: view:google.login:0
msgid "_Login"
msgstr ""
#. module: google_base_account
#: constraint:res.users:0
msgid "The chosen company is not in the allowed companies for this user"
msgstr ""
#. module: google_base_account
#: field:res.users,gmail_password:0
msgid "Password"
msgstr ""
#. module: google_base_account
#: code:addons/google_base_account/wizard/google_login.py:75
#, python-format
msgid "Authentication fail check the user and password !"
msgstr ""
#. module: google_base_account
#: view:google.login:0
msgid "ex: user@gmail.com"
msgstr "np: user@gmail.com"
+2 -1
View File
@@ -28,11 +28,12 @@
'installable': True,
'auto_install': False,
'js': ['static/src/js/gdocs.js'],
'qweb': ['static/src/xml/gdocs.xml'],
'data': [
'security/ir.model.access.csv',
'res_config_user_view.xml'
],
'depends': ['google_base_account'],
'depends': ['google_base_account','document'],
'description': """
Module to attach a google document to any model.
================================================
+18 -10
View File
@@ -17,7 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from datetime import datetime
from tools import DEFAULT_SERVER_DATETIME_FORMAT
from osv import osv, fields
from tools.translate import _
try:
@@ -61,7 +62,8 @@ class google_docs_ir_attachment(osv.osv):
#login with the base account google module
client = self._auth(cr, uid, context=context)
# create the document in google docs
local_resource = gdata.docs.data.Resource(gdata.docs.data.DOCUMENT_LABEL)
title = "%s %s" % (context.get("name","Untitled Document."), datetime.today().strftime(DEFAULT_SERVER_DATETIME_FORMAT))
local_resource = gdata.docs.data.Resource(gdata.docs.data.DOCUMENT_LABEL,title=title)
#create a new doc in Google Docs
gdocs_resource = client.post(entry=local_resource, uri='https://docs.google.com/feeds/default/private/full/')
# create an ir.attachment into the db
@@ -69,10 +71,12 @@ class google_docs_ir_attachment(osv.osv):
'res_model': res_model,
'res_id': res_id,
'type': 'url',
'name': _('Google Doc'),
'name': title,
'url': gdocs_resource.get_alternate_link().href,
}, context=context)
return gdocs_resource.resource_id.text
return {'resource_id': gdocs_resource.resource_id.text,
'title': title,
'url': gdocs_resource.get_alternate_link().href}
def copy_gdoc(self, cr, uid, res_model, res_id, name_gdocs, gdoc_template_id, context=None):
'''
@@ -89,7 +93,7 @@ class google_docs_ir_attachment(osv.osv):
try:
original_resource = client.get_resource_by_id(gdoc_template_id)
#copy the document you choose in the configuration
copy_resource = client.copy_resource(original_resource, 'copy_%s' % original_resource.title.text)
copy_resource = client.copy_resource(original_resource, name_gdocs)
except:
raise osv.except_osv(_('Google Docs Error!'), _("Your resource id is not correct. You can find the id in the google docs URL."))
# create an ir.attachment
@@ -114,7 +118,8 @@ class google_docs_ir_attachment(osv.osv):
a length of 1 element only (batch processing is not supported in the code, though nothing really prevent it)
:return: the google document object created
'''
assert len(ids) == 1, 'Creating google docs may only be done by one at a time'
if len(ids) != 1:
raise osv.except_osv(_('Google Docs Error!'), _("Creating google docs may only be done by one at a time."))
res_id = ids[0]
pool_ir_attachment = self.pool.get('ir.attachment')
pool_gdoc_config = self.pool.get('google.docs.config')
@@ -125,7 +130,10 @@ class google_docs_ir_attachment(osv.osv):
google_docs_config = pool_gdoc_config.search(cr, uid, [('model_id', '=', res_model)], context=context)
if google_docs_config:
name_gdocs = pool_gdoc_config.browse(cr, uid, google_docs_config, context=context)[0].name_template
name_gdocs = name_gdocs % model_fields_dic
try:
name_gdocs = name_gdocs % model_fields_dic
except:
raise osv.except_osv(_('Key Error!'), _("Your Google Doc Name Pattern's key does not found in object."))
google_template_id = pool_gdoc_config.browse(cr, uid, google_docs_config[0], context=context).gdocs_resource_id
google_document = pool_ir_attachment.copy_gdoc(cr, uid, res_model, res_id, name_gdocs, google_template_id, context=context)
else:
@@ -138,15 +146,15 @@ class config(osv.osv):
_columns = {
'model_id': fields.many2one('ir.model', 'Model', required=True),
'gdocs_resource_id': fields.char('Google Resource ID to Use as Template', size=64,help='''
'gdocs_resource_id': fields.char('Google Resource ID to Use as Template', size=64, help='''
This is the id of the template document, on google side. You can find it thanks to its URL:
*for a text document with url like `https://docs.google.com/a/openerp.com/document/d/123456789/edit`, the ID is `document:123456789`
*for a spreadsheet document with url like `https://docs.google.com/a/openerp.com/spreadsheet/ccc?key=123456789#gid=0`, the ID is `spreadsheet:123456789`
*for a presentation (slide show) document with url like `https://docs.google.com/a/openerp.com/presentation/d/123456789/edit#slide=id.p`, the ID is `presentation:123456789`
*for a drawing document with url like `https://docs.google.com/a/openerp.com/drawings/d/123456789/edit`, the ID is `drawings:123456789`
...
'''),
'name_template': fields.char('Google Doc Name Pattern', size=64, help='Choose how the new google docs will be named, on google side'),
''', required=True),
'name_template': fields.char('Google Doc Name Pattern', size=64, help='Choose how the new google docs will be named, on google side. Eg. gdoc_%(field_name)s', required=True),
}
_defaults = {
+28 -29
View File
@@ -1,41 +1,40 @@
openerp.google_docs = function(instance, m) {
var _t = instance.web._t;
var _t = instance.web._t,
QWeb = instance.web.qweb;
instance.web.Sidebar = instance.web.Sidebar.extend({
on_attachments_loaded: function(attachments) {
instance.web.Sidebar.include({
redraw: function() {
var self = this;
self._super(attachments);
// if attachment contains a google doc url do nothing
// else display a button to create a google doc
var flag = false;
_.each(attachments, function(i) {
if (i.url && i.url.match('/docs.google.com/')) { flag = true; }
this._super.apply(this, arguments);
self.$el.find('.oe_sidebar_add_attachment').after(QWeb.render('AddGoogleDocumentItem', {widget: self}))
self.$el.find('.oe_sidebar_add_google_doc').on('click', function (e) {
self.on_google_doc();
});
if (! flag) {
this.add_items('files', [
{ label: _t('Add Google Doc...'), callback: self.on_google_doc },
]);
}
},
on_google_doc: function() {
var self = this;
var form = self.getParent();
form.sidebar_context().then(function (context) {
var ds = new instance.web.DataSet(this, 'ir.attachment', context);
ds.call('google_doc_get', [form.dataset.model, [form.datarecord.id], context]).then(function(r) {
if (r == 'False') {
var params = {
error: response,
message: _t("The user google credentials are not set yet. Contact your administrator for help.")
var view = self.getParent();
var ids = ( view.fields_view.type != "form" )? view.groups.get_selection().ids : [ view.datarecord.id ];
if( !_.isEmpty(ids) ){
view.sidebar_context().then(function (context) {
var ds = new instance.web.DataSet(this, 'ir.attachment', context);
ds.call('google_doc_get', [view.dataset.model, ids, context]).then(function(r) {
if (r == 'False') {
var params = {
error: response,
message: _t("The user google credentials are not set yet. Contact your administrator for help.")
}
$(openerp.web.qweb.render("DialogWarning", params)).dialog({
title: _t("User Google credentials are not yet set."),
modal: true,
});
}
$(openerp.web.qweb.render("DialogWarning", params)).dialog({
title: _t("User Google credentials are not yet set."),
modal: true,
});
}
form.reload();
}).done(function(r){
window.open(r.url,"_blank");
view.reload();
});
});
});
}
}
});
};
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- vim:fdl=1:
-->
<templates id="template" xml:space="preserve">
<t t-name="AddGoogleDocumentItem">
<li class="oe_sidebar_add_google_doc"><span><b>Add Google Doc...</b></span></li>
</t>
</templates>
+2 -2
View File
@@ -93,14 +93,14 @@ class hr_job(osv.osv):
_inherit = ['mail.thread']
_columns = {
'name': fields.char('Job Name', size=128, required=True, select=True),
'expected_employees': fields.function(_no_of_employee, string='Total Employees',
'expected_employees': fields.function(_no_of_employee, string='Total Forecasted Employees',
help='Expected number of employees for this job position after new recruitment.',
store = {
'hr.job': (lambda self,cr,uid,ids,c=None: ids, ['no_of_recruitment'], 10),
'hr.employee': (_get_job_position, ['job_id'], 10),
},
multi='no_of_employee'),
'no_of_employee': fields.function(_no_of_employee, string="Number of Employees",
'no_of_employee': fields.function(_no_of_employee, string="Current Number of Employees",
help='Number of employees currently occupying this job position.',
store = {
'hr.employee': (_get_job_position, ['job_id'], 10),
@@ -57,6 +57,7 @@ class report_custom(report_rml):
if emp_ids:
for emp in obj_emp.read(cr, uid, emp_ids, ['name']):
stop, days_xml = False, []
total_wh = 0.0
user_repr = '''
<user>
<name>%s</name>
@@ -92,11 +93,15 @@ class report_custom(report_rml):
else:
ldt = dt
# Week xml representation
total_wh += wh
wh = hour2str(wh)
today_xml = '<day num="%s"><wh>%s</wh></day>' % ((today - month).days+1, (wh))
dy=(today - month).days+1
days_xml.append(today_xml)
today, tomor = tomor, tomor + one_day
total_wh = hour2str(total_wh)
today_xml = '<day num="Total"><wh>%s</wh></day>' % (total_wh)
days_xml.append(today_xml)
user_xml.append(user_repr % '\n'.join(days_xml))
rpt_obj = pooler.get_pool(cr.dbname).get('hr.employee')
@@ -174,8 +179,9 @@ class report_custom(report_rml):
cell=cell+x
width_dict[j]=x
day_diff1=day_diff1-x
date_xml += ['<dayy name="Total" cell="Total"/>']
date_xml.append('</days>')
date_xml.append('<cols>3.5cm%s</cols>\n' % (',0.74cm' * (int(dy))))
date_xml.append('<cols>3.5cm%s,1.2cm</cols>\n' % (',0.74cm' * (int(dy))))
xml = '''<?xml version="1.0" encoding="UTF-8" ?>
<report>
%s
@@ -183,7 +189,7 @@ class report_custom(report_rml):
%s
%s
</report>
''' % (header_xml,_('Attendances By Month'),'\n'.join(user_xml),date_xml)
''' % (header_xml,_('Attendances by Month'),'\n'.join(user_xml),date_xml)
return xml
report_custom('report.hr.attendance.bymonth', 'hr.employee', '', 'addons/hr_attendance/report/bymonth.xsl')
+19 -8
View File
@@ -20,12 +20,15 @@
##############################################################################
import time
from datetime import datetime
from dateutil.relativedelta import relativedelta
import pooler
from report.interface import report_rml
from report.interface import toxml
from report import report_sxw
from tools.translate import _
import tools
one_week = relativedelta(days=7)
@@ -38,7 +41,8 @@ class report_custom(report_rml):
def create_xml(self, cr, uid, ids, datas, context=None):
obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')
ids = datas['active_ids']
emp_ids = datas['active_ids']
start_date = datetime.strptime(datas['form']['init_date'], '%Y-%m-%d')
end_date = datetime.strptime(datas['form']['end_date'], '%Y-%m-%d')
first_monday = start_date - relativedelta(days=start_date.date().weekday())
@@ -47,9 +51,16 @@ class report_custom(report_rml):
if last_monday < first_monday:
first_monday, last_monday = last_monday, first_monday
rpt_obj = pooler.get_pool(cr.dbname).get('hr.employee')
rml_obj=report_sxw.rml_parse(cr, uid, rpt_obj._name,context)
header_xml = '''
<header>
<date>%s</date>
<company>%s</company>
</header>
''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,uid).company_id.name)
user_xml = []
for employee_id in ids:
for employee_id in emp_ids:
emp = obj_emp.read(cr, uid, [employee_id], ['id', 'name'])[0]
monday, n_monday = first_monday, first_monday + one_week
stop, week_xml = False, []
@@ -88,7 +99,7 @@ class report_custom(report_rml):
ldt = dt
# Week xml representation
week_repr = ['<week>', '<weekstart>%s</weekstart>' % monday.strftime('%Y-%m-%d'), '<weekend>%s</weekend>' % n_monday.strftime('%Y-%m-%d')]
week_repr = ['<week>', '<weekstart>%s</weekstart>' % monday.strftime('%Y-%m-%d'), '<weekend>%s</weekend>' % (n_monday - relativedelta(days=1)).strftime('%Y-%m-%d')]
for idx in range(7):
week_repr.append('<%s>' % num2day[idx])
if idx in week_wh:
@@ -98,17 +109,17 @@ class report_custom(report_rml):
week_repr.append('<worked>%sh%02d</worked>' % to_hour(reduce(lambda x,y:x+y, week_wh.values(), 0)))
week_repr.append('</total>')
week_repr.append('</week>')
if len(week_repr) > 21: # 21 = minimal length of week_repr
week_xml.append('\n'.join(week_repr))
week_xml.append('\n'.join(week_repr))
monday, n_monday = n_monday, n_monday + one_week
user_xml.append(user_repr % '\n'.join(week_xml))
xml = '''<?xml version="1.0" encoding="UTF-8" ?>
<report>
%s
<title>%s</title>
%s
</report>
''' % '\n'.join(user_xml)
''' % (header_xml,_('Attendances by Week'),'\n'.join(user_xml))
xml = tools.ustr(xml).encode('utf8')
return self.post_process_xml_data(cr, uid, xml, context)
+57 -33
View File
@@ -3,12 +3,15 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:import href="hr_custom_default.xsl"/>
<xsl:import href="hr_custom_rml.xsl"/>
<xsl:template match="/">
<xsl:call-template name="rml" />
</xsl:template>
<xsl:template name="rml">
<xsl:template name="stylesheet">
<document filename="timesheet.pdf">
<template pageSize="29.7cm,21cm" leftMargin="2.0cm" rightMargin="2.0cm" topMargin="2.0cm" bottomMargin="2.0cm" title="Timesheets" author="Generated by Open ERP, Fabien Pinckaers" allowSplitting="20">
<pageTemplate id="first">
@@ -20,11 +23,17 @@
</template>
<stylesheet>
<paraStyle name="title" fontName="Helvetica-Bold" fontSize="15.0" leading="17" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="emp" fontSize="13.0"/>
<blockTableStyle id="week">
<blockFont name="Helvetica-BoldOblique" size="12" start="0,0" stop="-1,0"/>
<blockBackground colorName="grey" start="0,0" stop="-1,0"/>
<blockTextColor colorName="red" start="-1,0" stop="-1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="grey" start="-1,0" stop="-1,-1"/>
<blockFont name="Helvetica" size="9" start="0,0" stop="-1,-1"/>
<blockFont name="Helvetica-BoldOblique" size="12" start="0,0" stop="0,0"/>
<blockBackground colorName="lightgrey" start="1,0" stop="-1,0"/>
<blockFont name="Helvetica-BoldOblique" start="-1,0" stop="-1,-1"/>
<lineStyle kind="LINEABOVE" colorName="black" start="0,0" stop="-1,0" />
<lineStyle kind="LINEBEFORE" colorName="black" start="0,0" stop="-1,-1"/>
<lineStyle kind="LINEAFTER" colorName="black" start="-1,0" stop="-1,-1"/>
<lineStyle kind="LINEBELOW" colorName="black" start="0,0" stop="-1,-1"/>
<blockValign value="TOP"/>
</blockTableStyle>
</stylesheet>
@@ -36,32 +45,37 @@
</xsl:template>
<xsl:template name="story">
<spacer length="1cm" />
<xsl:apply-templates select="report/title"/>
<xsl:apply-templates select="report/user"/>
</xsl:template>
<xsl:template match="title">
<para style="title">
<xsl:value-of select="."/>
</para>
<spacer length="1cm"/>
</xsl:template>
<xsl:template match="user">
<para>
<b>Name:</b>
<spacer length="1cm" />
<para style="emp">
<b>Employee: </b>
<i><xsl:value-of select="name" /></i>
</para>
<blockTable colWidths="4cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm" style="week">
<tr>
<td></td>
<td>Mon</td>
<td>Tue</td>
<td>Wed</td>
<td>Thu</td>
<td>Fri</td>
<td>Sat</td>
<td>Sun</td>
<td>Tot</td>
</tr>
<xsl:for-each select="week">
<tr></tr>
<spacer length="0.5cm" />
<xsl:for-each select="week">
<blockTable colWidths="8cm,2cm,2cm,2cm,2cm,2cm,2cm,2cm,2cm" style="week">
<tr>
<td>Week:</td>
<td></td>
<td>from <xsl:value-of select="weekstart" /> to <xsl:value-of select="weekend" /></td>
<td>From <xsl:value-of select="weekstart" /> to <xsl:value-of select="weekend" /></td>
<td>Mon</td>
<td>Tue</td>
<td>Wed</td>
<td>Thu</td>
<td>Fri</td>
<td>Sat</td>
<td>Sun</td>
<td>Total</td>
</tr>
<tr>
<td>Worked hours</td>
@@ -70,7 +84,7 @@
<xsl:when test="Monday/workhours">
<xsl:value-of select="Monday/workhours" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
<xsl:otherwise>0h00</xsl:otherwise>
</xsl:choose>
</td>
<td>
@@ -78,7 +92,7 @@
<xsl:when test="Tuesday/workhours">
<xsl:value-of select="Tuesday/workhours" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
<xsl:otherwise>0h00</xsl:otherwise>
</xsl:choose>
</td>
<td>
@@ -86,7 +100,7 @@
<xsl:when test="Wednesday/workhours">
<xsl:value-of select="Wednesday/workhours" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
<xsl:otherwise>0h00</xsl:otherwise>
</xsl:choose>
</td>
<td>
@@ -94,7 +108,7 @@
<xsl:when test="Thursday/workhours">
<xsl:value-of select="Thursday/workhours" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
<xsl:otherwise>0h00</xsl:otherwise>
</xsl:choose>
</td>
<td>
@@ -102,7 +116,7 @@
<xsl:when test="Friday/workhours">
<xsl:value-of select="Friday/workhours" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
<xsl:otherwise>0h00</xsl:otherwise>
</xsl:choose>
</td>
<td>
@@ -110,7 +124,7 @@
<xsl:when test="Saturday/workhours">
<xsl:value-of select="Saturday/workhours" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
<xsl:otherwise>0h00</xsl:otherwise>
</xsl:choose>
</td>
<td>
@@ -118,14 +132,24 @@
<xsl:when test="Sunday/workhours">
<xsl:value-of select="Sunday/workhours" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
<xsl:otherwise>0h00</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:value-of select="total/worked" />
</td>
</tr>
</xsl:for-each>
</blockTable>
</blockTable>
<xsl:if test="position() != last()">
<blockTable colWidths="24cm" style="week">
<tr>
<td colspan="6"></td>
</tr>
</blockTable>
</xsl:if>
</xsl:for-each>
<xsl:if test="position() != last()">
<pageBreak/>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
@@ -18,7 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from datetime import datetime
from dateutil.relativedelta import relativedelta
from osv import osv, fields
@@ -30,8 +31,8 @@ class hr_attendance_byweek(osv.osv_memory):
'end_date': fields.date('Ending Date', required=True)
}
_defaults = {
'init_date': lambda *a: time.strftime('%Y-%m-%d'),
'end_date': lambda *a: time.strftime('%Y-%m-%d'),
'init_date': (datetime.today() - relativedelta(days=datetime.date(datetime.today()).weekday())).strftime('%Y-%m-%d'),
'end_date': (datetime.today() + relativedelta(days=6 - datetime.date(datetime.today()).weekday())).strftime('%Y-%m-%d'),
}
def print_report(self, cr, uid, ids, context=None):
+1 -1
View File
@@ -233,7 +233,7 @@ hr_expense_expense()
class product_product(osv.osv):
_inherit = "product.product"
_columns = {
'hr_expense_ok': fields.boolean('Can be Expensed', help="Determines if the product can be visible in the list of product within a selection from an HR expense sheet line."),
'hr_expense_ok': fields.boolean('Can be Expensed', help="Specify if the product can be selected in an HR expense line."),
}
def on_change_hr_expense_ok(self, cr, uid, id, hr_expense_ok):
+1 -1
View File
@@ -46,7 +46,7 @@
<field name="date_from"/>
<separator/>
<filter icon="terp-check" domain="[('state','=','draft')]" string="To Confirm"/>
<filter icon="terp-camera_test" domain="[('state','=','confirm')]" string="To Approve" name="approve"/>
<filter icon="terp-camera_test" domain="[('state','in',('confirm','validate1'))]" string="To Approve" name="approve"/>
<filter icon="terp-camera_test" domain="[('state','=','validate')]" string="Validated" name="validated"/>
<separator/>
<filter icon="terp-go-year" name="year" string="Year" domain="[('holiday_status_id.active','=',True)]" help="Filters only on allocations and requests that belong to an holiday type that is 'active' (active field is True)"/>
-1
View File
@@ -235,7 +235,6 @@ class hr_applicant(base_stage, osv.Model):
'email_from': lambda s, cr, uid, c: s._get_default_email(cr, uid, c),
'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c),
'department_id': lambda s, cr, uid, c: s._get_default_department_id(cr, uid, c),
'priority': lambda *a: '',
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'hr.applicant', context=c),
'color': 0,
}
@@ -26,8 +26,9 @@ from tools.translate import _
class hr_timesheet_invoice_factor(osv.osv):
_name = "hr_timesheet_invoice.factor"
_description = "Invoice Rate"
_order = 'factor'
_columns = {
'name': fields.char('Internal name', size=128, required=True, translate=True),
'name': fields.char('Internal Name', size=128, required=True, translate=True),
'customer_name': fields.char('Name', size=128, help="Label for the customer"),
'factor': fields.float('Discount (%)', required=True, help="Discount in percentage"),
}
@@ -122,7 +123,7 @@ class account_analytic_line(osv.osv):
_inherit = 'account.analytic.line'
_columns = {
'invoice_id': fields.many2one('account.invoice', 'Invoice', ondelete="set null"),
'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Type of Invoicing', help="It allows to set the discount while making invoice"),
'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Invoiceable', help="It allows to set the discount while making invoice, keep empty if the activities should not be invoiced."),
}
def _default_journal(self, cr, uid, context=None):
@@ -70,7 +70,7 @@ class hr_timesheet_sheet(osv.osv):
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).product_id:
raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must link the employee to a product, like \'Consultant\'.'))
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).journal_id:
raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must assign the employee to an analytic journal, like \'Timesheet\'.'))
raise osv.except_osv(_('Configuration Error!'), _('In order to create a timesheet for this employee, you must assign an analytic journal to the employee, like \'Timesheet Journal\'.'))
return super(hr_timesheet_sheet, self).create(cr, uid, vals, *args, **argv)
def write(self, cr, uid, ids, vals, *args, **argv):
@@ -83,7 +83,7 @@ class hr_timesheet_sheet(osv.osv):
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).product_id:
raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must link the employee to a product.'))
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).journal_id:
raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must assign the employee to an analytic journal.'))
raise osv.except_osv(_('Configuration Error!'), _('In order to create a timesheet for this employee, you must assign an analytic journal to the employee, like \'Timesheet Journal\'.'))
return super(hr_timesheet_sheet, self).write(cr, uid, ids, vals, *args, **argv)
def button_confirm(self, cr, uid, ids, context=None):
+4 -4
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-02-20 09:55+0000\n"
"PO-Revision-Date: 2012-11-02 10:13+0000\n"
"Last-Translator: Erwin van der Ploeg (Endian Solutions) <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:14+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: hr_timesheet_sheet
#: field:hr.analytic.timesheet,sheet_id:0 field:hr.attendance,sheet_id:0
@@ -1008,7 +1008,7 @@ msgstr ""
#. module: hr_timesheet_sheet
#: view:hr_timesheet_sheet.sheet:0
msgid "Submit to Manager"
msgstr ""
msgstr "Aanbieden aan manager"
#. module: hr_timesheet_sheet
#: field:hr_timesheet_sheet.sheet,account_ids:0
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-11-02 05:09+0000\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: hr_timesheet_sheet
+46
View File
@@ -0,0 +1,46 @@
# Chinese (Simplified) translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:15+0000\n"
"PO-Revision-Date: 2012-11-02 15:23+0000\n"
"Last-Translator: 杨清云 <13836962@qq.com>\n"
"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: l10n_ar
#: model:ir.module.module,description:l10n_ar.module_meta_information
msgid ""
"\n"
" Argentinian Accounting : chart of Account\n"
" "
msgstr ""
"\n"
" 阿根廷会计:会计科目表\n"
" "
#. module: l10n_ar
#: model:ir.module.module,shortdesc:l10n_ar.module_meta_information
msgid "Argentinian Chart of Account"
msgstr "阿根廷科目表"
#. module: l10n_ar
#: model:ir.actions.todo,note:l10n_ar.config_call_account_template_in_minimal
msgid ""
"Generate Chart of Accounts from a Chart Template. You will be asked to pass "
"the name of the company, the chart template to follow, the no. of digits to "
"generate the code for your accounts and Bank account, currency to create "
"Journals. Thus,the pure copy of chart Template is generated.\n"
"\tThis is the same wizard that runs from Financial "
"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
"Chart of Accounts from a Chart Template."
msgstr ""
+8 -8
View File
@@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-04-21 06:27+0000\n"
"PO-Revision-Date: 2012-11-03 03:35+0000\n"
"Last-Translator: chiachen <Unknown>\n"
"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:25+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-04 04:55+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account_coda
#: model:account.coda.trans.code,description:account_coda.actcc_09_21
@@ -25,27 +25,27 @@ msgstr "信用卡取现"
#. module: account_coda
#: model:account.coda.trans.category,description:account_coda.actrca_412
msgid "Advice of expiry charges"
msgstr ""
msgstr "费用逾期建议"
#. module: account_coda
#: model:account.coda.trans.code,description:account_coda.actcc_09_11
msgid "Your purchase of luncheon vouchers"
msgstr ""
msgstr "你购买的午餐券"
#. module: account_coda
#: model:account.coda.trans.code,description:account_coda.actcc_11_05
msgid "Partial payment subscription"
msgstr ""
msgstr "分期付款认购"
#. module: account_coda
#: model:account.coda.trans.code,description:account_coda.actcc_01_54
msgid "Unexecutable transfer order"
msgstr ""
msgstr "未执行的转帐"
#. module: account_coda
#: model:account.coda.trans.code,description:account_coda.actcc_01_02
msgid "Individual transfer order initiated by the bank"
msgstr ""
msgstr "银行初始化个人转帐"
#. module: account_coda
#: model:account.coda.trans.code,comment:account_coda.actcc_80_21
+43
View File
@@ -0,0 +1,43 @@
# Chinese (Simplified) translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:15+0000\n"
"PO-Revision-Date: 2012-11-02 14:51+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: l10n_cl
#: model:ir.module.module,description:l10n_cl.module_meta_information
msgid ""
"\n"
" Chilean Accounting : chart of Account\n"
" "
msgstr ""
#. module: l10n_cl
#: model:ir.module.module,shortdesc:l10n_cl.module_meta_information
msgid "Chilean Chart of Account"
msgstr ""
#. module: l10n_cl
#: model:ir.actions.todo,note:l10n_cl.config_call_account_template_in_minimal
msgid ""
"Generate Chart of Accounts from a Chart Template. You will be asked to pass "
"the name of the company, the chart template to follow, the no. of digits to "
"generate the code for your accounts and Bank account, currency to create "
"Journals. Thus,the pure copy of chart Template is generated.\n"
"\tThis is the same wizard that runs from Financial "
"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
"Chart of Accounts from a Chart Template."
msgstr ""
+2 -2
View File
@@ -6,9 +6,9 @@
<field name="inherit_id" ref="base_vat.view_partner_form"/>
<field name="model">res.partner</field>
<field name="arch" type="xml">
<field name="vat" position="after">
<xpath expr="//div[@name='vat_info']" position="after">
<field name="nrc"/>
</field>
</xpath>
</field>
</record>
</data>
+1 -1
View File
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-11-01 04:36+0000\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: l10n_ve
+1 -1
View File
@@ -28,7 +28,7 @@
</record>
<record id="mt_comment" model="mail.message.subtype">
<field name="name">comment</field>
<field name="name">Discussions</field>
</record>
</data>
</openerp>
+1 -1
View File
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-31 04:40+0000\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: mail
+4 -3
View File
@@ -31,14 +31,15 @@ class mail_message_subtype(osv.osv):
_description = 'mail_message_subtype'
_columns = {
'name': fields.char('Message Type', required=True, translate=True,
help='Message subtype, gives a more precise type on the message, '\
help='Message subtype gives a more precise type on the message, '\
'especially for system notifications. For example, it can be '\
'a notification related to a new record (New), or to a stage '\
'change in a process (Stage change). Message subtypes allow to '\
'precisely tune the notifications the user want to receive on its wall.'),
'res_model': fields.char('Model', help="link subtype to model"),
'res_model': fields.char('Model',
help="Related model of the subtype. If False, this subtype exists for all models."),
'default': fields.boolean('Default',
help="When subscribing to the document, this subtype will be checked by default."),
help="Checked by default when subscribing."),
}
_defaults = {
'default': True,
+2 -2
View File
@@ -334,8 +334,8 @@ class test_mail(TestMailMockups):
# ----------------------------------------
subtype_data = group_pigs._get_subscription_data(None, None)[group_pigs.id]['message_subtype_data']
self.assertEqual(set(subtype_data.keys()), set(['comment', 'mt_mg_def', 'mt_all_def', 'mt_mg_nodef', 'mt_all_nodef']), 'mail.group available subtypes incorrect')
self.assertFalse(subtype_data['comment']['followed'], 'Admin should not follow comments in pigs')
self.assertEqual(set(subtype_data.keys()), set(['Discussions', 'mt_mg_def', 'mt_all_def', 'mt_mg_nodef', 'mt_all_nodef']), 'mail.group available subtypes incorrect')
self.assertFalse(subtype_data['Discussions']['followed'], 'Admin should not follow Discussions in pigs')
self.assertTrue(subtype_data['mt_mg_nodef']['followed'], 'Admin should follow mt_mg_nodef in pigs')
self.assertTrue(subtype_data['mt_all_nodef']['followed'], 'Admin should follow mt_all_nodef in pigs')
@@ -46,6 +46,7 @@
res_model="mail.compose.message"
src_model="res.partner"
view_mode="form"
multi="True"
target="new"
key2="client_action_multi"
id="base.action_partner_mass_mail"
+4 -4
View File
@@ -317,7 +317,7 @@ class Partner(osv.osv):
_columns = {
'associate_member': fields.many2one('res.partner', 'Associate Member',help="A member with whom you want to associate your membership.It will consider the membership state of the associated member."),
'member_lines': fields.one2many('membership.membership_line', 'partner', 'Membership'),
'free_member': fields.boolean('Free Member', help = "Select if you want to give membership free of cost."),
'free_member': fields.boolean('Free Member', help = "Select if you want to give free membership."),
'membership_amount': fields.float(
'Membership Amount', digits=(16, 2),
help = 'The price negotiated by the partner'),
@@ -330,12 +330,12 @@ class Partner(osv.osv):
'membership.membership_line': (_get_partner_id, ['state'], 10),
'res.partner': (_get_partners, ['free_member', 'membership_state', 'associate_member'], 10)
}, help="""It indicates the membership state.
-Non Member: A member who has not applied for any membership.
-Non Member: A partner who has not applied for any membership.
-Cancelled Member: A member who has cancelled his membership.
-Old Member: A member whose membership date has expired.
-Waiting Member: A member who has applied for the membership and whose invoice is going to be created.
-Invoiced Member: A member whose invoice has been created.
-Paid Member: A member who has paid the membership amount."""),
-Paying member: A member who has paid the membership fee."""),
'membership_start': fields.function(
_membership_date, multi = 'membeship_start',
string = 'Membership Start Date', type = 'date',
@@ -466,7 +466,7 @@ class Product(osv.osv):
'''Product'''
_inherit = 'product.product'
_columns = {
'membership': fields.boolean('Membership', help='Select if a product is a membership product.'),
'membership': fields.boolean('Membership', help='Check if the product is eligible for membership.'),
'membership_date_from': fields.date('Date from', help='Date from which membership becomes active.'),
'membership_date_to': fields.date('Date to', help='Date until which membership remains active.'),
}
@@ -32,7 +32,7 @@
<act_window name="Invoice Membership"
res_model="membership.invoice"
src_model="res.partner"
multi="False"
multi="True"
key2="client_action_multi"
view_mode="form"
id="action_membership_invoice_view"/>
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-11-02 05:09+0000\n"
"X-Launchpad-Export-Date: 2012-11-03 05:03+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: mrp
+1 -1
View File
@@ -751,7 +751,7 @@
</group>
</group>
</page>
<page string="Work Orders">
<page string="Work Orders" groups="mrp.group_mrp_routings">
<button name="action_compute" states="draft"
string="Compute Data" type="object"
icon="terp-stock_format-scientific"/>
+312
View File
@@ -0,0 +1,312 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * note
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 7.0alpha\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-11-02 12:54+0000\n"
"PO-Revision-Date: 2012-11-02 12:54+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: note
#: sql_constraint:res.users:0
msgid "You can not have two users with the same login !"
msgstr ""
#. module: note
#: field:note.note,memo:0
msgid "Note Content"
msgstr ""
#. module: note
#: view:note.stage:0
msgid "Stages of Notes"
msgstr ""
#. module: note
#: model:ir.model,name:note.model_base_config_settings
msgid "base.config.settings"
msgstr ""
#. module: note
#: model:ir.model,name:note.model_note_tag
msgid "Note Tag"
msgstr ""
#. module: note
#: model:res.groups,name:note.group_note_fancy
msgid "Notes / Fancy mode"
msgstr ""
#. module: note
#: model:ir.model,name:note.model_note_note
#: view:note.note:0
msgid "Note"
msgstr ""
#. module: note
#: view:note.note:0
msgid "Group By..."
msgstr ""
#. module: note
#: field:note.note,message_summary:0
msgid "Summary"
msgstr ""
#. module: note
#: field:note.note,message_follower_ids:0
msgid "Followers"
msgstr ""
#. module: note
#: model:ir.actions.act_window,help:note.action_note_note
msgid "<p class=\"oe_view_nocontent_create\">\n"
" Click to add a personal note.\n"
" </p><p>\n"
" Use notes to organize personal tasks or notes. All\n"
" notes are private; no one else will be able to see them. However\n"
" you can share some notes with other people by inviting followers\n"
" on the note. (Useful for meeting minutes, especially if\n"
" you activate the pad feature for collaborative writings).\n"
" </p><p>\n"
" You can customize how you process your notes/tasks by adding,\n"
" removing or modifying columns.\n"
" </p>\n"
" "
msgstr ""
#. module: note
#: view:note.note:0
msgid "kanban note"
msgstr ""
#. module: note
#: model:note.stage,name:note.demo_note_stage_01
#: model:note.stage,name:note.note_stage_01
msgid "Today"
msgstr ""
#. module: note
#: model:ir.model,name:note.model_res_users
msgid "Users"
msgstr ""
#. module: note
#: view:note.note:0
msgid "í"
msgstr ""
#. module: note
#: view:note.stage:0
msgid "Stage of Notes"
msgstr ""
#. module: note
#: field:note.note,message_unread:0
msgid "Unread Messages"
msgstr ""
#. module: note
#: field:note.note,current_partner_id:0
msgid "unknown"
msgstr ""
#. module: note
#: view:note.note:0
msgid "By sticky note Category"
msgstr ""
#. module: note
#: help:note.note,message_unread:0
msgid "If checked new messages require your attention."
msgstr ""
#. module: note
#: field:note.stage,name:0
msgid "Stage Name"
msgstr ""
#. module: note
#: field:note.note,message_is_follower:0
msgid "Is a Follower"
msgstr ""
#. module: note
#: view:note.note:0
msgid "title"
msgstr ""
#. module: note
#: model:note.stage,name:note.demo_note_stage_02
#: model:note.stage,name:note.note_stage_02
msgid "Tomorrow"
msgstr ""
#. module: note
#: view:note.note:0
#: field:note.note,open:0
msgid "Active"
msgstr ""
#. module: note
#: help:note.stage,user_id:0
msgid "Owner of the note stage."
msgstr ""
#. module: note
#: model:ir.ui.menu,name:note.menu_notes_stage
msgid "Categories"
msgstr ""
#. module: note
#: field:note.note,message_comment_ids:0
#: help:note.note,message_comment_ids:0
msgid "Comments and emails"
msgstr ""
#. module: note
#: field:note.tag,name:0
msgid "Tag Name"
msgstr ""
#. module: note
#: field:note.note,message_ids:0
msgid "Messages"
msgstr ""
#. module: note
#: view:base.config.settings:0
#: model:ir.actions.act_window,name:note.action_note_note
#: model:ir.ui.menu,name:note.menu_note_notes
#: view:note.note:0
#: model:note.stage,name:note.note_stage_04
msgid "Notes"
msgstr ""
#. module: note
#: model:note.stage,name:note.demo_note_stage_03
#: model:note.stage,name:note.note_stage_03
msgid "Later"
msgstr ""
#. module: note
#: model:ir.model,name:note.model_note_stage
msgid "Note Stage"
msgstr ""
#. module: note
#: view:note.note:0
msgid "dropdown menu"
msgstr ""
#. module: note
#: model:note.stage,name:note.demo_note_stage_04
msgid "Morning"
msgstr ""
#. module: note
#: help:note.stage,sequence:0
msgid "Used to order the note stages"
msgstr ""
#. module: note
#: view:note.note:0
msgid "W"
msgstr ""
#. module: note
#: field:note.note,stage_ids:0
msgid "Stages of Users"
msgstr ""
#. module: note
#: field:note.note,name:0
msgid "Note Summary"
msgstr ""
#. module: note
#: model:ir.actions.act_window,name:note.action_note_stage
#: view:note.note:0
msgid "Stages"
msgstr ""
#. module: note
#: help:note.note,message_ids:0
msgid "Messages and communication history"
msgstr ""
#. module: note
#: view:note.note:0
msgid "Delete"
msgstr ""
#. module: note
#: field:note.note,color:0
msgid "Color Index"
msgstr ""
#. module: note
#: field:note.note,sequence:0
#: field:note.stage,sequence:0
msgid "Sequence"
msgstr ""
#. module: note
#: field:note.note,tag_ids:0
msgid "Tags"
msgstr ""
#. module: note
#: view:note.note:0
msgid "Archive"
msgstr ""
#. module: note
#: field:base.config.settings,module_note_pad:0
msgid "Use collaborative pads (etherpad)"
msgstr ""
#. module: note
#: help:note.note,message_summary:0
msgid "Holds the Chatter summary (number of messages, ...). This summary is directly in html format in order to be inserted in kanban views."
msgstr ""
#. module: note
#: field:base.config.settings,group_note_fancy:0
msgid "Use fancy layouts for notes"
msgstr ""
#. module: note
#: field:note.stage,user_id:0
msgid "Owner"
msgstr ""
#. module: note
#: constraint:res.users:0
msgid "The chosen company is not in the allowed companies for this user"
msgstr ""
#. module: note
#: view:note.note:0
#: field:note.note,stage_id:0
msgid "Stage"
msgstr ""
#. module: note
#: field:note.note,date_done:0
msgid "Date done"
msgstr ""
#. module: note
#: field:note.stage,fold:0
msgid "Folded by Default"
msgstr ""
+19 -1
View File
@@ -29,7 +29,7 @@ class note_stage(osv.osv):
_name = "note.stage"
_description = "Note Stage"
_columns = {
'name': fields.char('Stage Name', required=True),
'name': fields.char('Stage Name', translate=True, required=True),
'sequence': fields.integer('Sequence', help="Used to order the note stages"),
'user_id': fields.many2one('res.users', 'Owner', help="Owner of the note stage.", required=True),
'fold': fields.boolean('Folded by Default'),
@@ -186,3 +186,21 @@ class note_base_config_settings(osv.osv_memory):
'module_note_pad': fields.boolean('Use collaborative pads (etherpad)'),
'group_note_fancy': fields.boolean('Use fancy layouts for notes', implied_group='note.group_note_fancy'),
}
class res_users(osv.Model):
_name = 'res.users'
_inherit = ['res.users']
def create(self, cr, uid, data, context=None):
user_id = super(res_users, self).create(cr, uid, data, context=context)
user = self.browse(cr, uid, uid, context=context)
note_obj = self.pool.get('note.stage')
data_obj = self.pool.get('ir.model.data')
model_id = data_obj.get_object_reference(cr, uid, 'base', 'group_user') #Employee Group
group_id = model_id and model_id[1] or False
if group_id in [x.id for x in user.groups_id]:
for note_xml_id in ['note_stage_01','note_stage_02','note_stage_03','note_stage_04']:
data_id = data_obj._get_id(cr, uid, 'note', note_xml_id)
stage_id = data_obj.browse(cr, uid, data_id, context=context).res_id
note_obj.copy(cr, uid, stage_id, default = {
'user_id': user_id}, context=context)
return user_id
+8 -2
View File
@@ -9,16 +9,22 @@
</record>
<record model="note.stage" id="note_stage_02">
<field name="name">Later</field>
<field name="name">This Week</field>
<field name="sequence">2</field>
<field name="user_id" eval="ref('base.user_root')"/>
</record>
<record model="note.stage" id="note_stage_03">
<field name="name">Notes</field>
<field name="name">Later</field>
<field name="sequence">3</field>
<field name="user_id" eval="ref('base.user_root')"/>
</record>
<record model="note.stage" id="note_stage_04">
<field name="name">Notes</field>
<field name="sequence">4</field>
<field name="user_id" eval="ref('base.user_root')"/>
</record>
</data>
</openerp>
+1 -1
View File
@@ -20,7 +20,7 @@
</record>
<record model="note.stage" id="demo_note_stage_04">
<field name="name">Morning</field>
<field name="name">This Week</field>
<field name="sequence">4</field>
<field name="user_id" ref="base.user_root"/>
</record>
+10 -4
View File
@@ -4,10 +4,13 @@ import random
import re
import string
import urllib2
import logging
from tools.translate import _
from openerp.tools.misc import html2plaintext
from py_etherpad import EtherpadLiteClient
_logger = logging.getLogger(__name__)
class pad_common(osv.osv_memory):
_name = 'pad.common'
@@ -59,10 +62,13 @@ class pad_common(osv.osv_memory):
def pad_get_content(self, cr, uid, url, context=None):
content = ''
if url:
page = urllib2.urlopen('%s/export/html'%url).read()
mo = re.search('<body>(.*)</body>',page)
if mo:
content = mo.group(1)
try:
page = urllib2.urlopen('%s/export/html'%url).read()
mo = re.search('<body>(.*)</body>',page)
if mo:
content = mo.group(1)
except:
_logger.warning("No url found '%s'.", url)
return content
# TODO
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-11-01 04:36+0000\n"
"X-Launchpad-Export-Date: 2012-11-03 05:03+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: point_of_sale
+67 -61
View File
@@ -296,49 +296,55 @@ class pos_session(osv.osv):
]
def create(self, cr, uid, values, context=None):
config_id = values.get('config_id', False) or False
if config_id:
# journal_id is not required on the pos_config because it does not
# exists at the installation. If nothing is configured at the
# installation we do the minimal configuration. Impossible to do in
# the .xml files as the CoA is not yet installed.
jobj = self.pool.get('pos.config')
pos_config = jobj.browse(cr, uid, config_id, context=context)
if not pos_config.journal_id:
jid = jobj.default_get(cr, uid, ['journal_id'], context=context)['journal_id']
if jid:
jobj.write(cr, uid, [pos_config.id], {'journal_id': jid}, context=context)
else:
raise osv.except_osv( _('error!'),
_("Unable to open the session. You have to assign a sale journal to your point of sale."))
context = context or {}
config_id = values.get('config_id', False) or context.get('default_config_id', False)
if not config_id:
raise osv.except_osv( _('Error!'),
_("You should assign a Point of Sale to your session."))
# define some cash journal if no payment method exists
if not pos_config.journal_ids:
journal_proxy = self.pool.get('account.journal')
cashids = journal_proxy.search(cr, uid, [('journal_user', '=', True), ('type','=','cash')], context=context)
# journal_id is not required on the pos_config because it does not
# exists at the installation. If nothing is configured at the
# installation we do the minimal configuration. Impossible to do in
# the .xml files as the CoA is not yet installed.
jobj = self.pool.get('pos.config')
pos_config = jobj.browse(cr, uid, config_id, context=context)
context.update({'company_id': pos_config.shop_id.company_id.id})
if not pos_config.journal_id:
jid = jobj.default_get(cr, uid, ['journal_id'], context=context)['journal_id']
if jid:
jobj.write(cr, uid, [pos_config.id], {'journal_id': jid}, context=context)
else:
raise osv.except_osv( _('error!'),
_("Unable to open the session. You have to assign a sale journal to your point of sale."))
# define some cash journal if no payment method exists
if not pos_config.journal_ids:
journal_proxy = self.pool.get('account.journal')
cashids = journal_proxy.search(cr, uid, [('journal_user', '=', True), ('type','=','cash')], context=context)
if not cashids:
cashids = journal_proxy.search(cr, uid, [('type', '=', 'cash')], context=context)
if not cashids:
cashids = journal_proxy.search(cr, uid, [('type', '=', 'cash')], context=context)
if not cashids:
cashids = journal_proxy.search(cr, uid, [('journal_user','=',True)], context=context)
cashids = journal_proxy.search(cr, uid, [('journal_user','=',True)], context=context)
jobj.write(cr, uid, [pos_config.id], {'journal_ids': [(6,0, cashids)]})
jobj.write(cr, uid, [pos_config.id], {'journal_ids': [(6,0, cashids)]})
pos_config = jobj.browse(cr, uid, config_id, context=context)
bank_statement_ids = []
for journal in pos_config.journal_ids:
bank_values = {
'journal_id' : journal.id,
'user_id' : uid,
}
statement_id = self.pool.get('account.bank.statement').create(cr, uid, bank_values, context=context)
bank_statement_ids.append(statement_id)
pos_config = jobj.browse(cr, uid, config_id, context=context)
bank_statement_ids = []
for journal in pos_config.journal_ids:
bank_values = {
'journal_id' : journal.id,
'user_id' : uid,
'company_id' : pos_config.shop_id.company_id.id
}
statement_id = self.pool.get('account.bank.statement').create(cr, uid, bank_values, context=context)
bank_statement_ids.append(statement_id)
values.update({
'name' : pos_config.sequence_id._next(),
'statement_ids' : [(6, 0, bank_statement_ids)],
'config_id': config_id
})
values.update({
'name' : pos_config.sequence_id._next(),
'statement_ids' : [(6, 0, bank_statement_ids)],
'config_id': config_id
})
return super(pos_session, self).create(cr, uid, values, context=context)
@@ -390,7 +396,7 @@ class pos_session(osv.osv):
def wkf_action_closing_control(self, cr, uid, ids, context=None):
for session in self.browse(cr, uid, ids, context=context):
for statement in session.statement_ids:
if statement != session.cash_register_id and statement.balance_end != statement.balance_end_real:
if (statement != session.cash_register_id) and (statement.balance_end != statement.balance_end_real):
self.pool.get('account.bank.statement').write(cr, uid, [statement.id], {'balance_end_real': statement.balance_end})
return self.write(cr, uid, ids, {'state' : 'closing_control', 'stop_at' : time.strftime('%Y-%m-%d %H:%M:%S')}, context=context)
@@ -493,17 +499,26 @@ class pos_order(osv.osv):
self.add_payment(cr, uid, order_id, {
'amount': payment['amount'] or 0.0,
'payment_date': payment['name'],
'statement_id': payment['statement_id'],
'payment_name': payment.get('note', False),
'journal': payment['journal_id']
}, context=context)
if order['amount_return']:
session = self.pool.get('pos.session').browse(cr, uid, order['pos_session_id'], context=context)
cash_journal = session.cash_journal_id
cash_statement = False
if not cash_journal:
cash_journal_ids = filter(lambda st: st.journal_id.type=='cash', session.statement_ids)
if not len(cash_journal_ids):
raise osv.except_osv( _('error!'),
_("No cash statement found for this session. Unable to record returned cash."))
cash_journal = cash_journal_ids[0].journal_id
self.add_payment(cr, uid, order_id, {
'amount': -order['amount_return'],
'payment_date': time.strftime('%Y-%m-%d %H:%M:%S'),
'payment_name': _('return'),
'journal': session.cash_journal_id.id
'journal': cash_journal.id,
}, context=context)
order_ids.append(order_id)
wf_service = netsvc.LocalService("workflow")
@@ -703,21 +718,15 @@ class pos_order(osv.osv):
"""Create a new payment for the order"""
if not context:
context = {}
statement_obj = self.pool.get('account.bank.statement')
statement_line_obj = self.pool.get('account.bank.statement.line')
prod_obj = self.pool.get('product.product')
property_obj = self.pool.get('ir.property')
curr_c = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id
curr_company = curr_c.id
order = self.browse(cr, uid, order_id, context=context)
args = {
'amount': data['amount'],
'date': data.get('payment_date', time.strftime('%Y-%m-%d')),
'name': order.name + ': ' + (data.get('payment_name', '') or ''),
}
if 'payment_date' in data:
args['date'] = data['payment_date']
args['name'] = order.name
if data.get('payment_name', False):
args['name'] = args['name'] + ': ' + data['payment_name']
account_def = property_obj.get(cr, uid, 'property_account_receivable', 'res.partner', context=context)
args['account_id'] = (order.partner_id and order.partner_id.property_account_receivable \
and order.partner_id.property_account_receivable.id) or (account_def and account_def.id) or False
@@ -732,14 +741,15 @@ class pos_order(osv.osv):
context.pop('pos_session_id', False)
try:
journal_id = long(data['journal'])
except Exception:
journal_id = False
journal_id = data.get('journal', False)
statement_id = data.get('statement_id', False)
assert journal_id or statement_id, "No statement_id or journal_id passed to the method!"
statement_id = False
for statement in order.session_id.statement_ids:
if statement.journal_id.id == journal_id:
if statement.id == statement_id:
journal_id = statement.journal_id.id
break
elif statement.journal_id.id == journal_id:
statement_id = statement.id
break
@@ -756,10 +766,6 @@ class pos_order(osv.osv):
statement_line_obj.create(cr, uid, args, context=context)
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'pos.order', order_id, 'paid', cr)
wf_service.trg_write(uid, 'pos.order', order_id, cr)
return statement_id
def refund(self, cr, uid, ids, context=None):
@@ -1297,11 +1303,11 @@ class product_product(osv.osv):
# return result
_columns = {
'income_pdt': fields.boolean('Point of Sale Cash In', help="This is a product you can use to put cash into a statement for the point of sale backend."),
'expense_pdt': fields.boolean('Point of Sale Cash Out', help="This is a product you can use to take cash from a statement for the point of sale backend, exemple: money lost, transfer to bank, etc."),
'income_pdt': fields.boolean('Point of Sale Cash In', help="Check if, this is a product you can use to put cash into a statement for the point of sale backend."),
'expense_pdt': fields.boolean('Point of Sale Cash Out', help="Check if, this is a product you can use to take cash from a statement for the point of sale backend, example: money lost, transfer to bank, etc."),
'pos_categ_id': fields.many2one('pos.category','Point of Sale Category',
help="If you want to sell this product through the point of sale, select the category it belongs to."),
'to_weight' : fields.boolean('To Weigh', help="This category contains products that should to be weighed, mainly used for the self-checkout interface"),
'to_weight' : fields.boolean('To Weigh', help="Check if the product should be weighted (mainly used with self check-out interface)."),
}
def _default_pos_categ_id(self, cr, uid, context=None):
@@ -152,7 +152,7 @@
<record model="workflow.transition" id="trans_open_to_close">
<field name="act_from" ref="act_open" />
<field name="act_to" ref="act_close" />
<field name="act_to" ref="act_closing_control" />
<field name="signal">close</field>
<field name="condition">cash_control == False</field>
</record>
@@ -163,5 +163,13 @@
<field name="signal">close</field>
</record>
<record model="workflow.transition" id="trans_closing_control_to_close_no_control">
<field name="act_from" ref="act_closing_control" />
<field name="act_to" ref="act_close" />
<field name="condition">cash_control == False</field>
</record>
</data>
</openerp>
@@ -43,8 +43,6 @@ class account_journal(osv.osv):
return super(account_journal, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)
account_journal()
class pos_make_payment(osv.osv_memory):
_name = 'pos.make.payment'
_description = 'Point of Sale Payment'
+3 -3
View File
@@ -633,9 +633,9 @@ class product_template(osv.osv):
_inherit="product.template"
_columns = {
'type': fields.selection([('product','Stockable Product'),('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Will change the way procurements are processed. Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual."),
'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Procurement Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until re-supplying. 'Make to Order': When needed, purchase or produce for the procurement request."),
'supply_method': fields.selection([('produce','Manufacture'),('buy','Buy')], 'Supply Method', required=True, help="Produce will generate production order or tasks, according to the product type. Buy will trigger purchase orders when requested."),
'type': fields.selection([('product','Stockable Product'),('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Consumable: Will not imply stock management for this product. \nStockable product: Will imply stock management for this product."),
'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Procurement Method', required=True, help="Make to Stock: When needed, the product is taken from the stock or we wait for replenishment. \nMake to Order: When needed, the product is purchased or produced."),
'supply_method': fields.selection([('produce','Manufacture'),('buy','Buy')], 'Supply Method', required=True, help="Manufacture: When procuring the product, a manufacturing order or a task will be generated, depending on the product type. \nBuy: When procuring the product, a purchase order will be generated."),
}
_defaults = {
'procure_method': 'make_to_stock',
+8 -8
View File
@@ -95,7 +95,7 @@ class product_pricelist(osv.osv):
_description = "Pricelist"
_columns = {
'name': fields.char('Pricelist Name',size=64, required=True, translate=True),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the pricelist without removing it."),
'active': fields.boolean('Active', help="If unchecked, it will allow you to hide the pricelist without removing it."),
'type': fields.selection(_pricelist_type_get, 'Pricelist Type', required=True),
'version_id': fields.one2many('product.pricelist.version', 'pricelist_id', 'Pricelist Versions'),
'currency_id': fields.many2one('res.currency', 'Currency', required=True),
@@ -319,8 +319,8 @@ class product_pricelist_version(osv.osv):
"and reactivate the pricelist"),
'items_id': fields.one2many('product.pricelist.item',
'price_version_id', 'Price List Items', required=True),
'date_start': fields.date('Start Date', help="Starting date for this pricelist version to be valid."),
'date_end': fields.date('End Date', help="Ending date for this pricelist version to be valid."),
'date_start': fields.date('Start Date', help="First valid date for the version."),
'date_end': fields.date('End Date', help="Last valid date for the version."),
'company_id': fields.related('pricelist_id','company_id',type='many2one',
readonly=True, relation='res.company', string='Company', store=True)
}
@@ -403,13 +403,13 @@ class product_pricelist_item(osv.osv):
_columns = {
'name': fields.char('Rule Name', size=64, help="Explicit rule name for this pricelist line."),
'price_version_id': fields.many2one('product.pricelist.version', 'Price List Version', required=True, select=True, ondelete='cascade'),
'product_tmpl_id': fields.many2one('product.template', 'Product Template', ondelete='cascade', help="Set a template if this rule only apply to a template of product. Keep empty for all products"),
'product_id': fields.many2one('product.product', 'Product', ondelete='cascade', help="Set a product if this rule only apply to one product. Keep empty for all products"),
'categ_id': fields.many2one('product.category', 'Product Category', ondelete='cascade', help="Set a category of product if this rule only apply to products of a category and his children. Keep empty for all products"),
'product_tmpl_id': fields.many2one('product.template', 'Product Template', ondelete='cascade', help="Specify a template if this rule only applies to one product template. Keep empty otherwise."),
'product_id': fields.many2one('product.product', 'Product', ondelete='cascade', help="Specify a product if this rule only applies to one product. Keep empty otherwise."),
'categ_id': fields.many2one('product.category', 'Product Category', ondelete='cascade', help="Specify a product category if this rule only applies to products belonging to this category or its children categories. Keep empty otherwise."),
'min_quantity': fields.integer('Min. Quantity', required=True, help="The rule only applies if the partner buys/sells equal to or more than this quantity."),
'min_quantity': fields.integer('Min. Quantity', required=True, help="Specify the minimum quantity that needs to be bought/sold for the rule to apply."),
'sequence': fields.integer('Sequence', required=True, help="Gives the order in which the pricelist items will be checked. The evaluation gives highest priority to lowest sequence and stops as soon as a matching item is found."),
'base': fields.selection(_price_field_get, 'Based on', required=True, size=-1, help="The mode for computing the price for this rule."),
'base': fields.selection(_price_field_get, 'Based on', required=True, size=-1, help="Base price for computation."),
'base_pricelist_id': fields.many2one('product.pricelist', 'Other Pricelist'),
'price_surcharge': fields.float('Price Surcharge',
+15 -16
View File
@@ -111,9 +111,9 @@ class product_uom(osv.osv):
_columns = {
'name': fields.char('Unit of Measure', size=64, required=True, translate=True),
'category_id': fields.many2one('product.uom.categ', 'Category', required=True, ondelete='cascade',
help="Quantity conversions may happen automatically between Units of Measure in the same category, according to their respective ratios."),
help="Conversion between Units of Measure can only occur if they belong to the same category. The conversion will be made based on the ratios."),
'factor': fields.float('Ratio', required=True,digits=(12, 12),
help='How many times this Unit of Measure is smaller than the reference Unit of Measure in this category:\n'\
help='How much bigger or smaller this unit is compared to the reference Unit of Measure for this category:\n'\
'1 * (reference unit) = ratio * (this unit)'),
'factor_inv': fields.function(_factor_inv, digits=(12,12),
fnct_inv=_factor_inv_write,
@@ -233,7 +233,7 @@ class product_category(osv.osv):
'parent_id': fields.many2one('product.category','Parent Category', select=True, ondelete='cascade'),
'child_id': fields.one2many('product.category', 'parent_id', string='Child Categories'),
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of product categories."),
'type': fields.selection([('view','View'), ('normal','Normal')], 'Category Type'),
'type': fields.selection([('view','View'), ('normal','Normal')], 'Category Type', help="A category of the view type is a virtual category that can be used as the parent of another category to create a hierarchical structure."),
'parent_left': fields.integer('Left Parent', select=1),
'parent_right': fields.integer('Right Parent', select=1),
}
@@ -276,34 +276,34 @@ class product_template(osv.osv):
_columns = {
'name': fields.char('Name', size=128, required=True, translate=True, select=True),
'product_manager': fields.many2one('res.users','Product Manager',help="Responsible for product."),
'product_manager': fields.many2one('res.users','Product Manager'),
'description': fields.text('Description',translate=True),
'description_purchase': fields.text('Purchase Description',translate=True),
'description_sale': fields.text('Sale Description',translate=True),
'type': fields.selection([('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual."),
'produce_delay': fields.float('Manufacturing Lead Time', help="Average delay in days to produce this product. This is only for the production order and, if it is a multi-level bill of material, it's only for the level of this product. Different lead times will be summed for all levels and purchase orders."),
'produce_delay': fields.float('Manufacturing Lead Time', help="Average delay in days to produce this product. In the case of multi-level BOM, the manufacturing lead times of the components will be added."),
'rental': fields.boolean('Can be Rent'),
'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),
'list_price': fields.float('Sale Price', digits_compute=dp.get_precision('Product Price'), help="Base price for computing the customer price. Sometimes called the catalog price."),
'standard_price': fields.float('Cost', digits_compute=dp.get_precision('Product Price'), help="Product's cost for accounting stock valuation. It is the base price for the supplier price.", groups="base.group_user"),
'list_price': fields.float('Sale Price', digits_compute=dp.get_precision('Product Price'), help="Base price to compute the customer price. Sometimes called the catalog price."),
'standard_price': fields.float('Cost', digits_compute=dp.get_precision('Product Price'), help="Cost price of the product used for standard stock valuation in accounting and used as a base price on purchase orders.", groups="base.group_user"),
'volume': fields.float('Volume', help="The volume in m3."),
'weight': fields.float('Gross Weight', digits_compute=dp.get_precision('Stock Weight'), help="The gross weight in Kg."),
'weight_net': fields.float('Net Weight', digits_compute=dp.get_precision('Stock Weight'), help="The net weight in Kg."),
'cost_method': fields.selection([('standard','Standard Price'), ('average','Average Price')], 'Costing Method', required=True,
help="Standard Price: the cost price is fixed and recomputed periodically (usually at the end of the year), Average Price: the cost price is recomputed at each reception of products."),
help="Standard Price: The cost price is manually updated at the end of a specific period (usually every year). \nAverage Price: The cost price is recomputed at each incoming shipment."),
'warranty': fields.float('Warranty'),
'sale_ok': fields.boolean('Can be Sold', help="Determines if the product can be visible in the list of product within a selection from a sale order line."),
'sale_ok': fields.boolean('Can be Sold', help="Specify if the product can be selected in a sales order line."),
'state': fields.selection([('',''),
('draft', 'In Development'),
('sellable','Normal'),
('end','End of Lifecycle'),
('obsolete','Obsolete')], 'Status', help="Tells the user if he can use the product or not."),
('obsolete','Obsolete')], 'Status'),
'uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True, help="Default Unit of Measure used for all stock operation."),
'uom_po_id': fields.many2one('product.uom', 'Purchase Unit of Measure', required=True, help="Default Unit of Measure used for purchase orders. It must be in the same category than the default unit of measure."),
'uos_id' : fields.many2one('product.uom', 'Unit of Sale',
help='Used by companies that manage two units of measure: invoicing and inventory management. For example, in food industries, you will manage a stock of ham but invoice in Kg. Keep empty to use the default Unit of Measure.'),
help='Sepcify a unit of measure here if invoicing is made in another unit of measure than inventory. Keep empty to use the default unit of measure.'),
'uos_coeff': fields.float('Unit of Measure -> UOS Coeff', digits_compute= dp.get_precision('Product UoS'),
help='Coefficient to convert Unit of Measure to UOS\n'
help='Coefficient to convert default Unit of Measure to Unit of Sale\n'
' uos = uom * coeff'),
'mes_type': fields.selection((('fixed', 'Fixed'), ('variable', 'Variable')), 'Measure Type'),
'seller_ids': fields.one2many('product.supplierinfo', 'product_id', 'Partners'),
@@ -527,10 +527,10 @@ class product_product(osv.osv):
'code': fields.function(_product_code, type='char', string='Internal Reference'),
'partner_ref' : fields.function(_product_partner_ref, type='char', string='Customer ref'),
'default_code' : fields.char('Internal Reference', size=64, select=True),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the product without removing it."),
'active': fields.boolean('Active', help="If unchecked, it will allow you to hide the product without removing it."),
'variants': fields.char('Variants', size=64),
'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete="cascade"),
'ean13': fields.char('EAN13 Barcode', size=13, help="The numbers encoded in EAN-13 bar codes are product identification numbers."),
'ean13': fields.char('EAN13 Barcode', size=13, help="International Article Number used for product identification."),
'packaging' : fields.one2many('product.packaging', 'product_id', 'Logistical Units', help="Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."),
'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Product Price')),
'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Product Price')),
@@ -763,8 +763,7 @@ class product_packaging(osv.osv):
help="The code of the transport unit."),
'weight': fields.float('Total Package Weight',
help='The weight of a full package, pallet or box.'),
'weight_ul': fields.float('Empty Package Weight',
help='The weight of the empty UL'),
'weight_ul': fields.float('Empty Package Weight'),
'height': fields.float('Height', help='The height of the package'),
'width': fields.float('Width', help='The width of the package'),
'length': fields.float('Length', help='The length of the package'),
+2 -8
View File
@@ -96,7 +96,7 @@
<field name="price_extra" groups="product.group_product_variant"/>
</group>
</group>
<field name="description" placeholder="describe the product's characteristics for internal use..."/>
<field name="description" placeholder="describe the product characteristics for internal use..."/>
</page>
<page string="Procurements" groups="base.group_user">
<group name="procurement">
@@ -318,17 +318,11 @@
</h1>
</div>
<group>
<group>
<group name="parent" col="4">
<field name="parent_id"/>
</group>
<group>
<field name="type"/>
</group>
</group>
<group name="basic">
<group name="account_property" string="Account Properties"/>
<group name="account_stock_property" string="Account Stock Properties"/>
</group>
</sheet>
</form>
</field>
+36 -11
View File
@@ -1129,13 +1129,36 @@ class task(base_stage, osv.osv):
}, context=context)
return True
def _subscribe_project_followers_to_task(self, cr, uid, task_id, context=None):
""" TDE note: not the best way to do this, we could override _get_followers
of task, and perform a better mapping of subtypes than a mapping
based on names.
However we will keep this implementation, maybe to be refactored
in 7.1 of future versions. """
# task followers are project followers, with matching subtypes
task_record = self.browse(cr, uid, task_id, context=context)
subtype_obj = self.pool.get('mail.message.subtype')
follower_obj = self.pool.get('mail.followers')
if task_record.project_id:
# create mapping
task_subtype_ids = subtype_obj.search(cr, uid, ['|', ('res_model', '=', False), ('res_model', '=', self._name)], context=context)
task_subtypes = subtype_obj.browse(cr, uid, task_subtype_ids, context=context)
# fetch subscriptions
follower_ids = follower_obj.search(cr, uid, [('res_model', '=', 'project.project'), ('res_id', '=', task_record.project_id.id)], context=context)
# copy followers
for follower in follower_obj.browse(cr, uid, follower_ids, context=context):
if not follower.subtype_ids:
continue
project_subtype_names = [project_subtype.name for project_subtype in follower.subtype_ids]
task_subtype_ids = [task_subtype.id for task_subtype in task_subtypes if task_subtype.name in project_subtype_names]
self.message_subscribe(cr, uid, [task_id], [follower.partner_id.id],
subtype_ids=task_subtype_ids, context=context)
def create(self, cr, uid, vals, context=None):
task_id = super(task, self).create(cr, uid, vals, context=context)
task_record = self.browse(cr, uid, task_id, context=context)
if task_record.project_id:
project_follower_ids = [follower.id for follower in task_record.project_id.message_follower_ids]
self.message_subscribe(cr, uid, [task_id], project_follower_ids,
context=context)
# subscribe project followers to the task
self._subscribe_project_followers_to_task(cr, uid, task_id, context=context)
self._store_history(cr, uid, [task_id], context=context)
self.create_send_note(cr, uid, [task_id], context=context)
return task_id
@@ -1145,9 +1168,6 @@ class task(base_stage, osv.osv):
def write(self, cr, uid, ids, vals, context=None):
if isinstance(ids, (int, long)):
ids = [ids]
if vals.get('project_id'):
project_id = self.pool.get('project.project').browse(cr, uid, vals.get('project_id'), context=context)
vals['message_follower_ids'] = [(4, follower.id) for follower in project_id.message_follower_ids]
if vals and not 'kanban_state' in vals and 'stage_id' in vals:
new_stage = vals.get('stage_id')
vals_reset_kstate = dict(vals, kanban_state='normal')
@@ -1157,13 +1177,18 @@ class task(base_stage, osv.osv):
#if new_stage not in stages:
#raise osv.except_osv(_('Warning!'), _('Stage is not defined in the project.'))
write_vals = vals_reset_kstate if t.stage_id != new_stage else vals
super(task,self).write(cr, uid, [t.id], write_vals, context=context)
super(task, self).write(cr, uid, [t.id], write_vals, context=context)
self.stage_set_send_note(cr, uid, [t.id], new_stage, context=context)
result = True
else:
result = super(task,self).write(cr, uid, ids, vals, context=context)
result = super(task, self).write(cr, uid, ids, vals, context=context)
if ('stage_id' in vals) or ('remaining_hours' in vals) or ('user_id' in vals) or ('state' in vals) or ('kanban_state' in vals):
self._store_history(cr, uid, ids, context=context)
# subscribe new project followers to the task
if vals.get('project_id'):
for id in ids:
self._subscribe_project_followers_to_task(cr, uid, id, context=context)
return result
def unlink(self, cr, uid, ids, context=None):
@@ -1325,7 +1350,7 @@ class account_analytic_account(osv.osv):
_inherit = 'account.analytic.account'
_description = 'Analytic Account'
_columns = {
'use_tasks': fields.boolean('Tasks',help="If check,this contract will be available in the project menu and you will be able to manage tasks or track issues"),
'use_tasks': fields.boolean('Tasks',help="If checked, this contract will be available in the project menu and you will be able to manage tasks or track issues"),
'company_uom_id': fields.related('company_id', 'project_time_mode_id', type='many2one', relation='product.uom'),
}
+10 -10
View File
@@ -86,37 +86,37 @@
<!-- mail: subtypes -->
<record id="mt_project_new" model="mail.message.subtype">
<field name="name">New Task</field>
<field name="name">New</field>
<field name="res_model">project.project</field>
<field name="default" eval="False"/>
</record>
<record id="mt_project_closed" model="mail.message.subtype">
<field name="name">Task Closed</field>
<field name="name">Closed</field>
<field name="res_model">project.project</field>
</record>
<record id="mt_project_canceled" model="mail.message.subtype">
<field name="name">Task Canceled</field>
<field name="res_model">project.task</field>
<field name="name">Canceled</field>
<field name="res_model">project.project</field>
</record>
<record id="mt_project_stage" model="mail.message.subtype">
<field name="name">Task Stage Changed</field>
<field name="res_model">project.task</field>
<field name="name">Stage Changed</field>
<field name="res_model">project.project</field>
</record>
<record id="mt_task_new" model="mail.message.subtype">
<field name="name">New Task</field>
<field name="name">New</field>
<field name="res_model">project.task</field>
</record>
<record id="mt_task_closed" model="mail.message.subtype">
<field name="name">Task Closed</field>
<field name="name">Closed</field>
<field name="res_model">project.task</field>
</record>
<record id="mt_task_canceled" model="mail.message.subtype">
<field name="name">Task canceled</field>
<field name="name">Canceled</field>
<field name="res_model">project.task</field>
</record>
<record id="mt_task_change" model="mail.message.subtype">
<field name="name">Task Stage Changed</field>
<field name="name">Stage Changed</field>
<field name="res_model">project.task</field>
</record>
+35 -8
View File
@@ -359,22 +359,49 @@ class project_issue(base_stage, osv.osv):
return super(project_issue, self).copy(cr, uid, id, default=default,
context=context)
def _subscribe_project_followers_to_issue(self, cr, uid, task_id, context=None):
""" TDE note: not the best way to do this, we could override _get_followers
of issue, and perform a better mapping of subtypes than a mapping
based on names.
However we will keep this implementation, maybe to be refactored
in 7.1 of future versions. """
# task followers are project followers, with matching subtypes
task_record = self.browse(cr, uid, task_id, context=context)
subtype_obj = self.pool.get('mail.message.subtype')
follower_obj = self.pool.get('mail.followers')
if task_record.project_id:
# create mapping
task_subtype_ids = subtype_obj.search(cr, uid, ['|', ('res_model', '=', False), ('res_model', '=', self._name)], context=context)
task_subtypes = subtype_obj.browse(cr, uid, task_subtype_ids, context=context)
# fetch subscriptions
follower_ids = follower_obj.search(cr, uid, [('res_model', '=', 'project.project'), ('res_id', '=', task_record.project_id.id)], context=context)
# copy followers
for follower in follower_obj.browse(cr, uid, follower_ids, context=context):
if not follower.subtype_ids:
continue
project_subtype_names = [project_subtype.name for project_subtype in follower.subtype_ids]
task_subtype_ids = [task_subtype.id for task_subtype in task_subtypes if task_subtype.name in project_subtype_names]
self.message_subscribe(cr, uid, [task_id], [follower.partner_id.id],
subtype_ids=task_subtype_ids, context=context)
def write(self, cr, uid, ids, vals, context=None):
#Update last action date every time the user change the stage, the state or send a new email
logged_fields = ['stage_id', 'state', 'message_ids']
if any([field in vals for field in logged_fields]):
vals['date_action_last'] = time.strftime('%Y-%m-%d %H:%M:%S')
# subscribe new project followers to the issue
if vals.get('project_id'):
project_id = self.pool.get('project.project').browse(cr, uid, vals.get('project_id'), context=context)
vals['message_follower_ids'] = [(4, follower.id) for follower in project_id.message_follower_ids]
for id in ids:
self._subscribe_project_followers_to_issue(cr, uid, id, context=context)
return super(project_issue, self).write(cr, uid, ids, vals, context)
def onchange_task_id(self, cr, uid, ids, task_id, context=None):
if not task_id:
return {'value':{}}
return {'value': {}}
task = self.pool.get('project.task').browse(cr, uid, task_id, context=context)
return {'value':{'user_id': task.user_id.id,}}
return {'value': {'user_id': task.user_id.id, }}
def case_reset(self, cr, uid, ids, context=None):
"""Resets case as draft
@@ -385,11 +412,11 @@ class project_issue(base_stage, osv.osv):
def create(self, cr, uid, vals, context=None):
obj_id = super(project_issue, self).create(cr, uid, vals, context=context)
project_id = self.browse(cr, uid, obj_id, context=context).project_id
if project_id:
followers = [follower.id for follower in project_id.message_follower_ids]
self.message_subscribe(cr, uid, [obj_id], followers, context=context)
# subscribe project follower to the issue
self._subscribe_project_followers_to_issue(cr, uid, obj_id, context=context)
self.create_send_note(cr, uid, [obj_id], context=context)
return obj_id
# -------------------------------------------------------
+10 -8
View File
@@ -44,17 +44,19 @@ Access all issues from the top Project menu, and access the issues of a specific
<!-- Mail subtypes -->
<record id="mail.mt_issue_new" model="mail.message.subtype">
<field name="name">created</field>
<field name="name">New</field>
<field name="res_model">project.issue</field>
<field name="default" eval="False"/>
</record>
<record id="mail.mt_issue_new" model="mail.message.subtype">
<field name="name">stage change</field>
<field name="res_model">project.issue</field>
<field name="default" eval="False"/>
</record>
<record id="mail.mt_issue_closed" model="mail.message.subtype">
<field name="name">closed</field>
<field name="name">Closed</field>
<field name="res_model">project.issue</field>
</record>
<record id="mail.mt_issue_canceled" model="mail.message.subtype">
<field name="name">Canceled</field>
<field name="res_model">project.issue</field>
</record>
<record id="mail.mt_issue_change" model="mail.message.subtype">
<field name="name">Stage Changed</field>
<field name="res_model">project.issue</field>
</record>
+1 -1
View File
@@ -1129,7 +1129,7 @@ class product_template(osv.osv):
_name = 'product.template'
_inherit = 'product.template'
_columns = {
'purchase_ok': fields.boolean('Can be Purchased', help="Determine if the product is visible in the list of products within a selection from a purchase order line."),
'purchase_ok': fields.boolean('Can be Purchased', help="Specify if the product can be selected in a purchase order line."),
}
_defaults = {
'purchase_ok': 1,
+69 -66
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev_rc3\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-09-20 07:29+0000\n"
"PO-Revision-Date: 2012-08-26 14:09+0000\n"
"PO-Revision-Date: 2012-11-02 18:41+0000\n"
"Last-Translator: Erwin van der Ploeg (Endian Solutions) <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:08+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: sale
#: code:addons/sale/wizard/sale_make_invoice_advance.py:215
@@ -155,7 +155,7 @@ msgstr ""
#: model:ir.actions.act_window,name:sale.action_order_line_tree2
#: model:ir.ui.menu,name:sale.menu_invoicing_sales_order_lines
msgid "Order Lines to Invoice"
msgstr ""
msgstr "Orderregels te factureren"
#. module: sale
#: field:sale.order,date_confirm:0
@@ -186,7 +186,7 @@ msgstr "Toewijzing relatie"
#. module: sale
#: model:ir.actions.act_window,name:sale.action_view_sale_advance_payment_inv
msgid "Invoice Order"
msgstr ""
msgstr "Factureer order"
#. module: sale
#: help:sale.config.settings,group_sale_delivery_address:0
@@ -194,6 +194,8 @@ msgid ""
"Allows you to specify different delivery and invoice addresses on a sale "
"order."
msgstr ""
"Geeft u de mogelijkheid om afwijkende aflever- en factuuradressen te "
"definiëren op een verkooporder"
#. module: sale
#: code:addons/sale/wizard/sale_make_invoice_advance.py:160
@@ -205,7 +207,7 @@ msgstr ""
#. module: sale
#: view:sale.config.settings:0
msgid "Contract Feature"
msgstr ""
msgstr "Contract kenmerken"
#. module: sale
#: field:sale.report,state:0
@@ -235,7 +237,7 @@ msgstr "Te factureren"
#: view:sale.order.line:0
#: field:sale.report,product_uom:0
msgid "Unit of Measure"
msgstr ""
msgstr "Maateenheid"
#. module: sale
#: help:sale.order,date_confirm:0
@@ -260,11 +262,12 @@ msgstr "Maart"
#, python-format
msgid "First cancel all invoices attached to this sales order."
msgstr ""
"Annuleer eerst alle facturen welke aan deze verkooporder zijn gekoppeld."
#. module: sale
#: selection:sale.advance.payment.inv,advance_payment_method:0
msgid "Invoice the whole sale order"
msgstr ""
msgstr "Factureer de gehele verkooporder"
#. module: sale
#: field:sale.order,project_id:0
@@ -304,12 +307,12 @@ msgstr "Fouten in facturatie"
#. module: sale
#: view:account.config.settings:0
msgid "0"
msgstr ""
msgstr "0"
#. module: sale
#: selection:sale.order,state:0
msgid "Draft Quotation"
msgstr ""
msgstr "Concept offerte"
#. module: sale
#: code:addons/sale/wizard/sale_make_invoice_advance.py:124
@@ -344,7 +347,7 @@ msgstr "Subtotaal"
#. module: sale
#: field:sale.config.settings,group_discount_per_so_line:0
msgid "Allow setting a discount on the sale order lines"
msgstr ""
msgstr "Korting op verkoopovereenkomst toestaan"
#. module: sale
#: model:process.transition.action,name:sale.process_transition_action_cancelorder0
@@ -359,29 +362,29 @@ msgstr "Gewicht"
#. module: sale
#: view:sale.config.settings:0
msgid "Warehouse Features"
msgstr ""
msgstr "Magazijn mogelijkheden"
#. module: sale
#: view:sale.order:0
msgid "Quotation "
msgstr ""
msgstr "Offerte "
#. module: sale
#: field:sale.order.line,product_uom:0
msgid "Unit of Measure "
msgstr ""
msgstr "Maateenheid "
#. module: sale
#: code:addons/sale/wizard/sale_make_invoice_advance.py:148
#, python-format
msgid "Incorrect Data"
msgstr ""
msgstr "Foutieve gegevens"
#. module: sale
#: code:addons/sale/wizard/sale_make_invoice_advance.py:149
#, python-format
msgid "The value of Advance Amount must be positive."
msgstr ""
msgstr "De waarde van de vooruitbetaling moet positief zijn"
#. module: sale
#: help:sale.advance.payment.inv,advance_payment_method:0
@@ -401,7 +404,7 @@ msgstr "Verkooporder"
#. module: sale
#: field:sale.order,message_ids:0
msgid "Messages"
msgstr ""
msgstr "Berichten"
#. module: sale
#: selection:sale.report,month:0
@@ -422,7 +425,7 @@ msgstr "Netto bedrag"
#. module: sale
#: field:sale.config.settings,module_project:0
msgid "Project"
msgstr ""
msgstr "Project"
#. module: sale
#: code:addons/sale/sale.py:319
@@ -433,7 +436,7 @@ msgstr ""
#: code:addons/sale/wizard/sale_make_invoice_advance.py:123
#, python-format
msgid "Error!"
msgstr ""
msgstr "Fout!"
#. module: sale
#: report:sale.order:0
@@ -467,7 +470,7 @@ msgstr "Verkooporderregels gerelateerd aan een verkooporder van mijzelf"
#. module: sale
#: selection:sale.order,state:0
msgid "Quotation Sent"
msgstr ""
msgstr "Offerte verstuurt"
#. module: sale
#: help:sale.order,message_unread:0
@@ -506,7 +509,7 @@ msgstr "Datum waarop de verkooporder is gemaakt."
#. module: sale
#: view:res.partner:0
msgid "False"
msgstr ""
msgstr "Onwaar"
#. module: sale
#: view:sale.order:0
@@ -528,12 +531,12 @@ msgstr "Belasting"
#: code:addons/sale/sale.py:986
#, python-format
msgid "Invalid Action!"
msgstr ""
msgstr "Ongeldige actie!"
#. module: sale
#: view:sale.report:0
msgid "Reference Unit of Measure"
msgstr ""
msgstr "Maateenheid referentie"
#. module: sale
#: field:sale.report,date_confirm:0
@@ -572,7 +575,7 @@ msgstr "Fax :"
#. module: sale
#: view:sale.order:0
msgid "(update)"
msgstr ""
msgstr "(update)"
#. module: sale
#: help:sale.config.settings,group_discount_per_so_line:0
@@ -619,7 +622,7 @@ msgstr ""
#. module: sale
#: field:sale.order,note:0
msgid "Terms and conditions"
msgstr ""
msgstr "Voorwaarden"
#. module: sale
#: field:sale.shop,payment_default_id:0
@@ -635,7 +638,7 @@ msgstr "Bevestig"
#. module: sale
#: view:sale.order:0
msgid "Unread messages"
msgstr ""
msgstr "Ongelezen berichten"
#. module: sale
#: field:sale.order,partner_shipping_id:0
@@ -663,7 +666,7 @@ msgstr "Jaar"
#. module: sale
#: field:sale.config.settings,group_uom:0
msgid "Allow using different units of measures"
msgstr ""
msgstr "Afwijkende maateenheid toestaan"
#. module: sale
#: view:sale.order:0
@@ -673,12 +676,12 @@ msgstr "Verkooporders welke nog niet zijn bevestigd"
#. module: sale
#: field:sale.order,message_unread:0
msgid "Unread Messages"
msgstr ""
msgstr "Ongelezen berichten"
#. module: sale
#: view:sale.order:0
msgid "Print"
msgstr ""
msgstr "Afdrukken"
#. module: sale
#: report:sale.order:0
@@ -741,7 +744,7 @@ msgstr "Maak facturen"
#. module: sale
#: model:ir.actions.server,name:sale.actions_server_sale_order_read
msgid "Mark read"
msgstr ""
msgstr "Markeer als gelezen"
#. module: sale
#: code:addons/sale/res_config.py:89
@@ -752,7 +755,7 @@ msgstr "Uur"
#. module: sale
#: field:res.partner,sale_order_count:0
msgid "# of Sales Order"
msgstr ""
msgstr "# verkooporders"
#. module: sale
#: help:sale.config.settings,timesheet:0
@@ -793,12 +796,12 @@ msgstr "Besteld jaar van de verkooporders"
#. module: sale
#: field:sale.config.settings,module_sale_stock:0
msgid "Sale and Warehouse Management"
msgstr ""
msgstr "Verkoop en magazijnbeheer"
#. module: sale
#: model:ir.model,name:sale.model_sale_config_settings
msgid "sale.config.settings"
msgstr ""
msgstr "sale.config.settings"
#. module: sale
#: field:sale.advance.payment.inv,qtty:0
@@ -842,7 +845,7 @@ msgstr ""
#. module: sale
#: view:sale.config.settings:0
msgid "Default Options"
msgstr ""
msgstr "Standaard opties"
#. module: sale
#: code:addons/sale/sale.py:963
@@ -850,12 +853,12 @@ msgstr ""
#: code:addons/sale/wizard/sale_make_invoice_advance.py:142
#, python-format
msgid "Configuration Error!"
msgstr ""
msgstr "Configuratiefout!"
#. module: sale
#: field:account.config.settings,group_analytic_account_for_sales:0
msgid "Analytic accounting for sales"
msgstr ""
msgstr "Verkoop kostenplaatsen"
#. module: sale
#: view:sale.order:0
@@ -899,7 +902,7 @@ msgstr ""
#. module: sale
#: view:sale.config.settings:0
msgid "Invoicing Process"
msgstr ""
msgstr "Factureer proces"
#. module: sale
#: report:sale.order:0
@@ -922,7 +925,7 @@ msgstr ""
#. module: sale
#: view:sale.order:0
msgid "Sales Order done"
msgstr ""
msgstr "Verkooporder gereed"
#. module: sale
#: code:addons/sale/sale.py:320
@@ -952,7 +955,7 @@ msgstr "Relatie"
#. module: sale
#: view:sale.advance.payment.inv:0
msgid "Create and View Invoice"
msgstr ""
msgstr "Maak en bekijk factuur"
#. module: sale
#: code:addons/sale/sale.py:655
@@ -1040,7 +1043,7 @@ msgstr "Mijn offerte-aanvragen"
#. module: sale
#: view:sale.advance.payment.inv:0
msgid "Invoice Sale Order"
msgstr ""
msgstr "Factureer verkooporder"
#. module: sale
#: selection:sale.report,month:0
@@ -1050,7 +1053,7 @@ msgstr "December"
#. module: sale
#: view:sale.config.settings:0
msgid "Contracts Management"
msgstr ""
msgstr "Contractenbeheer"
#. module: sale
#: view:sale.order.line:0
@@ -1094,7 +1097,7 @@ msgstr "Productcategorie"
#: code:addons/sale/sale.py:557
#, python-format
msgid "Cannot cancel this sales order!"
msgstr ""
msgstr "Het is niet mogelijk deze verkooprder te annuleren!"
#. module: sale
#: help:sale.order,invoice_exists:0
@@ -1104,7 +1107,7 @@ msgstr ""
#. module: sale
#: model:ir.model,name:sale.model_mail_message
msgid "Message"
msgstr ""
msgstr "Bericht"
#. module: sale
#: field:sale.config.settings,module_warning:0
@@ -1132,7 +1135,7 @@ msgstr "Belastingen :"
#: code:addons/sale/sale.py:658
#, python-format
msgid "Invoice has been <b>paid</b>."
msgstr ""
msgstr "Factuur is <b>betaald</b>."
#. module: sale
#: model:res.groups,name:sale.group_analytic_accounting
@@ -1147,7 +1150,7 @@ msgstr "Verkoop vooruitbetaling factuur"
#. module: sale
#: model:ir.actions.client,name:sale.action_client_sale_menu
msgid "Open Sale Menu"
msgstr ""
msgstr "Open verkoop menu"
#. module: sale
#: selection:sale.report,state:0
@@ -1185,7 +1188,7 @@ msgstr ""
#: code:addons/sale/wizard/sale_make_invoice_advance.py:153
#, python-format
msgid "Advance of %s %%"
msgstr ""
msgstr "Vooruitbetaling van %s %%"
#. module: sale
#: model:ir.model,name:sale.model_sale_order_line_make_invoice
@@ -1259,7 +1262,7 @@ msgstr "Status"
#. module: sale
#: selection:sale.order,order_policy:0
msgid "On Demand"
msgstr ""
msgstr "Op verzoek"
#. module: sale
#: selection:sale.report,month:0
@@ -1269,7 +1272,7 @@ msgstr "Augustus"
#. module: sale
#: view:sale.order:0
msgid "Sale Order "
msgstr ""
msgstr "Verkooprder "
#. module: sale
#: model:process.node,note:sale.process_node_saleorder0
@@ -1364,7 +1367,7 @@ msgstr "Uitgebreide filters..."
#: code:addons/sale/wizard/sale_make_invoice.py:42
#, python-format
msgid "Warning!"
msgstr ""
msgstr "Waarschuwing!"
#. module: sale
#: field:sale.order,message_comment_ids:0
@@ -1427,7 +1430,7 @@ msgstr "Lopende verkooporders"
#. module: sale
#: field:sale.order,message_summary:0
msgid "Summary"
msgstr ""
msgstr "Samenvatting"
#. module: sale
#: field:sale.config.settings,timesheet:0
@@ -1443,7 +1446,7 @@ msgstr ""
#. module: sale
#: field:sale.advance.payment.inv,advance_payment_method:0
msgid "What do you want to invoice?"
msgstr ""
msgstr "Wat wilt u factureren?"
#. module: sale
#: field:sale.config.settings,group_sale_pricelist:0
@@ -1500,7 +1503,7 @@ msgstr "Historie"
#. module: sale
#: field:sale.config.settings,module_sale_margin:0
msgid "Display margins on sales orders"
msgstr ""
msgstr "Geef marge op verkooprder weer"
#. module: sale
#: help:sale.order,invoice_ids:0
@@ -1521,7 +1524,7 @@ msgstr "Uw referentie"
#. module: sale
#: view:sale.advance.payment.inv:0
msgid "Show Lines to Invoice"
msgstr ""
msgstr "Geef Te factureren regels weer"
#. module: sale
#: field:sale.report,date:0
@@ -1634,7 +1637,7 @@ msgstr "Annuleer"
#. module: sale
#: field:sale.order,message_follower_ids:0
msgid "Followers"
msgstr ""
msgstr "Volgers"
#. module: sale
#: code:addons/sale/sale.py:947
@@ -1656,7 +1659,7 @@ msgstr "Niet-gefactureerde regels zoeken"
#. module: sale
#: model:ir.model,name:sale.model_account_config_settings
msgid "account.config.settings"
msgstr ""
msgstr "account.config.settings"
#. module: sale
#: sql_constraint:sale.order:0
@@ -1681,7 +1684,7 @@ msgstr ""
#. module: sale
#: view:sale.config.settings:0
msgid "Product Features"
msgstr ""
msgstr "Product mogelijkheden"
#. module: sale
#: view:sale.order.line:0
@@ -1769,7 +1772,7 @@ msgstr ""
#. module: sale
#: selection:sale.advance.payment.inv,advance_payment_method:0
msgid "Percentage"
msgstr ""
msgstr "Percentage"
#. module: sale
#: report:sale.order:0
@@ -1780,7 +1783,7 @@ msgstr ""
#: view:sale.report:0
#: field:sale.report,user_id:0
msgid "Salesperson"
msgstr ""
msgstr "Verkoper"
#. module: sale
#: view:sale.order.line:0
@@ -1794,7 +1797,7 @@ msgstr "Product"
#: view:sale.advance.payment.inv:0
#: view:sale.order:0
msgid "%"
msgstr ""
msgstr "%"
#. module: sale
#: report:sale.order:0
@@ -1867,7 +1870,7 @@ msgstr "Overige informatie"
#. module: sale
#: view:res.partner:0
msgid "sale.group_delivery_invoice_address"
msgstr ""
msgstr "sale.group_delivery_invoice_address"
#. module: sale
#: view:sale.order.line:0
@@ -1882,7 +1885,7 @@ msgstr "Te controleren door de boekhouder."
#. module: sale
#: view:sale.order:0
msgid "Send by Mail"
msgstr ""
msgstr "Verzonden per mail"
#. module: sale
#: model:res.groups,name:sale.group_mrp_properties
@@ -1907,7 +1910,7 @@ msgstr "Offerte / Order"
#. module: sale
#: view:sale.order:0
msgid "Inbox"
msgstr ""
msgstr "Postvak IN"
#. module: sale
#: view:sale.order:0
@@ -1980,7 +1983,7 @@ msgstr "Handmatig in behandeling"
#. module: sale
#: model:ir.actions.server,name:sale.actions_server_sale_order_unread
msgid "Mark unread"
msgstr ""
msgstr "Markeer als ongelezen"
#. module: sale
#: code:addons/sale/sale.py:643
@@ -2103,12 +2106,12 @@ msgstr ""
#: view:sale.make.invoice:0
#: view:sale.order.line.make.invoice:0
msgid "or"
msgstr ""
msgstr "of"
#. module: sale
#: field:sale.order.line,name:0
msgid "Product Description"
msgstr ""
msgstr "Productomschrijving"
#. module: sale
#: help:sale.config.settings,group_sale_pricelist:0
@@ -2126,7 +2129,7 @@ msgstr "Offerte nr."
#. module: sale
#: model:res.groups,name:sale.group_discount_per_so_line
msgid "Discount on lines"
msgstr ""
msgstr "Korting op regels"
#. module: sale
#: field:sale.order,client_order_ref:0
+2 -2
View File
@@ -717,10 +717,10 @@ class sale_order_line(osv.osv):
'invoiced': fields.boolean('Invoiced', readonly=True),
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price'), readonly=True, states={'draft': [('readonly', False)]}),
'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True, readonly=True, states={'draft': [('readonly', False)]},
help="If 'on order', it triggers a procurement when the sale order is confirmed to create a task, purchase order or manufacturing order linked to this sale order line."),
help="From stock: When needed, the product is taken from the stock or we wait for replenishment.\nOn order: When needed, the product is purchased or produced."),
'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Account')),
'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes', readonly=True, states={'draft': [('readonly', False)]}),
'address_allotment_id': fields.many2one('res.partner', 'Allotment Partner'),
'address_allotment_id': fields.many2one('res.partner', 'Allotment Partner',help="A partner to whom the particular product needs to be allotted."),
'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Product UoS'), required=True, readonly=True, states={'draft': [('readonly', False)]}),
'product_uom': fields.many2one('product.uom', 'Unit of Measure ', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'product_uos_qty': fields.float('Quantity (UoS)' ,digits_compute= dp.get_precision('Product UoS'), readonly=True, states={'draft': [('readonly', False)]}),
+2 -2
View File
@@ -50,7 +50,7 @@ class res_partner(osv.osv):
string = "Invoicing Type",
view_load = True,
group_name = "Accounting Properties",
help = "This invoicing type will be used, by default, for invoicing the current partner."),
help = "This invoicing type will be used, by default, to invoice the current partner."),
}
res_partner()
@@ -79,7 +79,7 @@ stock_picking_out()
class sale(osv.osv):
_inherit = "sale.order"
_columns = {
'invoice_type_id': fields.many2one('sale_journal.invoice.type', 'Invoice Type')
'invoice_type_id': fields.many2one('sale_journal.invoice.type', 'Invoice Type', help="Generate invoice based on the selected option.")
}
def _prepare_order_picking(self, cr, uid, order, context=None):
+1 -1
View File
@@ -73,7 +73,7 @@ class sale_order(osv.osv):
return super(sale_order, self)._get_order(cr, uid, ids, context=context)
_columns = {
'margin': fields.function(_product_margin, string='Margin', help="It gives profitability by calculating the difference between the Unit Price and Cost Price.", store={
'margin': fields.function(_product_margin, string='Margin', help="It gives profitability by calculating the difference between the Unit Price and the cost price.", store={
'sale.order.line': (_get_order, ['margin'], 20),
'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 20),
}),
+2 -2
View File
@@ -54,8 +54,8 @@ class sale_order_dates(osv.osv):
return res
_columns = {
'commitment_date': fields.function(_get_commitment_date, store=True, type='date', string='Commitment Date', help="Date on which delivery of products is to be made."),
'requested_date': fields.date('Requested Date', help="Date on which customer has requested for sales."),
'commitment_date': fields.function(_get_commitment_date, store=True, type='date', string='Commitment Date', help="Committed date for delivery."),
'requested_date': fields.date('Requested Date', help="Date requested by the customer for the sale."),
'effective_date': fields.function(_get_effective_date, type='date', store=True, string='Effective Date',help="Date on which picking is created."),
}
+26 -25
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev_rc3\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-09-20 07:32+0000\n"
"PO-Revision-Date: 2012-09-21 14:06+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"PO-Revision-Date: 2012-11-02 10:21+0000\n"
"Last-Translator: Erwin van der Ploeg (Endian Solutions) <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:36+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: sale_stock
#: help:sale.config.settings,group_invoice_deli_orders:0
@@ -27,7 +27,7 @@ msgstr ""
#: code:addons/sale_stock/sale_stock.py:496
#, python-format
msgid "Delivery Order <em>%s</em> <b>scheduled</b> for %s."
msgstr ""
msgstr "Uitgaande levering <em>%s</em> <b>ingeplant</b> voor %s."
#. module: sale_stock
#: model:process.node,name:sale_stock.process_node_deliveryorder0
@@ -81,7 +81,7 @@ msgstr "Document van de mutatie naar de expeditie of naar de klant."
#. module: sale_stock
#: field:sale.config.settings,group_multiple_shops:0
msgid "Manage multiple shops"
msgstr ""
msgstr "Beheer meerdere verkooppunten"
#. module: sale_stock
#: model:process.transition.action,name:sale_stock.process_transition_action_validate0
@@ -124,7 +124,7 @@ msgstr ""
#: code:addons/sale_stock/sale_stock.py:678
#, python-format
msgid "Error!"
msgstr ""
msgstr "Fout!"
#. module: sale_stock
#: field:sale.order,picking_policy:0
@@ -155,12 +155,12 @@ msgstr "Voorraadmutatie"
#: code:addons/sale_stock/sale_stock.py:164
#, python-format
msgid "Invalid Action!"
msgstr ""
msgstr "Ongeldige actie!"
#. module: sale_stock
#: field:sale.config.settings,module_project_timesheet:0
msgid "Project Timesheet"
msgstr ""
msgstr "Project urenstaat"
#. module: sale_stock
#: help:sale.config.settings,module_delivery:0
@@ -175,7 +175,7 @@ msgstr ""
#: code:addons/sale_stock/sale_stock.py:647
#, python-format
msgid "Configuration Error!"
msgstr ""
msgstr "Configuratiefout!"
#. module: sale_stock
#: model:process.node,name:sale_stock.process_node_saleprocurement0
@@ -197,7 +197,7 @@ msgstr "Verkooporder"
#: model:ir.model,name:sale_stock.model_stock_picking_out
#: view:sale.order:0
msgid "Delivery Orders"
msgstr ""
msgstr "Uitgaande leveringen"
#. module: sale_stock
#: model:ir.model,name:sale_stock.model_sale_order_line
@@ -231,7 +231,7 @@ msgstr "Fout ! U kunt geen recursieve bedrijven maken."
#. module: sale_stock
#: field:sale.config.settings,group_invoice_so_lines:0
msgid "Generate invoices based on the sale order"
msgstr ""
msgstr "Genereer facturen op basis van verkooporder"
#. module: sale_stock
#: help:res.company,security_lead:0
@@ -259,7 +259,7 @@ msgstr "Forceer toewijzing"
#. module: sale_stock
#: field:sale.config.settings,default_order_policy:0
msgid "The default invoicing method is"
msgstr ""
msgstr "De standaard factureer methode is"
#. module: sale_stock
#: code:addons/sale_stock/sale_stock.py:233
@@ -280,7 +280,7 @@ msgstr "Document van de verplaatsing naar de klant."
#. module: sale_stock
#: view:sale.order:0
msgid "View Delivery Order"
msgstr ""
msgstr "Bekijk uitgaande levering"
#. module: sale_stock
#: field:sale.order.line,move_ids:0
@@ -290,7 +290,7 @@ msgstr "Voorraadmutaties"
#. module: sale_stock
#: view:sale.config.settings:0
msgid "Default Options"
msgstr ""
msgstr "Standaard opties"
#. module: sale_stock
#: field:sale.config.settings,module_project_mrp:0
@@ -363,17 +363,17 @@ msgstr ""
#: code:addons/sale_stock/sale_stock.py:499
#, python-format
msgid "Order <b>delivered</b>."
msgstr ""
msgstr "Order <b>geleverd</b>."
#. module: sale_stock
#: field:sale.config.settings,module_delivery:0
msgid "Allow adding shipping costs"
msgstr ""
msgstr "Sta toevoegen afleveringskosten toe"
#. module: sale_stock
#: view:sale.order:0
msgid "days"
msgstr ""
msgstr "dagen"
#. module: sale_stock
#: field:sale.order.line,product_packaging:0
@@ -394,7 +394,7 @@ msgstr ""
#: code:addons/sale_stock/sale_stock.py:689
#, python-format
msgid "Advance of %s %%"
msgstr ""
msgstr "Vooruitbetaling van %s %%"
#. module: sale_stock
#: code:addons/sale_stock/sale_stock.py:601
@@ -434,7 +434,7 @@ msgstr "Waarden"
#. module: sale_stock
#: constraint:stock.move:0
msgid "You must assign a serial number for this product."
msgstr ""
msgstr "U dient een productie partij toe te wijzen voor dit product."
#. module: sale_stock
#: field:sale.config.settings,group_mrp_properties:0
@@ -479,7 +479,7 @@ msgstr ""
#. module: sale_stock
#: view:sale.order:0
msgid "View Invoice"
msgstr ""
msgstr "Bekijk factuur"
#. module: sale_stock
#: sql_constraint:stock.picking:0
@@ -539,7 +539,7 @@ msgstr ""
#. module: sale_stock
#: selection:sale.config.settings,default_order_policy:0
msgid "Invoice based on sales orders"
msgstr ""
msgstr "Factuur gebaseerd op verkooporders"
#. module: sale_stock
#: model:process.node,name:sale_stock.process_node_invoiceafterdelivery0
@@ -631,7 +631,7 @@ msgstr ""
#: code:addons/sale_stock/sale_stock.py:659
#, python-format
msgid "Cannot cancel sales order line!"
msgstr ""
msgstr "Het is niet mogelijk de verkooporder regel te annuleren!"
#. module: sale_stock
#: view:sale.order:0
@@ -671,7 +671,7 @@ msgstr "De naam van het bedrijf moet uniek zijn!"
#. module: sale_stock
#: model:ir.model,name:sale_stock.model_sale_config_settings
msgid "sale.config.settings"
msgstr ""
msgstr "sale.config.settings"
#. module: sale_stock
#: help:sale.order,picking_ids:0
@@ -708,12 +708,13 @@ msgstr ""
#. module: sale_stock
#: view:sale.order:0
msgid "Recreate Delivery Order"
msgstr ""
msgstr "Maak uitgaande levering opnieuw"
#. module: sale_stock
#: help:sale.config.settings,group_multiple_shops:0
msgid "This allows to configure and use multiple shops."
msgstr ""
"Dit geeft u de mogelijkheid om meerdere verkooppunten te configureren."
#. module: sale_stock
#: field:sale.order,picked_rate:0
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-31 04:41+0000\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: sale_stock
+7 -10
View File
@@ -127,19 +127,16 @@ class sale_order(osv.osv):
\nThe exception status is automatically set when a cancel operation occurs \
in the invoice validation (Invoice Exception) or in the picking list process (Shipping Exception).\nThe 'Waiting Schedule' status is set when the invoice is confirmed\
but waiting for the scheduler to run on the order date.", select=True),
'incoterm': fields.many2one('stock.incoterms', 'Incoterm', help="Incoterm which stands for 'International Commercial terms' implies its a series of sales terms which are used in the commercial transaction."),
'incoterm': fields.many2one('stock.incoterms', 'Incoterm', help="International Commercial Terms are a series of predefined commercial terms used in international transactions."),
'picking_policy': fields.selection([('direct', 'Deliver each product when available'), ('one', 'Deliver all products at once')],
'Shipping Policy', required=True, readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]},
help="""If you don't have enough stock available to deliver all at once, do you accept partial shipments or not?"""),
help="""Pick 'Deliver each product when available' if you allow partial delivery."""),
'order_policy': fields.selection([
('manual', 'On Demand'),
('picking', 'On Delivery Order'),
('prepaid', 'Before Delivery'),
], 'Create Invoice', required=True, readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]},
help="""This field controls how invoice and delivery operations are synchronized.
- With 'On Demand', the invoice is created manually when needed.
- With 'On Delivery Order', a draft invoice is generated after all pickings have been processed.
- With 'Before Delivery', a draft invoice is created, and it must be paid before delivery."""),
help="""On demand: A draft invoice can be created from the sales order when needed. \nOn delivery order: A draft invoice can be created from the delivery order when the products have been delivered. \nBefore delivery: A draft invoice is created from the sales order and must be paid before the products can be delivered."""),
'picking_ids': fields.one2many('stock.picking.out', 'sale_id', 'Related Picking', readonly=True, help="This is a list of delivery orders that has been generated for this sales order."),
'shipped': fields.boolean('Delivered', readonly=True, help="It indicates that the sales order has been delivered. This field is updated only after the scheduler(s) have been launched."),
'picked_rate': fields.function(_picked_rate, string='Picked', type='float'),
@@ -488,7 +485,7 @@ class sale_order_line(osv.osv):
_inherit = 'sale.order.line'
_columns = {
'delay': fields.float('Delivery Lead Time', required=True, help="Number of days between the order confirmation the shipping of the products to the customer", readonly=True, states={'draft': [('readonly', False)]}),
'delay': fields.float('Delivery Lead Time', required=True, help="Number of days between the order confirmation and the shipping of the products to the customer", readonly=True, states={'draft': [('readonly', False)]}),
'procurement_id': fields.many2one('procurement.order', 'Procurement'),
'property_ids': fields.many2many('mrp.property', 'sale_order_line_property_rel', 'order_id', 'property_id', 'Properties', readonly=True, states={'draft': [('readonly', False)]}),
'product_packaging': fields.many2one('product.packaging', 'Packaging'),
@@ -636,7 +633,7 @@ class sale_advance_payment_inv(osv.osv_memory):
result = super(sale_advance_payment_inv, self)._create_invoices(cr, uid, inv_values, sale_id, context=context)
sale_obj = self.pool.get('sale.order')
sale_line_obj = self.pool.get('sale.order.line')
wizard = self.browse(cr, uid, ids[0], context)
wizard = self.browse(cr, uid, [result], context)
sale = sale_obj.browse(cr, uid, sale_id, context=context)
if sale.order_policy == 'postpaid':
raise osv.except_osv(
@@ -646,8 +643,8 @@ class sale_advance_payment_inv(osv.osv_memory):
# If invoice on picking: add the cost on the SO
# If not, the advance will be deduced when generating the final invoice
line_name = inv_values.get('invoice_line') and inv_values.get('invoice_line')[2].get('name') or ''
line_tax = inv_values.get('invoice_line') and inv_values.get('invoice_line')[2].get('invoice_line_tax_id') or False
line_name = inv_values.get('invoice_line') and inv_values.get('invoice_line')[0][2].get('name') or ''
line_tax = inv_values.get('invoice_line') and inv_values.get('invoice_line')[0][2].get('invoice_line_tax_id') or False
if sale.order_policy == 'picking':
vals = {
'order_id': sale.id,
+1
View File
@@ -40,6 +40,7 @@
<button name="ship_corrected" states="shipping_except" string="Ignore Exception"/>
</xpath>
<xpath expr="//button[@name='action_view_invoice']" position="after">
<field name="picking_ids" invisible="1"/>
<button name="action_view_delivery" string="View Delivery Order" type="object" class="oe_highlight"
attrs="{'invisible': ['|','|','|',('picking_ids','=',False),('picking_ids','=',[]), ('state', 'not in', ('progress','manual')),('shipped','=',True)]}"/>
</xpath>

Some files were not shown because too many files have changed in this diff Show More