/** * WPML compatibility functions * * @global array $duplicated_posts Array to store the posts being duplicated. * * @package Yoast\WP\Duplicate_Post * @since 3.2 */ add_action( 'admin_init', 'duplicate_post_wpml_init' ); /** * Add handlers for WPML compatibility. */ function duplicate_post_wpml_init() { if ( defined( 'ICL_SITEPRESS_VERSION' ) ) { add_action( 'dp_duplicate_page', 'duplicate_post_wpml_copy_translations', 10, 3 ); add_action( 'dp_duplicate_post', 'duplicate_post_wpml_copy_translations', 10, 3 ); add_action( 'shutdown', 'duplicate_wpml_string_packages', 11 ); } } global $duplicated_posts; // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals -- Reason: Renaming a global variable is a BC break. $duplicated_posts = []; /** * Copy post translations. * * @global SitePress $sitepress Instance of the Main WPML class. * @global array $duplicated_posts Array of duplicated posts. * * @param int $post_id ID of the copy. * @param WP_Post $post Original post object. * @param string $status Status of the new post. */ function duplicate_post_wpml_copy_translations( $post_id, $post, $status = '' ) { global $sitepress; global $duplicated_posts; remove_action( 'dp_duplicate_page', 'duplicate_post_wpml_copy_translations', 10 ); remove_action( 'dp_duplicate_post', 'duplicate_post_wpml_copy_translations', 10 ); $current_language = $sitepress->get_current_language(); $trid = $sitepress->get_element_trid( $post->ID ); if ( ! empty( $trid ) ) { $translations = $sitepress->get_element_translations( $trid ); $new_trid = $sitepress->get_element_trid( $post_id ); foreach ( $translations as $code => $details ) { if ( $code !== $current_language ) { if ( $details->element_id ) { $translation = get_post( $details->element_id ); if ( ! $translation ) { continue; } $new_post_id = duplicate_post_create_duplicate( $translation, $status ); if ( ! is_wp_error( $new_post_id ) ) { $sitepress->set_element_language_details( $new_post_id, 'post_' . $translation->post_type, $new_trid, $code, $current_language ); } } } } // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals -- Reason: see above. $duplicated_posts[ $post->ID ] = $post_id; } } /** * Duplicate string packages. * * @global array() $duplicated_posts Array of duplicated posts. */ function duplicate_wpml_string_packages() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals -- Reason: renaming the function would be a BC-break. global $duplicated_posts; foreach ( $duplicated_posts as $original_post_id => $duplicate_post_id ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals -- Reason: using WPML native filter. $original_string_packages = apply_filters( 'wpml_st_get_post_string_packages', false, $original_post_id ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals -- Reason: using WPML native filter. $new_string_packages = apply_filters( 'wpml_st_get_post_string_packages', false, $duplicate_post_id ); if ( is_array( $original_string_packages ) ) { foreach ( $original_string_packages as $original_string_package ) { $translated_original_strings = $original_string_package->get_translated_strings( [] ); foreach ( $new_string_packages as $new_string_package ) { $cache = new WPML_WP_Cache( 'WPML_Package' ); $cache->flush_group_cache(); $new_strings = $new_string_package->get_package_strings(); foreach ( $new_strings as $new_string ) { if ( isset( $translated_original_strings[ $new_string->name ] ) ) { foreach ( $translated_original_strings[ $new_string->name ] as $language => $translated_string ) { do_action( // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals -- Reason: using WPML native filter. 'wpml_add_string_translation', $new_string->id, $language, $translated_string['value'], $translated_string['status'] ); } } } } } } } } Alternative Work Centers(代替作業区) – Raqqa

Alternative Work Centers(代替作業区)

🏭 Odoo MRP|Alternative Work Centers(代替作業区)の活用


🎯 概要

**Alternative Work Center(代替作業区)**は、指定された作業区がビジー(使用中)または利用できない場合に、自動的に別の作業区へルーティングする仕組みです。これにより、製造スケジュールの柔軟性と生産効率が向上します。


✅ 1. 設定方法:作業区の登録

➤ 例:組立工程の代替作業区を設定

項目
メイン作業区名Assembly Line 2
コードASL2
タグ(Tag)Assembly(フィルタや検索に便利)
代替作業区(Alternative Work Centers)Assembly Line 1ASL1)を指定

✅ 動作例:Chair製造での代替作業区の使用

⚙ 実例の流れ

🪑 MO①:Chairの製造オーダー(MO)作成

  1. 製造 > 製造オーダー > Chairを数量1で作成し「確認」
  2. 自動でWork Order(工程)が生成
  3. 作業指示(Work Order)に移動し、「Start」を押して作業を開始
    • 使用作業区:Assembly Line 1
    • Assembly Line 1 は 稼働中(Running) 状態になる

🪑 MO②:新しいChairのMOを作成

  1. 別のChairのMOを作成し「確認」→「Plan」ボタンを押す
  2. システムがAssembly Line 1がビジー(使用中)と判断し、
    • 自動的に代替作業区:Assembly Line 2 に割り当て

🔍 どこを見れば「Assembly Line 1が使用中」か分かるのか?

🔢 方法①:Work Center Overview

  • メニュー:製造 > 作業 > Work Center Overview
  • 該当の「Assembly Line 1」のカードに注目:
    • To Launch」:未開始の作業指示数
    • Running」:現在実行中の作業数
    • Late」:遅延作業数
    • 稼働中の作業区はカードにアクティブ表示(通常は緑のバーや高OEEが表示)

💡 Runningが1以上なら使用中


🔢 方法②:作業区の予定カレンダー(Ganttビュー)

  • メニュー:製造 > 作業 > 作業指示(Work Orders)
  • 表示形式を「ガントチャート(Gantt)」に変更
  • Work Center を軸にして表示
    • Assembly Line 1 に作業が詰まっていれば、時間帯にブロックが表示

🔢 方法③:作業指示(Work Order)一覧

  • メニュー:製造 > 作業 > 作業指示
  • フィルターで「Work Center = Assembly Line 1」「状態 = In Progress」で検索
    • 該当作業指示が稼働中であることを確認できる

✅ まとめ

チェック場所内容
Work Center Overviewカードで “Running” 状態を視認
作業指示のガントビュー作業時間帯の詰まり具合を可視化
作業指示一覧でフィルターAssembly Line 1の稼働状況を直接確認


Comments

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です