diff options
| author | Fabien Pinckaers <fp@tinyerp.com> | 2008-08-19 21:42:11 +0200 |
|---|---|---|
| committer | Fabien Pinckaers <fp@tinyerp.com> | 2008-08-19 21:42:11 +0200 |
| commit | 661982c0722321ba20e67a720986dc0a3dfd666f (patch) | |
| tree | 13f6f80186452c05f888ca3954b00c4d8636ba98 | |
| parent | 7b9668516703d4d9be090f276be520f665f3d00a (diff) | |
| parent | 57ae896b10661537859240dcf4fbb3a74a1c5a42 (diff) | |
Bugfix Timesheet (merge from C2C)
Adding properties modifications
bzr revid: fp@tinyerp.com-20080819194211-x55bqzxmebirmrht
| -rw-r--r-- | addons/delivery/partner_view.xml | 18 | ||||
| -rw-r--r-- | addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 10 | ||||
| -rw-r--r-- | addons/product/partner_view.xml | 18 | ||||
| -rw-r--r-- | addons/purchase/partner_view.xml | 18 | ||||
| -rw-r--r-- | addons/stock/partner_view.xml | 23 | ||||
| -rw-r--r-- | addons/stock/product_view.xml | 61 |
6 files changed, 147 insertions, 1 deletions
diff --git a/addons/delivery/partner_view.xml b/addons/delivery/partner_view.xml new file mode 100644 index 00000000000..7be367faf22 --- /dev/null +++ b/addons/delivery/partner_view.xml @@ -0,0 +1,18 @@ +<terp> + <data> + + <record id="view_partner_property_form" model="ir.ui.view"> + <field name="name">res.partner.carrier.property.form.inherit</field> + <field name="model">res.partner</field> + <field name="type">form</field> + <field name="inherit_id" ref="base.view_partner_form"/> + <field name="arch" type="xml"> + <page string="Deliveries" position="inside"> + <separator string="Deliveries" colspan="4"/> + <field name="property_delivery_carrier"/> + </page> + </field> + </record> + + </data> +</terp> diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 56bf68750db..53e5087a1fa 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -276,8 +276,16 @@ class hr_timesheet_sheet(osv.osv): return False return True + def _date_current_check(self, cr, uid, ids): + for sheet in self.browse(cr, uid, ids): + if sheet.date_current < sheet.date_from or sheet.date_current > sheet.date_to: + return False + return True + + _constraints = [ - (_sheet_date, 'You can not have 2 timesheets that overlaps !', ['date_from','date_to']) + (_sheet_date, 'You can not have 2 timesheets that overlaps !', ['date_from','date_to']), + (_date_current_check, 'You must select a Current date wich is in the timesheet dates !', ['date_current']), ] def action_set_to_draft(self, cr, uid, ids, *args): diff --git a/addons/product/partner_view.xml b/addons/product/partner_view.xml new file mode 100644 index 00000000000..68fc31d3640 --- /dev/null +++ b/addons/product/partner_view.xml @@ -0,0 +1,18 @@ +<terp> + <data> + + <record id="view_partner_property_form" model="ir.ui.view"> + <field name="name">res.partner.product.property.form.inherit</field> + <field name="model">res.partner</field> + <field name="type">form</field> + <field name="inherit_id" ref="base.view_partner_form"/> + <field name="arch" type="xml"> + <page string="Properties" position="inside"> + <separator string="Sales" colspan="4"/> + <field name="property_product_pricelist"/> + </page> + </field> + </record> + + </data> +</terp> diff --git a/addons/purchase/partner_view.xml b/addons/purchase/partner_view.xml new file mode 100644 index 00000000000..188ac119d79 --- /dev/null +++ b/addons/purchase/partner_view.xml @@ -0,0 +1,18 @@ +<terp> + <data> + + <record id="view_partner_property_form" model="ir.ui.view"> + <field name="name">res.partner.purchase.property.form.inherit</field> + <field name="model">res.partner</field> + <field name="type">form</field> + <field name="inherit_id" ref="base.view_partner_form"/> + <field name="arch" type="xml"> + <page string="Properties" position="inside"> + <separator string="Purchases" colspan="4"/> + <field name="property_product_pricelist_purchase"/> + </page> + </field> + </record> + + </data> +</terp> diff --git a/addons/stock/partner_view.xml b/addons/stock/partner_view.xml new file mode 100644 index 00000000000..2cfc6cc3a4a --- /dev/null +++ b/addons/stock/partner_view.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<terp> + <data> + <!-- + Partners Extension + --> + + <record id="view_partner_property_form" model="ir.ui.view"> + <field name="name">res.partner.stock.property.form.inherit</field> + <field name="model">res.partner</field> + <field name="type">form</field> + <field name="inherit_id" ref="base.view_partner_form"/> + <field name="arch" type="xml"> + <page string="Properties" position="inside"> + <separator string="Stock Properties" colspan="2"/> + <field name="property_stock_customer"/> + <field name="property_stock_supplier"/> + </page> + </field> + </record> + + </data> +</terp> diff --git a/addons/stock/product_view.xml b/addons/stock/product_view.xml new file mode 100644 index 00000000000..19f32285538 --- /dev/null +++ b/addons/stock/product_view.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="utf-8"?> +<terp> + <data> + + <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="type">form</field> + <field name="inherit_id" ref="product.product_category_form_view"/> + <field name="arch" type="xml"> + <group string="Properties" position="inside"> + <separator string="Stock Accounting" colspan="4"/> + <field name="property_stock_account_input_categ"/> + <field name="property_stock_account_output_categ"/> + <field name="property_stock_journal"/> + </group> + </field> + </record> + + + + <record id="view_template_property_form" model="ir.ui.view"> + <field name="name">product.template.stock.property.form.inherit</field> + <field name="model">product.template</field> + <field name="type">form</field> + <field name="inherit_id" ref="product.product_template_form_view"/> + <field name="arch" type="xml"> + <page string="Properties" position="inside"> + <separator string="Counter-Part Locations" colspan="4"/> + <field name="property_stock_procurement"/> + <field name="property_stock_production"/> + <field name="property_stock_inventory"/> + <separator string="Accounting Entries" colspan="4"/> + <field name="property_stock_account_input"/> + <field name="property_stock_account_output"/> + </page> + </field> + </record> + + + <record id="view_normal_property_form" model="ir.ui.view"> + <field name="name">product.normal.stock.property.form.inherit</field> + <field name="model">product.product</field> + <field name="type">form</field> + <field name="inherit_id" ref="product.product_normal_form_view"/> + <field name="arch" type="xml"> + <page string="Properties" position="inside"> + <separator string="Counter-Part Locations" colspan="4"/> + <field name="property_stock_procurement"/> + <field name="property_stock_production"/> + <field name="property_stock_inventory"/> + <separator string="Accounting Entries" colspan="4"/> + <field name="property_stock_account_input"/> + <field name="property_stock_account_output"/> + </page> + </field> + </record> + + + </data> +</terp> |
