diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/repair/data | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/repair/data')
| -rw-r--r-- | addons/repair/data/ir_sequence_data.xml | 12 | ||||
| -rw-r--r-- | addons/repair/data/repair_data.xml | 38 | ||||
| -rw-r--r-- | addons/repair/data/repair_demo.xml | 106 |
3 files changed, 156 insertions, 0 deletions
diff --git a/addons/repair/data/ir_sequence_data.xml b/addons/repair/data/ir_sequence_data.xml new file mode 100644 index 00000000..fe0c00de --- /dev/null +++ b/addons/repair/data/ir_sequence_data.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data noupdate="1"> + <record id="seq_repair" model="ir.sequence"> + <field name="name">Repair Order</field> + <field name="code">repair.order</field> + <field name="prefix">RMA/</field> + <field name="padding">5</field> + <field name="company_id" eval="False"/> + </record> + </data> +</odoo> diff --git a/addons/repair/data/repair_data.xml b/addons/repair/data/repair_data.xml new file mode 100644 index 00000000..1fbdd62c --- /dev/null +++ b/addons/repair/data/repair_data.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data noupdate="1"> + <record id="mail_template_repair_quotation" model="mail.template"> + <field name="name">Repair Quotation: Send by email</field> + <field name="model_id" ref="repair.model_repair_order"/> + <field name="subject">${object.partner_id.name} Repair Orders (Ref ${object.name or 'n/a' })</field> + <field name="email_from">${(object.create_uid.email_formatted or user.email_formatted) | safe}</field> + <field name="partner_to">${object.partner_id.id}</field> + <field name="body_html" type="xml"> +<div style="margin: 0px; padding: 0px;"> + <p style="margin: 0px; padding: 0px;font-size: 13px;"> + Hello ${object.partner_id.name},<br/> + Here is your repair order ${doc_name} <strong>${object.name}</strong> + % if object.origin: + (with reference: ${object.origin} ) + % endif + % if object.invoice_method != 'none': + amounting in <strong>${format_amount(object.amount_total, object.pricelist_id.currency_id)}.</strong><br/> + % else: + .<br/> + % endif + You can reply to this email if you have any questions. + <br/><br/> + Thank you, + % if user.signature + <br /> + ${user.signature | safe} + % endif + </p> +</div></field> + <field name="report_template" ref="action_report_repair_order"/> + <field name="report_name">${(object.name or '').replace('/','_')}</field> + <field name="lang">${object.partner_id.lang}</field> + <field name="auto_delete" eval="True"/> + </record> + </data> +</odoo> diff --git a/addons/repair/data/repair_demo.xml b/addons/repair/data/repair_demo.xml new file mode 100644 index 00000000..2cde18d0 --- /dev/null +++ b/addons/repair/data/repair_demo.xml @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <record id="product_service_order_repair" model="product.product"> + <field name="name">Repair Services</field> + <field name="categ_id" ref="product.product_category_3"/> + <field name="standard_price">20.5</field> + <field name="list_price">30.75</field> + <field name="type">service</field> + </record> + + <record id="repair_r1" model="repair.order"> + <field name="address_id" ref="base.res_partner_address_1"/> + <field name="guarantee_limit" eval="datetime.today().strftime('%Y-%m-%d')"/> + <field name="invoice_method">none</field> + <field name="user_id"/> + <field name="product_id" ref="product.product_product_3"/> + <field name="product_uom" ref="uom.product_uom_unit"/> + <field name="partner_invoice_id" ref="base.res_partner_address_1"/> + <field name="location_id" ref="stock.stock_location_stock"/> + <field name="operations" model="repair.line" eval="[(5, 0, 0), (0, 0, { + 'location_dest_id': obj().env.ref('product.product_product_11').property_stock_production.id, + 'location_id': obj().env.ref('stock.stock_location_stock').id, + 'name': obj().env.ref('product.product_product_11').get_product_multiline_description_sale(), + 'product_id': obj().env.ref('product.product_product_11').id, + 'product_uom': obj().env.ref('uom.product_uom_unit').id, + 'product_uom_qty': '1.0', + 'price_unit': 50.0, + 'state': 'draft', + 'type': 'add', + 'company_id': obj().env.ref('base.main_company').id, + })]"/> + <field name="fees_lines" model="repair.fee" eval="[(5, 0, 0), (0, 0, { + 'name': obj().env.ref('repair.product_service_order_repair').get_product_multiline_description_sale(), + 'product_id': obj().env.ref('repair.product_service_order_repair').id, + 'product_uom_qty': 1.0, + 'product_uom': obj().env.ref('uom.product_uom_unit').id, + 'company_id': obj().env.ref('base.main_company').id, + 'price_unit': 50.0, + })]"/> + <field name="partner_id" ref="base.res_partner_12"/> + </record> + + <record id="repair_r0" model="repair.order"> + <field name="product_id" ref="product.product_product_5"/> + <field name="product_uom" ref="uom.product_uom_unit"/> + <field name="address_id" ref="base.res_partner_address_1"/> + <field name="guarantee_limit" eval="datetime.today().strftime('%Y-%m-%d')"/> + <field name="invoice_method">after_repair</field> + <field name="user_id"/> + <field name="partner_invoice_id" ref="base.res_partner_address_1"/> + <field name="location_id" ref="stock.stock_location_stock"/> + <field name="operations" model="repair.line" eval="[(5, 0, 0), (0, 0, { + 'location_dest_id': obj().env.ref('product.product_product_12').property_stock_production.id, + 'location_id': obj().env.ref('stock.stock_location_stock').id, + 'name': obj().env.ref('product.product_product_12').get_product_multiline_description_sale(), + 'price_unit': 50.0, + 'product_id': obj().env.ref('product.product_product_12').id, + 'product_uom': obj().env.ref('uom.product_uom_unit').id, + 'product_uom_qty': 1.0, + 'state': 'draft', + 'type': 'add', + 'company_id': obj().env.ref('base.main_company').id, + })]"/> + <field name="fees_lines" model="repair.fee" eval="[(5, 0, 0), (0, 0, { + 'name': obj().env.ref('repair.product_service_order_repair').get_product_multiline_description_sale(), + 'product_id': obj().env.ref('repair.product_service_order_repair').id, + 'product_uom_qty': 1.0, + 'product_uom': obj().env.ref('uom.product_uom_unit').id, + 'price_unit': 50.0, + 'company_id': obj().env.ref('base.main_company').id, + })]"/> + <field name="partner_id" ref="base.res_partner_12"/> + </record> + + <record id="repair_r2" model="repair.order"> + <field name="product_id" ref="product.product_product_6"/> + <field name="product_uom" ref="uom.product_uom_unit"/> + <field name="address_id" ref="base.res_partner_address_1"/> + <field name="guarantee_limit" eval="datetime.today().strftime('%Y-%m-%d')"/> + <field name="invoice_method">b4repair</field> + <field name="user_id"/> + <field name="partner_invoice_id" ref="base.res_partner_address_1"/> + <field name="location_id" ref="stock.stock_location_14"/> + <field name="operations" model="repair.line" eval="[(5, 0, 0), (0, 0, { + 'location_dest_id': obj().env.ref('product.product_product_13').property_stock_production.id, + 'location_id': obj().env.ref('stock.stock_location_stock').id, + 'name': obj().env.ref('product.product_product_13').get_product_multiline_description_sale(), + 'price_unit': 50.0, + 'product_id': obj().env.ref('product.product_product_13').id, + 'product_uom': obj().env.ref('uom.product_uom_unit').id, + 'product_uom_qty': 1.0, + 'state': 'draft', + 'type': 'add', + 'company_id': obj().env.ref('base.main_company').id, + })]"/> + <field name="fees_lines" model="repair.fee" eval="[(5, 0, 0), (0, 0, { + 'name': obj().env.ref('repair.product_service_order_repair').get_product_multiline_description_sale(), + 'product_id': obj().env.ref('repair.product_service_order_repair').id, + 'product_uom_qty': 1.0, + 'product_uom': obj().env.ref('uom.product_uom_unit').id, + 'price_unit': 50.0, + 'company_id': obj().env.ref('base.main_company').id, + })]"/> + <field name="partner_id" ref="base.res_partner_12"/> + </record> +</odoo> |
