[Merge] Merged trunk.
bzr revid: jra@tinyerp.com-20121105050954-htnejpf9r4kh59bz
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="property_account_expense_categ" domain="[('type','<>','view'),('type','<>','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','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="property_account_expense_categ" domain="[('type','<>','view'),('type','<>','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"/>
|
||||
|
||||
@@ -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 & Costs to Invoice</field>
|
||||
<field name="name">Time & 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>
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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','<>','view'),('type','<>','consolidation')]"/>
|
||||
</xpath>
|
||||
</data>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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', '<>', 'view'), ('company_id', '<>', 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','<>','view')]}"/>
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -316,17 +316,9 @@ class ir_import(orm.TransientModel):
|
||||
}]
|
||||
|
||||
_logger.info('importing %d rows...', len(data))
|
||||
try:
|
||||
import_result = self.pool[record.res_model].load(
|
||||
cr, uid, import_fields, data, context=context)
|
||||
_logger.info('done')
|
||||
except Exception, e:
|
||||
_logger.info(e)
|
||||
return [{
|
||||
'type': 'error',
|
||||
'message': unicode('No data have been imported.'),
|
||||
'record': False,
|
||||
}]
|
||||
import_result = self.pool[record.res_model].load(
|
||||
cr, uid, import_fields, data, context=context)
|
||||
_logger.info('done')
|
||||
|
||||
# If transaction aborted, RELEASE SAVEPOINT is going to raise
|
||||
# an InternalError (ROLLBACK should work, maybe). Ignore that.
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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)]"),
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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)]}),
|
||||
|
||||
@@ -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),
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
@@ -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.
|
||||
================================================
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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
@@ -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')
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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)"/>
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,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
|
||||
|
||||
@@ -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 ""
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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
@@ -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
|
||||
@@ -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>
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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
@@ -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'),
|
||||
|
||||
@@ -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
@@ -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'),
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
# -------------------------------------------------------
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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
@@ -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
@@ -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)]}),
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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),
|
||||
}),
|
||||
|
||||
@@ -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."),
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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>
|
||||
|
||||
+13
-13
@@ -370,14 +370,14 @@ class product_product(osv.osv):
|
||||
"stored in the Stock Location of the Warehouse of this Shop, "
|
||||
"or any of its children.\n"
|
||||
"Otherwise, this includes goods stored in any Stock Location "
|
||||
"typed as 'internal'."),
|
||||
"with 'internal' type."),
|
||||
'virtual_available': fields.function(_product_available, multi='qty_available',
|
||||
type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
|
||||
string='Forecasted Quantity',
|
||||
help="Forecast quantity (computed as Quantity On Hand "
|
||||
"- Outgoing + Incoming)\n"
|
||||
"In a context with a single Stock Location, this includes "
|
||||
"goods stored at this Location, or any of its children.\n"
|
||||
"goods stored in this location, or any of its children.\n"
|
||||
"In a context with a single Warehouse, this includes "
|
||||
"goods stored in the Stock Location of this Warehouse, or any "
|
||||
"of its children.\n"
|
||||
@@ -385,7 +385,7 @@ class product_product(osv.osv):
|
||||
"stored in the Stock Location of the Warehouse of this Shop, "
|
||||
"or any of its children.\n"
|
||||
"Otherwise, this includes goods stored in any Stock Location "
|
||||
"typed as 'internal'."),
|
||||
"with 'internal' type."),
|
||||
'incoming_qty': fields.function(_product_available, multi='qty_available',
|
||||
type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
|
||||
string='Incoming',
|
||||
@@ -399,21 +399,21 @@ class product_product(osv.osv):
|
||||
"arriving to the Stock Location of the Warehouse of this "
|
||||
"Shop, or any of its children.\n"
|
||||
"Otherwise, this includes goods arriving to any Stock "
|
||||
"Location typed as 'internal'."),
|
||||
"Location with 'internal' type."),
|
||||
'outgoing_qty': fields.function(_product_available, multi='qty_available',
|
||||
type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
|
||||
string='Outgoing',
|
||||
help="Quantity of products that are planned to leave.\n"
|
||||
"In a context with a single Stock Location, this includes "
|
||||
"goods leaving from this Location, or any of its children.\n"
|
||||
"goods leaving this Location, or any of its children.\n"
|
||||
"In a context with a single Warehouse, this includes "
|
||||
"goods leaving from the Stock Location of this Warehouse, or "
|
||||
"goods leaving the Stock Location of this Warehouse, or "
|
||||
"any of its children.\n"
|
||||
"In a context with a single Shop, this includes goods "
|
||||
"leaving from the Stock Location of the Warehouse of this "
|
||||
"leaving the Stock Location of the Warehouse of this "
|
||||
"Shop, or any of its children.\n"
|
||||
"Otherwise, this includes goods leaving from any Stock "
|
||||
"Location typed as 'internal'."),
|
||||
"Otherwise, this includes goods leaving any Stock "
|
||||
"Location with 'internal' type."),
|
||||
'track_production': fields.boolean('Track Manufacturing Lots', help="Forces to specify a Serial Number for all moves containing this product and generated by a Manufacturing Order"),
|
||||
'track_incoming': fields.boolean('Track Incoming Lots', help="Forces to specify a Serial Number for all moves containing this product and coming from a Supplier Location"),
|
||||
'track_outgoing': fields.boolean('Track Outgoing Lots', help="Forces to specify a Serial Number for all moves containing this product and going to a Customer Location"),
|
||||
@@ -486,7 +486,7 @@ class product_template(osv.osv):
|
||||
string="Procurement Location",
|
||||
view_load=True,
|
||||
domain=[('usage','like','procurement')],
|
||||
help="For the current product, this stock location will be used, instead of the default one, as the source location for stock moves generated by procurements"),
|
||||
help="This stock location will be used, instead of the default one, as the source location for stock moves generated by procurements."),
|
||||
'property_stock_production': fields.property(
|
||||
'stock.location',
|
||||
type='many2one',
|
||||
@@ -494,7 +494,7 @@ class product_template(osv.osv):
|
||||
string="Production Location",
|
||||
view_load=True,
|
||||
domain=[('usage','like','production')],
|
||||
help="For the current product, this stock location will be used, instead of the default one, as the source location for stock moves generated by production orders"),
|
||||
help="This stock location will be used, instead of the default one, as the source location for stock moves generated by manufacturing orders."),
|
||||
'property_stock_inventory': fields.property(
|
||||
'stock.location',
|
||||
type='many2one',
|
||||
@@ -502,7 +502,7 @@ class product_template(osv.osv):
|
||||
string="Inventory Location",
|
||||
view_load=True,
|
||||
domain=[('usage','like','inventory')],
|
||||
help="For the current product, this stock location will be used, instead of the default one, as the source location for stock moves generated when you do an inventory"),
|
||||
help="This stock location will be used, instead of the default one, as the source location for stock moves generated when you do an inventory."),
|
||||
'property_stock_account_input': fields.property('account.account',
|
||||
type='many2one', relation='account.account',
|
||||
string='Stock Input Account', view_load=True,
|
||||
@@ -513,7 +513,7 @@ class product_template(osv.osv):
|
||||
string='Stock Output Account', view_load=True,
|
||||
help="When doing real-time inventory valuation, counterpart journal items for all outgoing stock moves will be posted in this account, unless "
|
||||
"there is a specific valuation account set on the destination location. When not set on the product, the one from the product category is used."),
|
||||
'sale_delay': fields.float('Customer Lead Time', help="This is the average delay in days between the confirmation of the customer order and the delivery of the finished products. It's the time you promise to your customers."),
|
||||
'sale_delay': fields.float('Customer Lead Time', help="The average delay in days between the confirmation of the customer order and the delivery of the finished products. It's the time you promise to your customers."),
|
||||
'loc_rack': fields.char('Rack', size=16),
|
||||
'loc_row': fields.char('Row', size=16),
|
||||
'loc_case': fields.char('Case', size=16),
|
||||
|
||||
@@ -17,15 +17,17 @@
|
||||
<record id="view_category_property_form" model="ir.ui.view">
|
||||
<field name="name">product.category.stock.property.form.inherit</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_stock_property']" position="inside">
|
||||
<field name="property_stock_account_input_categ" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="property_stock_account_output_categ" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="property_stock_valuation_account_id" domain="[('type','<>','view'), ('type','<>','consolidation')]"/>
|
||||
<field name="property_stock_journal"/>
|
||||
</xpath>
|
||||
<group name="account_property" position="after">
|
||||
<group name="account_stock_property" string="Account Stock Properties" colspan="2">
|
||||
<field name="property_stock_account_input_categ" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="property_stock_account_output_categ" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="property_stock_valuation_account_id" domain="[('type','<>','view'), ('type','<>','consolidation')]"/>
|
||||
<field name="property_stock_journal"/>
|
||||
</group>
|
||||
</group>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -33,14 +33,14 @@ class stock_config_settings(osv.osv_memory):
|
||||
help="""This allows to automatically launch the invoicing wizard if the delivery is
|
||||
to be invoiced when you send or deliver goods.
|
||||
This installs the module stock_invoice_directly."""),
|
||||
'module_product_expiry': fields.boolean("Expiry date on lots",
|
||||
'module_product_expiry': fields.boolean("Expiry date on serial numbers",
|
||||
help="""Track different dates on products and serial numbers.
|
||||
The following dates can be tracked:
|
||||
- end of life
|
||||
- best before date
|
||||
- removal date
|
||||
- alert date.
|
||||
This installs the module product_expiry."""),
|
||||
The following dates can be tracked:
|
||||
- end of life
|
||||
- best before date
|
||||
- removal date
|
||||
- alert date.
|
||||
This installs the module product_expiry."""),
|
||||
'module_stock_location': fields.boolean("Create push/pull logistic rules",
|
||||
help="""Provide push and pull inventory flows. Typical uses of this feature are:
|
||||
manage product manufacturing chains, manage default locations per product,
|
||||
@@ -58,11 +58,10 @@ class stock_config_settings(osv.osv_memory):
|
||||
help="""Allows you to create and manage your packaging dimensions and types you want to be maintained in your system."""),
|
||||
'group_stock_production_lot': fields.boolean("Track serial number on products",
|
||||
implied_group='stock.group_production_lot',
|
||||
help="""This allows you to manage products by using serial numbers.
|
||||
When you select a lot, you can get the upstream or downstream traceability of the products contained in lot."""),
|
||||
help="""This allows you to manage products by using serial numbers. When you select a serial number on product moves, you can get the upstream or downstream traceability of that product."""),
|
||||
'group_stock_tracking_lot': fields.boolean("Track serial number on logistic units (pallets)",
|
||||
implied_group='stock.group_tracking_lot',
|
||||
help="""Allows you to get the upstream or downstream traceability of the products contained in lot."""),
|
||||
help="""When you select a serial number on product moves, you can get the upstream or downstream traceability of that product."""),
|
||||
'group_stock_inventory_valuation': fields.boolean("Generate accounting entries per stock movement",
|
||||
implied_group='stock.group_inventory_valuation',
|
||||
help="""Allows to configure inventory valuations on products and product categories."""),
|
||||
|
||||
@@ -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:04+0000\n"
|
||||
"X-Generator: Launchpad (build 16218)\n"
|
||||
|
||||
#. module: stock_location
|
||||
|
||||
+26
-6
@@ -169,7 +169,7 @@ class survey(osv.osv):
|
||||
pages = sur['page_ids']
|
||||
if not pages:
|
||||
raise osv.except_osv(_('Warning!'), _('This survey has no pages defined. Please define pages first.'))
|
||||
context.update({'active':True,'survey_id': ids[0]})
|
||||
context.update({'active':False,'survey_id': ids[0]})
|
||||
return {
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
@@ -179,6 +179,25 @@ class survey(osv.osv):
|
||||
'name': name,
|
||||
'context': context
|
||||
}
|
||||
|
||||
def edit_survey(self, cr, uid, ids, context=None):
|
||||
sur_obj = self.read(cr, uid, ids,['title','page_ids'], context=context)
|
||||
for sur in sur_obj:
|
||||
name = sur['title']
|
||||
pages = sur['page_ids']
|
||||
if not pages:
|
||||
raise osv.except_osv(_('Warning!'), _('This survey has no question defined. Please define the questions and answers first.'))
|
||||
context.update({'survey_id': ids[0]})
|
||||
return {
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'survey.question.wiz',
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new',
|
||||
'name': name,
|
||||
'context': context
|
||||
}
|
||||
|
||||
survey()
|
||||
|
||||
class survey_history(osv.osv):
|
||||
@@ -386,7 +405,7 @@ class survey_question(osv.osv):
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
questions = self.read(cr,uid, ids, ['answer_choice_ids', 'type', 'required_type',\
|
||||
'req_ans', 'minimum_req_ans', 'maximum_req_ans', 'column_heading_ids'])
|
||||
'req_ans', 'minimum_req_ans', 'maximum_req_ans', 'column_heading_ids', 'page_id', 'question'])
|
||||
for question in questions:
|
||||
col_len = len(question['column_heading_ids'])
|
||||
if vals.has_key('column_heading_ids'):
|
||||
@@ -404,7 +423,7 @@ class survey_question(osv.osv):
|
||||
if que_type in ['matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans',\
|
||||
'matrix_of_drop_down_menus', 'rating_scale']:
|
||||
if not col_len:
|
||||
raise osv.except_osv(_('Warning!'),_("You must enter one or more column headings."))
|
||||
raise osv.except_osv(_('Warning!'),_('You must enter one or more column headings for question "%s" of page %s.') % (question['question'], question['page_id'][1]))
|
||||
ans_len = len(question['answer_choice_ids'])
|
||||
|
||||
if vals.has_key('answer_choice_ids'):
|
||||
@@ -416,7 +435,7 @@ class survey_question(osv.osv):
|
||||
|
||||
if que_type not in ['descriptive_text', 'single_textbox', 'comment','table']:
|
||||
if not ans_len:
|
||||
raise osv.except_osv(_('Warning!'),_("You must enter one or more Answers."))
|
||||
raise osv.except_osv(_('Warning!'),_('You must enter one or more Answers for question "%s" of page %s.') % (question['question'], question['page_id'][1]))
|
||||
req_type = ""
|
||||
|
||||
if vals.has_key('required_type'):
|
||||
@@ -485,13 +504,14 @@ class survey_question(osv.osv):
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
minimum_ans = 0
|
||||
maximum_ans = 0
|
||||
page = self.pool.get('survey.page').browse(cr, uid, vals['page_id'], context=context).title
|
||||
if vals.has_key('answer_choice_ids') and not len(vals['answer_choice_ids']):
|
||||
if vals.has_key('type') and vals['type'] not in ['descriptive_text', 'single_textbox', 'comment','table']:
|
||||
raise osv.except_osv(_('Warning!'),_("You must enter one or more answers."))
|
||||
raise osv.except_osv(_('Warning!'),_('You must enter one or more answers for question "%s" of page %s .') % (vals['question'], page))
|
||||
|
||||
if vals.has_key('column_heading_ids') and not len(vals['column_heading_ids']):
|
||||
if vals.has_key('type') and vals['type'] in ['matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans', 'matrix_of_drop_down_menus', 'rating_scale']:
|
||||
raise osv.except_osv(_('Warning!'),_("You must enter one or more column heading."))
|
||||
raise osv.except_osv(_('Warning!'),_('You must enter one or more column headings for question "%s" of page %s.')% (vals['question'], page))
|
||||
|
||||
if vals['type'] in ['multiple_choice_multiple_ans','matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans', 'matrix_of_drop_down_menus', 'rating_scale','multiple_textboxes','numerical_textboxes','date','date_and_time']:
|
||||
if vals.has_key('is_require_answer') and vals.has_key('required_type') and vals['required_type'] in ['at least', 'at most', 'exactly']:
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<button name="test_survey" states="open,draft,close,cancel" string="Test Survey" type="object" icon="gtk-new" context="{'survey_id': active_id}" attrs="{'invisible':[('id','=',0)]}"/>
|
||||
<button name="fill_survey" states="open" string="Answer Survey" type="object" icon="gtk-execute" context="{'survey_id': active_id}" attrs="{'invisible':[('state','!=','open')]}"/>
|
||||
<button name="action_print_survey" states="open,draft,close,cancel" string="Print Answer" type="object"/>
|
||||
<button name="%(action_view_survey_question_message)d" states="open,draft,close,cancel"
|
||||
string="Edit Survey" type="action" context="{'active':True,'edit' : True,'survey_id': active_id}"/>
|
||||
<button name="edit_survey" states="open,draft,close,cancel"
|
||||
string="Edit Survey" type="object" context="{'active':True,'edit' : True,'survey_id': active_id}"/>
|
||||
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
|
||||
@@ -208,6 +208,7 @@ class survey_question_wiz(osv.osv_memory):
|
||||
etree.SubElement(xml_group1, 'button', {'string':'','icon': "gtk-edit", 'type' :'object', 'name':"action_edit_question", 'context' : tools.ustr(context)})
|
||||
etree.SubElement(xml_group1, 'button', {'string':'','icon': "gtk-delete", 'type' :'object','name':"action_delete_question", 'context' : tools.ustr(context)})
|
||||
else:
|
||||
etree.SubElement(xml_form, 'newline')
|
||||
etree.SubElement(xml_form, 'separator', {'string': star+to_xml(separator_string)})
|
||||
|
||||
ans_ids = que_rec.answer_choice_ids
|
||||
@@ -1093,6 +1094,10 @@ class survey_question_wiz(osv.osv_memory):
|
||||
context.pop(key)
|
||||
|
||||
self.pool.get('survey.page').unlink(cr, uid, [context.get('page_id',False)])
|
||||
for survey in self.pool.get('survey').browse(cr, uid, [context.get('survey_id',False)], context=context):
|
||||
if not survey.page_ids:
|
||||
return {'type':'ir.actions.act_window_close'}
|
||||
|
||||
search_id = self.pool.get('ir.ui.view').search(cr,uid,[('model','=','survey.question.wiz'),\
|
||||
('name','=','Survey Search')])
|
||||
surv_name_wiz = self.pool.get('survey.name.wiz')
|
||||
|
||||
Reference in New Issue
Block a user