Skip to content

Commit aa99772

Browse files
committed
[IMP] libraries: cleanup 9
1 parent 9a72418 commit aa99772

21 files changed

+180
-189
lines changed

library/__manifest__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
'name': 'library',
2+
'name': 'Library',
33
'version': '1.0',
44
'category': 'Services',
55
'author': 'Odoo S.A.',
66
'depends': [
77
'appointment',
88
'base_industry_data',
9-
'hr_hourly_cost',
9+
'hr',
1010
'knowledge',
1111
'partnership',
1212
'pos_enterprise',
@@ -45,14 +45,15 @@
4545
'data/res_partner_grade.xml',
4646
'data/stock_rule.xml',
4747
'data/delivery_carrier.xml',
48+
'data/pos_payment_method.xml',
49+
'data/pos_config.xml',
4850
],
4951
'demo': [
5052
'demo/delivery_carrier.xml',
5153
'demo/payment_provider_demo.xml',
5254
'demo/product_pricelist.xml',
5355
'demo/product_product.xml',
5456
'demo/event_event.xml',
55-
'demo/pos_config.xml',
5657
'demo/website_view.xml',
5758
'demo/pos_session.xml',
5859
'demo/pos_order.xml',

library/data/base_automation.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<field name="trigger">on_change</field>
1616
<field name="on_change_field_ids" eval="[(6, 0, [ref('stock.field_stock_route__product_selectable')])]"/>
1717
</record>
18-
<record id="automation_create_excise_tax" model="base.automation">
18+
<record id="automation_make_route_on_product_create" model="base.automation">
1919
<field name="name">Make availble route on product create</field>
2020
<field name="model_id" ref="product.model_product_template"/>
2121
<field name="action_server_ids" eval="[(6, 0, [ref('make_route_on_product_create')])]"/>

library/data/ir_actions_act_window.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
<?xml version='1.0' encoding='UTF-8'?>
22
<odoo>
3-
<record id="return_move_line_act_window" model="ir.actions.act_window">
4-
<field name="name">Return</field>
5-
<field name="res_model">stock.move.line</field>
6-
<field name="view_mode">kanban,list,form,pivot</field>
7-
</record>
83
<record id="settings_act_window" model="ir.actions.act_window">
94
<field name="name">Settings</field>
105
<field name="res_model">stock.rule</field>

library/data/ir_actions_server.xml

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,36 @@
66
<field name="state">code</field>
77
<field name="code"><![CDATA[
88
for record in records:
9-
if record.x_studio_standard_rule or not record.x_studio_pos_product_category_ids:
9+
if record.x_standard_rule or not record.x_pos_product_category_ids:
1010
record['push_domain'] = []
1111
else:
12-
record['push_domain'] = [
13-
("product_id.pos_categ_ids", "in", record.x_studio_pos_product_category_ids.ids)
14-
]
12+
record['push_domain'] = [("product_id.pos_categ_ids", "in", record.x_pos_product_category_ids.ids)]
1513
]]></field>
1614
</record>
1715
<record id="action_update_automatic_activation_on_product" model="ir.actions.server">
1816
<field name="code"><![CDATA[
19-
records.filtered(lambda r: r.product_selectable).write({
20-
'x_studio_automatic_activation_on_product': False
21-
})
22-
records.filtered(lambda r: not r.product_selectable).write({
23-
'x_studio_automatic_activation_on_product': True
24-
})
17+
for route in records:
18+
route['x_automatic_activation_on_product'] = not route.product_selectable
2519
]]></field>
2620
<field name="model_id" ref="stock.model_stock_route"/>
2721
<field name="state">code</field>
2822
<field name="name">Execute Code</field>
2923
</record>
30-
<record id="make_route_on_product_create" model="ir.actions.server">
31-
<field name="code"><![CDATA[
32-
record.write({'route_ids': [(6, 0, [env.ref('library.stock_route_4').id])]})
33-
]]></field>
34-
<field name="model_id" ref="product.model_product_template"/>
35-
<field name="state">code</field>
36-
<field name="name">Execute Code</field>
37-
</record>
3824
<record id="action_update_destination_location_on_picking" model="ir.actions.server">
3925
<field name="code"><![CDATA[
40-
for record in records.filtered(lambda r: r.picking_type_id and r.picking_type_id.x_studio_overrule_customer_location):
41-
record.write({
42-
"location_dest_id": record.picking_type_id.default_location_dest_id.id
43-
})
26+
records.filtered('picking_type_id.x_overrule_customer_location').write({"location_dest_id": record.picking_type_id.default_location_dest_id.id})
4427
]]></field>
4528
<field name="model_id" ref="stock.model_stock_picking"/>
4629
<field name="state">code</field>
4730
<field name="name">Execute Code</field>
4831
</record>
32+
<record id="make_route_on_product_create" model="ir.actions.server">
33+
<field name="model_id" ref="product.model_product_template"/>
34+
<field name="state">object_write</field>
35+
<field name="update_path">route_ids</field>
36+
<field name="crud_model_id" ref="product.model_product_template"/>
37+
<field name="update_field_id" ref="stock.field_product_template__route_ids"/>
38+
<field name="name">Update Product</field>
39+
<field name="resource_ref" ref="stock_route_4"/>
40+
</record>
4941
</odoo>

library/data/ir_model_fields.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@
55
<field name="copied" eval="True"/>
66
<field name="field_description">Automatic activation on product</field>
77
<field name="model_id" ref="stock.model_stock_route"/>
8-
<field name="name">x_studio_automatic_activation_on_product</field>
9-
</record>
8+
<field name="name">x_automatic_activation_on_product</field>
9+
</record>
1010
<record id="field_stock_picking_type_overrule_customer_location" model="ir.model.fields">
1111
<field name="ttype">boolean</field>
1212
<field name="copied" eval="True"/>
1313
<field name="field_description">Overrule customer location</field>
1414
<field name="model_id" ref="stock.model_stock_picking_type"/>
15-
<field name="name">x_studio_overrule_customer_location</field>
15+
<field name="name">x_overrule_customer_location</field>
1616
</record>
1717
<record id="standard_rule_field" model="ir.model.fields">
1818
<field name="ttype">boolean</field>
1919
<field name="copied" eval="True"/>
2020
<field name="field_description">Standard Rule</field>
2121
<field name="model_id" ref="stock.model_stock_rule"/>
22-
<field name="name">x_studio_standard_rule</field>
22+
<field name="name">x_standard_rule</field>
2323
</record>
2424
<record id="pos_product_categories_field" model="ir.model.fields">
25-
<field name="name">x_studio_pos_product_category_ids</field>
25+
<field name="name">x_pos_product_category_ids</field>
2626
<field name="ttype">many2many</field>
2727
<field name="field_description">PoS Product Categories</field>
2828
<field name="model_id" ref="stock.model_stock_rule"/>

library/data/ir_ui_menu.xml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<record id="return_main_menu" model="ir.ui.menu">
77
<field name="name">Return</field>
88
<field name="sequence">2</field>
9-
<field name="web_icon_data" type="base64" file="library/static/description/icon.png"/>
9+
<field name="web_icon_data" type="base64" file="library/static/description/icon_without_border.png"/>
1010
</record>
1111
<record id="return_sub_menu" model="ir.ui.menu">
1212
<field name="action" ref="return_picking_act_window"/>
@@ -51,22 +51,4 @@
5151
<record id="mail.menu_root_discuss" model="ir.ui.menu" forcecreate="0">
5252
<field name="sequence">13</field>
5353
</record>
54-
<record id="sale.sale_menu_root" model="ir.ui.menu" forcecreate="0">
55-
<field name="sequence">14</field>
56-
</record>
57-
<record id="spreadsheet_dashboard.spreadsheet_dashboard_menu_root" model="ir.ui.menu" forcecreate="0">
58-
<field name="sequence">15</field>
59-
</record>
60-
<record id="stock.menu_stock_root" model="ir.ui.menu" forcecreate="0">
61-
<field name="sequence">16</field>
62-
</record>
63-
<record id="utm.menu_link_tracker_root" model="ir.ui.menu" forcecreate="0">
64-
<field name="sequence">17</field>
65-
</record>
66-
<record id="website.menu_website_add_features" model="ir.ui.menu" forcecreate="0">
67-
<field name="sequence">18</field>
68-
</record>
69-
<record id="calendar.menu_calendar_settings" model="ir.ui.menu" forcecreate="0">
70-
<field name="sequence">19</field>
71-
</record>
7254
</odoo>

0 commit comments

Comments
 (0)