[MERGE]Merge with trunk-google-doc-imp-rga.

bzr revid: vba@tinyerp.com-20121016094701-6ks4nmy38b09j3hl
This commit is contained in:
Vijaykumar Baladaniya 2012-10-16 15:17:01 +05:30
commit 6b26d79a88
40 changed files with 3625 additions and 4905 deletions

View File

@ -2768,7 +2768,6 @@ class account_chart_template(osv.osv):
'property_account_income_categ': fields.many2one('account.account.template', 'Income Category Account'), 'property_account_income_categ': fields.many2one('account.account.template', 'Income Category Account'),
'property_account_expense': fields.many2one('account.account.template', 'Expense Account on Product Template'), 'property_account_expense': fields.many2one('account.account.template', 'Expense Account on Product Template'),
'property_account_income': fields.many2one('account.account.template', 'Income Account on Product Template'), 'property_account_income': fields.many2one('account.account.template', 'Income Account on Product Template'),
'property_reserve_and_surplus_account': fields.many2one('account.account.template', 'Reserve and Profit/Loss Account', domain=[('type', '=', 'payable')], help='This Account is used for transferring Profit/Loss(If It is Profit: Amount will be added, Loss: Amount will be deducted.), Which is calculated from Profilt & Loss Report'),
'property_account_income_opening': fields.many2one('account.account.template', 'Opening Entries Income Account'), 'property_account_income_opening': fields.many2one('account.account.template', 'Opening Entries Income Account'),
'property_account_expense_opening': fields.many2one('account.account.template', 'Opening Entries Expense Account'), 'property_account_expense_opening': fields.many2one('account.account.template', 'Opening Entries Expense Account'),
} }
@ -3216,7 +3215,6 @@ class wizard_multi_charts_accounts(osv.osv_memory):
('property_account_income_categ','product.category','account.account'), ('property_account_income_categ','product.category','account.account'),
('property_account_expense','product.template','account.account'), ('property_account_expense','product.template','account.account'),
('property_account_income','product.template','account.account'), ('property_account_income','product.template','account.account'),
('property_reserve_and_surplus_account','res.company','account.account')
] ]
template = self.pool.get('account.chart.template').browse(cr, uid, chart_template_id, context=context) template = self.pool.get('account.chart.template').browse(cr, uid, chart_template_id, context=context)
for record in todo_list: for record in todo_list:

View File

@ -1037,11 +1037,10 @@
--> -->
<record id="view_move_line_tree_reconcile" model="ir.ui.view"> <record id="view_move_line_tree_reconcile" model="ir.ui.view">
<field name="name">account.move.line.reconcile.tree</field>
<field name="model">account.move.line</field> <field name="model">account.move.line</field>
<field eval="24" name="priority"/> <field eval="24" name="priority"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items to Reconcile" create="false"> <tree_account_reconciliation colors="red:state == 'draft';black:state == 'valid'" string="Journal Items to Reconcile" create="false" version="7.0">
<field name="date"/> <field name="date"/>
<field name="move_id"/> <field name="move_id"/>
<field name="ref"/> <field name="ref"/>
@ -1049,9 +1048,10 @@
<field name="partner_id"/> <field name="partner_id"/>
<field name="account_id"/> <field name="account_id"/>
<field name="reconcile_partial_id"/> <field name="reconcile_partial_id"/>
<field name="state" invisible="1"/>
<field name="debit" sum="Total debit"/> <field name="debit" sum="Total debit"/>
<field name="credit" sum="Total credit"/> <field name="credit" sum="Total credit"/>
</tree> </tree_account_reconciliation>
</field> </field>
</record> </record>
@ -1542,8 +1542,7 @@
<field name="name">Journal Items to Reconcile</field> <field name="name">Journal Items to Reconcile</field>
<field name="res_model">account.move.line</field> <field name="res_model">account.move.line</field>
<field name="view_id" ref="view_move_line_tree_reconcile"/> <field name="view_id" ref="view_move_line_tree_reconcile"/>
<field name="view_type">form</field> <field name="view_mode">tree_account_reconciliation</field>
<field name="view_mode">account_reconciliation_list</field>
<field name="help" type="html"> <field name="help" type="html">
<p> <p>
No journal items found. No journal items found.
@ -2171,7 +2170,6 @@
<field name="property_account_income" domain="[('id', 'child_of', [account_root_id])]"/> <field name="property_account_income" domain="[('id', 'child_of', [account_root_id])]"/>
<field name="property_account_income_opening" domain="[('id', 'child_of', [account_root_id])]"/> <field name="property_account_income_opening" domain="[('id', 'child_of', [account_root_id])]"/>
<field name="property_account_expense_opening" domain="[('id', 'child_of', [account_root_id])]"/> <field name="property_account_expense_opening" domain="[('id', 'child_of', [account_root_id])]"/>
<field name="property_reserve_and_surplus_account" />
</group> </group>
</form> </form>
</field> </field>

View File

@ -32,14 +32,6 @@ class res_company(osv.osv):
help="If you select 'Round per Line' : for each tax, the tax amount will first be computed and rounded for each PO/SO/invoice line and then these rounded amounts will be summed, leading to the total amount for that tax. If you select 'Round Globally': for each tax, the tax amount will be computed for each PO/SO/invoice line, then these amounts will be summed and eventually this total tax amount will be rounded. If you sell with tax included, you should choose 'Round per line' because you certainly want the sum of your tax-included line subtotals to be equal to the total amount with taxes."), help="If you select 'Round per Line' : for each tax, the tax amount will first be computed and rounded for each PO/SO/invoice line and then these rounded amounts will be summed, leading to the total amount for that tax. If you select 'Round Globally': for each tax, the tax amount will be computed for each PO/SO/invoice line, then these amounts will be summed and eventually this total tax amount will be rounded. If you sell with tax included, you should choose 'Round per line' because you certainly want the sum of your tax-included line subtotals to be equal to the total amount with taxes."),
'paypal_account': fields.char("Paypal Account", size=128, help="Paypal username (usually email) for receiving online payments."), 'paypal_account': fields.char("Paypal Account", size=128, help="Paypal username (usually email) for receiving online payments."),
'overdue_msg': fields.text('Overdue Payments Message', translate=True), 'overdue_msg': fields.text('Overdue Payments Message', translate=True),
'property_reserve_and_surplus_account': fields.property(
'account.account',
type='many2one',
relation='account.account',
string="Reserve and Profit/Loss Account",
view_load=True,
domain="[('type', '=', 'other')]",
help="This account is used for transferring Profit/Loss (If It is Profit: Amount will be added, Loss : Amount will be deducted.), as calculated in Profit & Loss Report"),
} }
_defaults = { _defaults = {

View File

@ -15,18 +15,5 @@
</field> </field>
</record> </record>
<record model="ir.ui.view" id="view_company_inherit_1_form">
<field name="name">res.company.form.inherit</field>
<field name="inherit_id" ref="base.view_company_form"/>
<field name="model">res.company</field>
<field name="arch" type="xml">
<xpath expr="//group[@name='account_grp']" position="inside">
<field name="property_reserve_and_surplus_account"/>
<field name="tax_calculation_rounding_method"/>
<field name="paypal_account" placeholder="e.g. sales@openerp.com"/>
</xpath>
</field>
</record>
</data> </data>
</openerp> </openerp>

View File

@ -381,7 +381,6 @@
<field name="property_account_income_categ" ref="conf_a_sale"/> <field name="property_account_income_categ" ref="conf_a_sale"/>
<field name="property_account_income_opening" ref="conf_o_income"/> <field name="property_account_income_opening" ref="conf_o_income"/>
<field name="property_account_expense_opening" ref="conf_o_expense"/> <field name="property_account_expense_opening" ref="conf_o_expense"/>
<field name="property_reserve_and_surplus_account" ref="conf_a_reserve_and_surplus"/>
<field name="complete_tax_set" eval="False"/> <field name="complete_tax_set" eval="False"/>
</record> </record>

View File

@ -304,14 +304,6 @@
<field name="company_id" ref="base.main_company"/> <field name="company_id" ref="base.main_company"/>
</record> </record>
<record forcecreate="True" id="property_reserve_and_surplus_account" model="ir.property">
<field name="name">property_account_receivable</field>
<field name="fields_id" search="[('model','=','res.company'),('name','=','property_reserve_and_surplus_account')]"/>
<field eval="'account.account,'+str(rsa)" name="value"/>
<field name="company_id" ref="base.main_company"/>
</record>
<!-- <!--
Account Journal Account Journal
--> -->

File diff suppressed because it is too large Load Diff

View File

@ -20,6 +20,7 @@
############################################################################## ##############################################################################
import tools import tools
import decimal_precision as dp
from osv import fields,osv from osv import fields,osv
class account_invoice_report(osv.osv): class account_invoice_report(osv.osv):
@ -27,6 +28,31 @@ class account_invoice_report(osv.osv):
_description = "Invoices Statistics" _description = "Invoices Statistics"
_auto = False _auto = False
_rec_name = 'date' _rec_name = 'date'
def _compute_amounts_in_user_currency(self, cr, uid, ids, field_names, args, context=None):
"""Compute the amounts in the currency of the user
"""
if context is None:
context={}
currency_obj = self.pool.get('res.currency')
currency_rate_obj = self.pool.get('res.currency.rate')
user_currency_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id
currency_rate_id = currency_rate_obj.search(cr, uid, [('rate', '=', 1)], limit=1, context=context)[0]
base_currency_id = currency_rate_obj.browse(cr, uid, currency_rate_id, context=context).currency_id.id
res = {}
ctx = context.copy()
for item in self.browse(cr, uid, ids, context=context):
ctx['date'] = item.date
price_total = currency_obj.compute(cr, uid, base_currency_id, user_currency_id, item.price_total, context=ctx)
price_average = currency_obj.compute(cr, uid, base_currency_id, user_currency_id, item.price_average, context=ctx)
residual = currency_obj.compute(cr, uid, base_currency_id, user_currency_id, item.residual, context=ctx)
res[item.id] = {
'user_currency_price_total': price_total,
'user_currency_price_average': price_average,
'user_currency_residual': residual,
}
return res
_columns = { _columns = {
'date': fields.date('Date', readonly=True), 'date': fields.date('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True), 'year': fields.char('Year', size=4, readonly=True),
@ -47,7 +73,9 @@ class account_invoice_report(osv.osv):
'company_id': fields.many2one('res.company', 'Company', readonly=True), 'company_id': fields.many2one('res.company', 'Company', readonly=True),
'user_id': fields.many2one('res.users', 'Salesperson', readonly=True), 'user_id': fields.many2one('res.users', 'Salesperson', readonly=True),
'price_total': fields.float('Total Without Tax', readonly=True), 'price_total': fields.float('Total Without Tax', readonly=True),
'user_currency_price_total': fields.function(_compute_amounts_in_user_currency, string="Total Without Tax", type='float', digits_compute=dp.get_precision('Account'), multi="_compute_amounts"),
'price_average': fields.float('Average Price', readonly=True, group_operator="avg"), 'price_average': fields.float('Average Price', readonly=True, group_operator="avg"),
'user_currency_price_average': fields.function(_compute_amounts_in_user_currency, string="Average Price", type='float', digits_compute=dp.get_precision('Account'), multi="_compute_amounts"),
'currency_rate': fields.float('Currency Rate', readonly=True), 'currency_rate': fields.float('Currency Rate', readonly=True),
'nbr':fields.integer('# of Lines', readonly=True), 'nbr':fields.integer('# of Lines', readonly=True),
'type': fields.selection([ 'type': fields.selection([
@ -69,6 +97,7 @@ class account_invoice_report(osv.osv):
'account_line_id': fields.many2one('account.account', 'Account Line',readonly=True), 'account_line_id': fields.many2one('account.account', 'Account Line',readonly=True),
'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True), 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
'residual': fields.float('Total Residual', readonly=True), 'residual': fields.float('Total Residual', readonly=True),
'user_currency_residual': fields.function(_compute_amounts_in_user_currency, string="Total Residual", type='float', digits_compute=dp.get_precision('Account'), multi="_compute_amounts"),
'delay_to_pay': fields.float('Avg. Delay To Pay', readonly=True, group_operator="avg"), 'delay_to_pay': fields.float('Avg. Delay To Pay', readonly=True, group_operator="avg"),
'due_delay': fields.float('Avg. Due Delay', readonly=True, group_operator="avg"), 'due_delay': fields.float('Avg. Due Delay', readonly=True, group_operator="avg"),
} }
@ -161,7 +190,7 @@ class account_invoice_report(osv.osv):
left join product_uom u on (u.id=ail.uos_id), left join product_uom u on (u.id=ail.uos_id),
res_currency_rate cr res_currency_rate cr
where cr.id in (select id from res_currency_rate cr2 where (cr2.currency_id = ai.currency_id) where cr.id in (select id from res_currency_rate cr2 where (cr2.currency_id = ai.currency_id)
and ((ai.date_invoice is not null and cr.name <= ai.date_invoice) or (ai.date_invoice is null and cr.name <= NOW())) limit 1) and ((ai.date_invoice is not null and cr.name <= ai.date_invoice) or (ai.date_invoice is null and cr.name <= NOW())) order by name desc limit 1)
group by ail.product_id, group by ail.product_id,
ai.date_invoice, ai.date_invoice,
ai.id, ai.id,

View File

@ -28,8 +28,8 @@
<field name="nbr" sum="# of Lines"/> <field name="nbr" sum="# of Lines"/>
<field name="product_qty" sum="Qty"/> <field name="product_qty" sum="Qty"/>
<!-- <field name="reconciled" sum="# Reconciled"/> --> <!-- <field name="reconciled" sum="# Reconciled"/> -->
<field name="price_total" sum="Total Without Tax"/> <field name="user_currency_price_total" sum="Total Without Tax"/>
<field name="residual" sum="Total Residual" invisible="context.get('residual_invisible',False)"/> <field name="user_currency_residual" sum="Total Residual" invisible="context.get('residual_invisible',False)"/>
<field name="due_delay" sum="Avg. Due Delay" invisible="context.get('residual_invisible',False)"/> <field name="due_delay" sum="Avg. Due Delay" invisible="context.get('residual_invisible',False)"/>
<field name="delay_to_pay" sum="Avg. Delay To Pay" invisible="context.get('residual_invisible',False)"/> <field name="delay_to_pay" sum="Avg. Delay To Pay" invisible="context.get('residual_invisible',False)"/>
</tree> </tree>
@ -42,7 +42,7 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<graph string="Invoices Analysis" type="bar"> <graph string="Invoices Analysis" type="bar">
<field name="product_id"/> <field name="product_id"/>
<field name="price_total"/> <field name="user_currency_price_total"/>
</graph> </graph>
</field> </field>
</record> </record>

View File

@ -129,7 +129,7 @@
</td> </td>
<td> <td>
<para style="terp_default_9">[[ o.title.name or '' ]] [[ o.name ]]</para> <para style="terp_default_9">[[ o.title.name or '' ]] [[ o.name ]]</para>
<para style="terp_default_9">[[ display_address(o.partner_id)] ]]</para> <para style="terp_default_9">[[ display_address(o.partner_id) ]]</para>
<para style="terp_default_9"> <para style="terp_default_9">
<font color="white"> </font> <font color="white"> </font>
</para> </para>

View File

@ -121,7 +121,7 @@
</div> </div>
<label for="id" string="Features"/> <label for="id" string="Features"/>
<div> <div>
<div> <div name="group_multi_currency">
<field name="group_multi_currency" class="oe_inline"/> <field name="group_multi_currency" class="oe_inline"/>
<label for="group_multi_currency"/> <label for="group_multi_currency"/>
</div> </div>

View File

@ -5,7 +5,7 @@ openerp.account = function (instance) {
instance.web.account = {}; instance.web.account = {};
instance.web.views.add('account_reconciliation_list', 'instance.web.account.ReconciliationListView'); instance.web.views.add('tree_account_reconciliation', 'instance.web.account.ReconciliationListView');
instance.web.account.ReconciliationListView = instance.web.ListView.extend({ instance.web.account.ReconciliationListView = instance.web.ListView.extend({
init: function() { init: function() {
this._super.apply(this, arguments); this._super.apply(this, arguments);

View File

@ -154,7 +154,7 @@
<field name="view_id" ref="view_bank_statement_line_list"/> <field name="view_id" ref="view_bank_statement_line_list"/>
</record> </record>
<menuitem action="action_bank_statement_line" id="bank_statement_line" parent="account.menu_finance_bank_and_cash" sequence="20"/> <menuitem action="action_bank_statement_line" id="bank_statement_line" parent="account.menu_finance_bank_and_cash" sequence="20" groups="base.group_no_one"/>
</data> </data>
</openerp> </openerp>

View File

@ -42,6 +42,21 @@ class res_company(osv.osv):
res_company() res_company()
class account_config_settings(osv.osv_memory):
_inherit = 'account.config.settings'
_columns = {
'income_currency_exchange_account_id': fields.related(
'company_id', 'income_currency_exchange_account_id',
type='many2one',
relation='account.account',
string="Gain Exchange Rate Account"),
'expense_currency_exchange_account_id': fields.related(
'company_id', 'expense_currency_exchange_account_id',
type="many2one",
relation='account.account',
string="Loss Exchange Rate Account"),
}
class account_voucher(osv.osv): class account_voucher(osv.osv):
def _check_paid(self, cr, uid, ids, name, args, context=None): def _check_paid(self, cr, uid, ids, name, args, context=None):
res = {} res = {}

View File

@ -249,16 +249,23 @@
</field> </field>
</record> </record>
<!-- res.company form view --> <!-- res.config form view -->
<record model="ir.ui.view" id="view_company_inherit_currency_xchange_form"> <record model="ir.ui.view" id="view_account_settings_currency_xchange_form">
<field name="name">res.company.form.inherit</field> <field name="name">account.config.settings.inherit</field>
<field name="inherit_id" ref="base.view_company_form"/> <field name="inherit_id" ref="account.view_account_config_settings"/>
<field name="model">res.company</field> <field name="model">account.config.settings</field>
<field name="priority">20</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="currency_id" position="after"> <xpath expr="//div[@name='group_multi_currency']" position="after">
<field name="income_currency_exchange_account_id"/> <group attrs="{'invisible': [('group_multi_currency', '&lt;&gt;', True)]}" col="2">
<field name="expense_currency_exchange_account_id"/> <group>
</field> <field name="income_currency_exchange_account_id"/>
<field name="expense_currency_exchange_account_id"/>
</group>
<group>
</group>
</group>
</xpath>
</field> </field>
</record> </record>

View File

@ -170,7 +170,7 @@
<field name="model">res.partner</field> <field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/> <field name="inherit_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<filter string="Salesman" position="after"> <filter string="Salesperson" position="after">
<filter string="Activation" context="{'group_by' : 'activation'}" domain="[]" icon="terp-personal" /> <filter string="Activation" context="{'group_by' : 'activation'}" domain="[]" icon="terp-personal" />
</filter> </filter>
</field> </field>

View File

@ -19,6 +19,7 @@
# #
############################################################################## ##############################################################################
from datetime import datetime, timedelta
from osv import fields, osv from osv import fields, osv
from tools.translate import _ from tools.translate import _
from openerp import SUPERUSER_ID from openerp import SUPERUSER_ID
@ -281,6 +282,15 @@ class event_event(osv.osv):
}) })
return {'value' : values} return {'value' : values}
def onchange_start_date(self, cr, uid, ids, date_begin=False, date_end=False, context=None):
res = {'value':{}}
if date_end:
return res
if date_begin and isinstance(date_begin, str):
date_begin = datetime.strptime(date_begin, "%Y-%m-%d %H:%M:%S")
date_end = date_begin + timedelta(hours=1)
res['value'] = {'date_end': date_end.strftime("%Y-%m-%d %H:%M:%S")}
return res
# ---------------------------------------- # ----------------------------------------
# OpenChatter methods and notifications # OpenChatter methods and notifications

View File

@ -133,7 +133,7 @@
</group> </group>
<group> <group>
<field name="type" on_change="onchange_event_type(type,context)" /> <field name="type" on_change="onchange_event_type(type,context)" />
<field name="date_begin"/> <field name="date_begin" on_change="onchange_start_date(date_begin,date_end)"/>
<field name="date_end"/> <field name="date_end"/>
<field name="company_id" groups="base.group_multi_company"/> <field name="company_id" groups="base.group_multi_company"/>
</group> </group>

View File

@ -3,12 +3,20 @@ var QWeb = instance.web.qweb,
_t = instance.web._t; _t = instance.web._t;
instance.web.Sidebar = instance.web.Sidebar.extend({ instance.web.Sidebar = instance.web.Sidebar.extend({
on_attachments_loaded: function(attachments) {
var self = this;
_.chain(attachments)
.filter(function(attachment){ if (attachment.name ==='Google Doc') return true})
.map(function(attachment, i){ attachment.name = _.str.sprintf(_t("%s (%s)"), attachment.name, i+1)})
self._super(attachments);
},
redraw: function() { redraw: function() {
var self = this; var self = this;
this._super.apply(this, arguments); this._super.apply(this, arguments);
self.$el.find('.oe_sidebar_add_attachment').after(QWeb.render('Google_doc', {widget: self})) self.$el.find('.oe_sidebar_add_attachment').after(QWeb.render('Google_doc', {widget: self}))
self.$el.find('.oe_sidebar_add_google_doc').on('click', function (e) { self.$el.find('.oe_sidebar_add_google_doc').on('click', function (e) {
self.on_google_doc(); self.on_google_doc();
}); });
}, },
on_google_doc: function() { on_google_doc: function() {
@ -27,6 +35,7 @@ var QWeb = instance.web.qweb,
modal: true, modal: true,
}); });
} }
}).done(function(){
form.reload(); form.reload();
}); });
}); });

View File

@ -36,9 +36,11 @@
<page string="Public Information"> <page string="Public Information">
<group> <group>
<group string="Contact Information"> <group string="Contact Information">
<field name="address_id" on_change="onchange_address_id(address_id)" context="{'show_address': 1}" options='{"always_reload": True, "highlight_first_line": True}'/>
<field name="work_email" widget="email"/> <field name="work_email" widget="email"/>
<field name="work_phone"/> <field name="work_phone"/>
<field name="mobile_phone"/> <field name="mobile_phone"/>
<field name="work_location"/>
</group> </group>
<group string="Position"> <group string="Position">
<field name="department_id" on_change="onchange_department_id(department_id)"/> <field name="department_id" on_change="onchange_department_id(department_id)"/>
@ -49,7 +51,6 @@
<group> <group>
<field name="company_id" groups="base.group_multi_company" on_change="onchange_company(company_id)"/> <field name="company_id" groups="base.group_multi_company" on_change="onchange_company(company_id)"/>
<field name="user_id" on_change="onchange_user(user_id)" string="Related User"/> <field name="user_id" on_change="onchange_user(user_id)" string="Related User"/>
<field name="address_id" on_change="onchange_address_id(address_id)" context="{'show_address': 1}" options='{"always_reload": True, "highlight_first_line": True}'/>
</group> </group>
</group> </group>
<field name="notes" placeholder="Other Information ..." colspan="4"/> <field name="notes" placeholder="Other Information ..." colspan="4"/>

View File

@ -55,11 +55,11 @@
<sheet> <sheet>
<label for="employee_id" class="oe_edit_only"/> <label for="employee_id" class="oe_edit_only"/>
<h1><field name="employee_id" on_change="onchange_employee_id(employee_id)"/></h1> <h1><field name="employee_id" on_change="onchange_employee_id(employee_id)"/></h1>
<label for="date_from" class="oe_edit_only" string="Timesheet Period"/>
<h2>From <field name="date_from"/> to <field name="date_to"/></h2>
<group> <group>
<group> <group>
<field name="name"/> <label for="date_from" string="Timesheet Period"/>
<div><field name="date_from"/> to <field name="date_to"/></div>
<field name="name" invisible="1"/>
<field name="department_id"/> <field name="department_id"/>
<field name="company_id" groups="base.group_multi_company"/> <field name="company_id" groups="base.group_multi_company"/>
</group> </group>

View File

@ -11807,7 +11807,6 @@
<field name="property_account_income" ref="ch_3200"/> <field name="property_account_income" ref="ch_3200"/>
<field name="property_account_income_opening" ref="ch_2990"/> <field name="property_account_income_opening" ref="ch_2990"/>
<field name="property_account_expense_opening" ref="ch_2990"/> <field name="property_account_expense_opening" ref="ch_2990"/>
<field name="property_reserve_and_surplus_account" ref="ch_2991"/>
</record> </record>
<!-- journal configuration of account --> <!-- journal configuration of account -->

View File

@ -957,7 +957,6 @@
<field name="property_account_payable" ref="chart2202"/> <field name="property_account_payable" ref="chart2202"/>
<field name="property_account_expense_categ" ref="chart1401"/> <field name="property_account_expense_categ" ref="chart1401"/>
<field name="property_account_income_categ" ref="chart6001"/> <field name="property_account_income_categ" ref="chart6001"/>
<field name="property_reserve_and_surplus_account" ref="chart4103"/>
</record> </record>
<!-- 增值税 --> <!-- 增值税 -->
<record id="vats" model="account.tax.template"> <record id="vats" model="account.tax.template">

View File

@ -441,7 +441,6 @@
<field name="property_account_payable" ref="fr_pcg_pay"/> <field name="property_account_payable" ref="fr_pcg_pay"/>
<field name="property_account_expense_categ" ref="pcg_6071"/> <field name="property_account_expense_categ" ref="pcg_6071"/>
<field name="property_account_income_categ" ref="pcg_7071"/> <field name="property_account_income_categ" ref="pcg_7071"/>
<field name="property_reserve_and_surplus_account" ref="pcg_120"/>
</record> </record>
</data> </data>

View File

@ -35,7 +35,6 @@
<field name="bank_account_view_id" ref="cta1101"/> <field name="bank_account_view_id" ref="cta1101"/>
<field name="property_account_receivable" ref="cta110201"/> <field name="property_account_receivable" ref="cta110201"/>
<field name="property_account_payable" ref="cta210101"/> <field name="property_account_payable" ref="cta210101"/>
<field name="property_reserve_and_surplus_account" ref="cta310103"/>
<field name="property_account_income_categ" ref="cta410101"/> <field name="property_account_income_categ" ref="cta410101"/>
<field name="property_account_expense_categ" ref="cta510101"/> <field name="property_account_expense_categ" ref="cta510101"/>
</record> </record>

View File

@ -21,7 +21,6 @@
<field name="bank_account_view_id" ref="cta1101"/> <field name="bank_account_view_id" ref="cta1101"/>
<field name="property_account_receivable" ref="cta110201"/> <field name="property_account_receivable" ref="cta110201"/>
<field name="property_account_payable" ref="cta210101"/> <field name="property_account_payable" ref="cta210101"/>
<field name="property_reserve_and_surplus_account" ref="cta310103"/>
<field name="property_account_income_categ" ref="cta410101"/> <field name="property_account_income_categ" ref="cta410101"/>
<field name="property_account_expense_categ" ref="cta510101"/> <field name="property_account_expense_categ" ref="cta510101"/>
</record> </record>

View File

@ -514,7 +514,6 @@
<field name="property_account_payable" ref="a215"/> <field name="property_account_payable" ref="a215"/>
<field name="property_account_expense_categ" ref="a540"/> <field name="property_account_expense_categ" ref="a540"/>
<field name="property_account_income_categ" ref="a311"/> <field name="property_account_income_categ" ref="a311"/>
<field name="property_reserve_and_surplus_account" ref="a260"/>
</record> </record>

View File

@ -668,7 +668,6 @@
<field name="property_account_payable" ref="p21000"/> <field name="property_account_payable" ref="p21000"/>
<field name="property_account_expense_categ" ref="p41010"/> <field name="property_account_expense_categ" ref="p41010"/>
<field name="property_account_income_categ" ref="p31010"/> <field name="property_account_income_categ" ref="p31010"/>
<field name="property_reserve_and_surplus_account" ref="p24600"/>
</record> </record>
</data> </data>

View File

@ -4102,7 +4102,6 @@
<field name="property_account_payable" ref="a_pay"/> <!-- crediteuren --> <field name="property_account_payable" ref="a_pay"/> <!-- crediteuren -->
<field name="property_account_expense_categ" ref="a_expense"/><!-- aankoop grondstoffen --> <field name="property_account_expense_categ" ref="a_expense"/><!-- aankoop grondstoffen -->
<field name="property_account_income_categ" ref="a_sale"/> <!-- verkoop rekening --> <field name="property_account_income_categ" ref="a_sale"/> <!-- verkoop rekening -->
<field name="property_reserve_and_surplus_account" ref="a_9999"/>
</record> </record>
<!-- BTW Template <!-- BTW Template

View File

@ -1,2 +1,2 @@
"id","name","account_root_id:id","tax_code_root_id:id","bank_account_view_id:id","property_account_receivable:id","property_account_payable:id","property_account_expense_categ:id","property_account_income_categ:id","property_reserve_and_surplus_account:id" "id","name","account_root_id:id","tax_code_root_id:id","bank_account_view_id:id","property_account_receivable:id","property_account_payable:id","property_account_expense_categ:id","property_account_income_categ:id"
"l10n_uk","UK Tax and Account Chart Template (by SmartMode)","UK0","0","1200","1100","2100","5000","4000","3200" "l10n_uk","UK Tax and Account Chart Template (by SmartMode)","UK0","0","1200","1100","2100","5000","4000"

1 id name account_root_id:id tax_code_root_id:id bank_account_view_id:id property_account_receivable:id property_account_payable:id property_account_expense_categ:id property_account_income_categ:id property_reserve_and_surplus_account:id
2 l10n_uk UK Tax and Account Chart Template (by SmartMode) UK0 0 1200 1100 2100 5000 4000 3200

View File

@ -1895,7 +1895,6 @@
<field name="property_account_payable" ref="uy_code_21100"/> <field name="property_account_payable" ref="uy_code_21100"/>
<field name="property_account_income_categ" ref="uy_code_4100"/> <field name="property_account_income_categ" ref="uy_code_4100"/>
<field name="property_account_expense_categ" ref="uy_code_5100"/> <field name="property_account_expense_categ" ref="uy_code_5100"/>
<field name="property_reserve_and_surplus_account" ref="uy_code_3313"/>
</record> </record>

View File

@ -274,6 +274,17 @@ class mrp_bom(osv.osv):
return {'value': {'name': prod.name, 'product_uom': prod.uom_id.id}} return {'value': {'name': prod.name, 'product_uom': prod.uom_id.id}}
return {} return {}
def onchange_uom(self, cr, uid, ids, product_id, product_uom, context=None):
res = {'value':{}}
if not product_uom or not product_id:
return res
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
uom = self.pool.get('product.uom').browse(cr, uid, product_uom, context=context)
if uom.category_id.id != product.uom_id.category_id.id:
res['warning'] = {'title': _('Warning'), 'message': _('The Product Unit of Measure you chose has a different category than in the product form.')}
res['value'].update({'product_uom': product.uom_id.id})
return res
def _bom_find(self, cr, uid, product_id, product_uom, properties=None): def _bom_find(self, cr, uid, product_id, product_uom, properties=None):
""" Finds BoM for particular product and product uom. """ Finds BoM for particular product and product uom.
@param product_id: Selected product. @param product_id: Selected product.

View File

@ -351,7 +351,7 @@
<label for="product_qty" string="Quantity"/> <label for="product_qty" string="Quantity"/>
<div> <div>
<field name="product_qty" class="oe_inline"/> <field name="product_qty" class="oe_inline"/>
<field name="product_uom" class="oe_inline" groups="product.group_uom"/> <field name="product_uom" class="oe_inline" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
</div> </div>
<label for="product_uos_qty" groups="product.group_uos"/> <label for="product_uos_qty" groups="product.group_uos"/>
<div groups="product.group_uos" > <div groups="product.group_uos" >
@ -382,7 +382,7 @@
<tree string="Components" editable="bottom"> <tree string="Components" editable="bottom">
<field name="product_id" on_change="onchange_product_id(product_id, name)"/> <field name="product_id" on_change="onchange_product_id(product_id, name)"/>
<field name="product_qty"/> <field name="product_qty"/>
<field name="product_uom" groups="product.group_uom"/> <field name="product_uom" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
<field name="name" invisible="1"/> <field name="name" invisible="1"/>
<field name="date_start"/> <field name="date_start"/>
<field name="date_stop"/> <field name="date_stop"/>

View File

@ -22,6 +22,7 @@
from osv import fields from osv import fields
from osv import osv from osv import osv
import decimal_precision as dp import decimal_precision as dp
from tools.translate import _
class mrp_subproduct(osv.osv): class mrp_subproduct(osv.osv):
_name = 'mrp.subproduct' _name = 'mrp.subproduct'
@ -51,6 +52,17 @@ class mrp_subproduct(osv.osv):
return {'value': v} return {'value': v}
return {} return {}
def onchange_uom(self, cr, uid, ids, product_id, product_uom, context=None):
res = {'value':{}}
if not product_uom or not product_id:
return res
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
uom = self.pool.get('product.uom').browse(cr, uid, product_uom, context=context)
if uom.category_id.id != product.uom_id.category_id.id:
res['warning'] = {'title': _('Warning'), 'message': _('The Product Unit of Measure you chose has a different category than in the product form.')}
res['value'].update({'product_uom': product.uom_id.id})
return res
mrp_subproduct() mrp_subproduct()
class mrp_bom(osv.osv): class mrp_bom(osv.osv):

View File

@ -11,13 +11,13 @@
<field name="sub_products"> <field name="sub_products">
<tree string="sub products" editable="top"> <tree string="sub products" editable="top">
<field name="product_id" on_change="onchange_product_id(product_id)"/> <field name="product_id" on_change="onchange_product_id(product_id)"/>
<field name="product_uom" groups="product.group_uom"/> <field name="product_uom" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
<field name="product_qty"/> <field name="product_qty"/>
<field name="subproduct_type"/> <field name="subproduct_type"/>
</tree> </tree>
<form string="Sub Products"> <form string="Sub Products">
<field name="product_id" on_change="onchange_product_id(product_id)"/> <field name="product_id" on_change="onchange_product_id(product_id)"/>
<field name="product_uom" groups="product.group_uom"/> <field name="product_uom" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
<field name="product_qty"/> <field name="product_qty"/>
<field name="subproduct_type"/> <field name="subproduct_type"/>
</form> </form>

View File

@ -13,7 +13,7 @@
<filter string="Consumable" name="consumable" icon="terp-accessories-archiver" domain="[('type','=','consu')]" help="Consumable products"/> <filter string="Consumable" name="consumable" icon="terp-accessories-archiver" domain="[('type','=','consu')]" help="Consumable products"/>
<separator/> <separator/>
<filter string="Can be Sold" name="filter_to_sell" icon="terp-accessories-archiver-minus" domain="[('sale_ok','=',1)]"/> <filter string="Can be Sold" name="filter_to_sell" icon="terp-accessories-archiver-minus" domain="[('sale_ok','=',1)]"/>
<field name="categ_id" operator="child_of"/> <field name="categ_id"/>
<group expand="0" string="Context..."> <group expand="0" string="Context...">
<field name="pricelist_id" context="{'pricelist': self}" groups="product.group_sale_pricelist"/> <field name="pricelist_id" context="{'pricelist': self}" groups="product.group_sale_pricelist"/>
<field name="company_id" groups="base.group_multi_company"/> <field name="company_id" groups="base.group_multi_company"/>

View File

@ -135,7 +135,7 @@
<field name="resource_calendar_id"/> <field name="resource_calendar_id"/>
</group> </group>
<group string="Miscellaneous" name="misc"> <group string="Miscellaneous" name="misc">
<field name="date"/> <field name="date" string="End Date"/>
<field name="priority" groups="base.group_no_one"/> <field name="priority" groups="base.group_no_one"/>
<field name="active" attrs="{'invisible':[('state','in',['open', 'pending', 'template'])]}"/> <field name="active" attrs="{'invisible':[('state','in',['open', 'pending', 'template'])]}"/>

View File

@ -42,10 +42,10 @@
</record> </record>
<record model="ir.rule" id="project_public_members_rule"> <record model="ir.rule" id="project_public_members_rule">
<field name="name">public Members</field> <field name="name">Public Members</field>
<field name="model_id" ref="model_project_project"/> <field name="model_id" ref="model_project_project"/>
<field name="global" eval="True"/> <field name="global" eval="True"/>
<field name="domain_force">['|','|',('privacy_visibility','in',[False,'public']),('members','in',[user.id]),('message_follower_ids','in',[user.partner_id.id])]</field> <field name="domain_force">['|',('privacy_visibility','in',[False,'public']),('message_follower_ids','in',[user.partner_id.id])]</field>
</record> </record>
<record model="ir.rule" id="task_comp_rule"> <record model="ir.rule" id="task_comp_rule">

View File

@ -78,8 +78,6 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="remaining_hours" position="after"> <field name="remaining_hours" position="after">
<field string="Timebox" name="timebox_id" invisible=" not context.get('gtd', False)"/> <field string="Timebox" name="timebox_id" invisible=" not context.get('gtd', False)"/>
<button name="prev_timebox" type="object" icon="gtk-go-back" string="Previous" states="draft,pending,open" invisible=" not context.get('gtd',False)"/>
<button name="next_timebox" type="object" icon="gtk-go-forward" string="Next" states="draft,pending,open" invisible=" not context.get('gtd',False)"/>
<field name="context_id" invisible="not context.get('context_show', False)" widget="selection"/> <field name="context_id" invisible="not context.get('context_show', False)" widget="selection"/>
<button name="do_reopen" states="done,cancelled" string="Reactivate" type="object" icon="gtk-convert" help="For reopening the tasks" invisible="not context.get('set_visible',False)"/> <button name="do_reopen" states="done,cancelled" string="Reactivate" type="object" icon="gtk-convert" help="For reopening the tasks" invisible="not context.get('set_visible',False)"/>
</field> </field>
@ -123,7 +121,7 @@
<field name="context">{'set_editable':True,'set_visible':True,'gtd':True,'user_invisible':True, "search_default_open": 1}</field> <field name="context">{'set_editable':True,'set_visible':True,'gtd':True,'user_invisible':True, "search_default_open": 1}</field>
<field name="domain">[('user_id','=',uid)]</field> <field name="domain">[('user_id','=',uid)]</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,gantt,graph,kanban</field> <field name="view_mode">kanban,tree,form,calendar,gantt,graph</field>
</record> </record>
<menuitem action="open_gtd_task" id="menu_open_gtd_timebox_tree" parent="project.menu_project_management" sequence="10"/> <menuitem action="open_gtd_task" id="menu_open_gtd_timebox_tree" parent="project.menu_project_management" sequence="10"/>

View File

@ -440,16 +440,6 @@
<field name="search_view_id" ref="view_sales_order_filter"/> <field name="search_view_id" ref="view_sales_order_filter"/>
</record> </record>
<record id="view_order_line_graph" model="ir.ui.view">
<field name="name">sale.order.line.graph</field>
<field name="model">sale.order.line</field>
<field name="arch" type="xml">
<graph string="Sales Order Lines">
<field name="product_id"/>
<field name="price_subtotal" operator="+"/>
</graph>
</field>
</record>
<record id="view_order_line_tree" model="ir.ui.view"> <record id="view_order_line_tree" model="ir.ui.view">
<field name="name">sale.order.line.tree</field> <field name="name">sale.order.line.tree</field>
@ -562,7 +552,7 @@
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">sale.order.line</field> <field name="res_model">sale.order.line</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field> <field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_sales_order_uninvoiced_line_filter"/> <field name="search_view_id" ref="view_sales_order_uninvoiced_line_filter"/>
<field name="context">{"search_default_uninvoiced":1}</field> <field name="context">{"search_default_uninvoiced":1}</field>
<field name="filter" eval="True"/> <field name="filter" eval="True"/>
@ -581,7 +571,7 @@
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">sale.order.line</field> <field name="res_model">sale.order.line</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field> <field name="view_mode">tree,form</field>
<field name="domain">[('invoiced','&lt;&gt;', 1),('state','=','done')]</field> <field name="domain">[('invoiced','&lt;&gt;', 1),('state','=','done')]</field>
<field name="filter" eval="True"/> <field name="filter" eval="True"/>
</record> </record>